ansicolors: support colors as functions

This commit is contained in:
Benjamin Lupton
2018-12-03 20:53:58 +11:00
committed by GitHub
parent 3daac759f4
commit aeeaa025d5
+37 -36
View File
@@ -4,41 +4,42 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Colors extends String {
white: Colors
black: Colors
blue: Colors
cyan: Colors
green: Colors
magenta: Colors
red: Colors
yellow: Colors
brightBlack: Colors
brightRed: Colors
brightGreen: Colors
brightYellow: Colors
brightBlue: Colors
brightMagenta: Colors
brightCyan: Colors
brightWhite: Colors
bgBlack: Colors
bgRed: Colors
bgGreen: Colors
bgYellow: Colors
bgBlue: Colors
bgMagenta: Colors
bgCyan: Colors
bgWhite: Colors
bgBrightBlack: Colors
bgBrightRed: Colors
bgBrightGreen: Colors
bgBrightYellow: Colors
bgBrightBlue: Colors
bgBrightMagenta: Colors
bgBrightCyan: Colors
bgBrightWhite: Colors
open: Colors
close: Colors
colors: Colors
(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 var colors: Colors
declare const colors: Colors
export default colors