12345678910111213141516 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- const chalk_1 = require("chalk");
- exports.commonDeprecatedHandler = (keyOrPair, redirectTo, { descriptor }) => {
- const messages = [
- `${chalk_1.default.yellow(typeof keyOrPair === 'string'
- ? descriptor.key(keyOrPair)
- : descriptor.pair(keyOrPair))} is deprecated`,
- ];
- if (redirectTo) {
- messages.push(`we now treat it as ${chalk_1.default.blue(typeof redirectTo === 'string'
- ? descriptor.key(redirectTo)
- : descriptor.pair(redirectTo))}`);
- }
- return messages.join('; ') + '.';
- };
|