Merge pull request #30717 from balupton/patch-1

ansicolors: accurate types with recursion support
This commit is contained in:
Andrew Casey
2018-12-03 13:27:04 -08:00
committed by GitHub
+41 -4
View File
@@ -1,8 +1,45 @@
// Type definitions for ansicolors
// Project: https://github.com/thlorenz/ansicolors
// Definitions by: rogierschouten <https://github.com/rogierschouten>
// Definitions by: Benjamin Arthur Lupton <https://github.com/balupton>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var colors: { [index: string]: (s: string) => string; };
export = colors;
interface Colors extends String {
(value: string): string
white: this
black: this
blue: this
cyan: this
green: this
magenta: this
red: this
yellow: this
brightBlack: this
brightRed: this
brightGreen: this
brightYellow: this
brightBlue: this
brightMagenta: this
brightCyan: this
brightWhite: this
bgBlack: this
bgRed: this
bgGreen: this
bgYellow: this
bgBlue: this
bgMagenta: this
bgCyan: this
bgWhite: this
bgBrightBlack: this
bgBrightRed: this
bgBrightGreen: this
bgBrightYellow: this
bgBrightBlue: this
bgBrightMagenta: this
bgBrightCyan: this
bgBrightWhite: this
open: this
close: this
colors: this
}
declare const colors: Colors
export default colors