1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, '__esModule', {
|
4 | value: true
|
5 | });
|
6 | exports.deprecationWarning = void 0;
|
7 | var _utils = require('./utils');
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | const deprecationMessage = (message, options) => {
|
16 | const comment = options.comment;
|
17 | const name =
|
18 | (options.title && options.title.deprecation) || _utils.DEPRECATION;
|
19 | (0, _utils.logValidationWarning)(name, message, comment);
|
20 | };
|
21 | const deprecationWarning = (config, option, deprecatedOptions, options) => {
|
22 | if (option in deprecatedOptions) {
|
23 | deprecationMessage(deprecatedOptions[option](config), options);
|
24 | return true;
|
25 | }
|
26 | return false;
|
27 | };
|
28 | exports.deprecationWarning = deprecationWarning;
|