Normalise cli-color files, fixup javascript-time-ago (#40685)

* Normalise cli-color files

There is no good reason for multiple modules to be in the same file.

* fixup javascript-time-ago too
This commit is contained in:
Nathan Shively-Sanders 2019-11-26 14:46:51 -08:00 committed by GitHub
parent f9b723f52e
commit 70339d5f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 203 additions and 215 deletions

View File

@ -2,95 +2,72 @@
// Project: https://github.com/medikoo/cli-color
// Definitions by: Joel Spadin <https://github.com/ChaosinaCan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace m {
export interface Format {
(...text: any[]): string;
declare module "cli-color" {
namespace m {
export interface Format {
(...text: any[]): string;
bold: Format;
italic: Format;
underline: Format;
blink: Format;
inverse: Format;
strike: Format;
bold: Format;
italic: Format;
underline: Format;
blink: Format;
inverse: Format;
strike: Format;
black: Format;
red: Format;
green: Format;
yellow: Format;
blue: Format;
magenta: Format;
cyan: Format;
white: Format;
black: Format;
red: Format;
green: Format;
yellow: Format;
blue: Format;
magenta: Format;
cyan: Format;
white: Format;
bgBlack: Format;
bgRed: Format;
bgGreen: Format;
bgYellow: Format;
bgBlue: Format;
bgMagenta: Format;
bgCyan: Format;
bgWhite: Format;
bgBlack: Format;
bgRed: Format;
bgGreen: Format;
bgYellow: Format;
bgBlue: Format;
bgMagenta: Format;
bgCyan: Format;
bgWhite: Format;
blackBright: Format;
redBright: Format;
greenBright: Format;
yellowBright: Format;
blueBright: Format;
magentaBright: Format;
cyanBright: Format;
whiteBright: Format;
blackBright: Format;
redBright: Format;
greenBright: Format;
yellowBright: Format;
blueBright: Format;
magentaBright: Format;
cyanBright: Format;
whiteBright: Format;
bgBlackBright: Format;
bgRedBright: Format;
bgGreenBright: Format;
bgYellowBright: Format;
bgBlueBright: Format;
bgMagentaBright: Format;
bgCyanBright: Format;
bgWhiteBright: Format;
bgBlackBright: Format;
bgRedBright: Format;
bgGreenBright: Format;
bgYellowBright: Format;
bgBlueBright: Format;
bgMagentaBright: Format;
bgCyanBright: Format;
bgWhiteBright: Format;
xterm(color: number): Format;
bgXterm(color: number): Format;
xterm(color: number): Format;
bgXterm(color: number): Format;
move(x: number, y: number): string;
moveTo(x: number, y: number): string;
bol(n?: number, erase?: boolean): string;
up(n: number): string;
down(n: number): string;
left(n: number): string;
right(n: number): string;
move(x: number, y: number): string;
moveTo(x: number, y: number): string;
bol(n?: number, erase?: boolean): string;
up(n: number): string;
down(n: number): string;
left(n: number): string;
right(n: number): string;
beep: string;
reset: string;
beep: string;
reset: string;
width: number;
height: number;
xtermSupported: boolean;
}
}
var m: m.Format;
export = m;
width: number;
height: number;
xtermSupported: boolean;
}
}
declare module "cli-color/trim" {
function ansiTrim(str: string): string;
export = ansiTrim;
}
declare module "cli-color/throbber" {
import clc = require('cli-color');
namespace setupThrobber {
export interface Throbber {
start(): void;
stop(): void;
restart(): void;
}
}
function setupThrobber(write: (str: string) => any, period: number, format?: clc.Format): setupThrobber.Throbber;
export = setupThrobber;
}
declare var m: m.Format;
export = m;

12
types/cli-color/throbber.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
import clc = require('cli-color');
declare namespace setupThrobber {
export interface Throbber {
start(): void;
stop(): void;
restart(): void;
}
}
declare function setupThrobber(write: (str: string) => any, period: number, format?: clc.Format): setupThrobber.Throbber;
export = setupThrobber;

2
types/cli-color/trim.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare function ansiTrim(str: string): string;
export = ansiTrim;

View File

@ -0,0 +1,131 @@
locale/lb/index.d.ts
locale/si/index.d.ts
locale/lt/index.d.ts
locale/ar-AE/index.d.ts
locale/sw/index.d.ts
locale/tk/index.d.ts
locale/he/index.d.ts
locale/es-MX/index.d.ts
locale/es-AR/index.d.ts
locale/kn/index.d.ts
locale/km/index.d.ts
locale/nl/index.d.ts
locale/br/index.d.ts
locale/sq/index.d.ts
locale/ast/index.d.ts
locale/eu/index.d.ts
locale/mn/index.d.ts
locale/ar/index.d.ts
locale/kk/index.d.ts
locale/tr/index.d.ts
locale/zh-Hans-MO/index.d.ts
locale/te/index.d.ts
locale/zh-Hant-MO/index.d.ts
locale/hi/index.d.ts
locale/se-FI/index.d.ts
locale/am/index.d.ts
locale/as/index.d.ts
locale/bs-Cyrl/index.d.ts
locale/es/index.d.ts
locale/chr/index.d.ts
locale/mzn/index.d.ts
locale/fil/index.d.ts
locale/bn/index.d.ts
locale/ne/index.d.ts
locale/is/index.d.ts
locale/wae/index.d.ts
locale/fur/index.d.ts
locale/ur/index.d.ts
locale/fr/index.d.ts
locale/yue/index.d.ts
locale/zh-Hans-SG/index.d.ts
locale/gl/index.d.ts
locale/nn/index.d.ts
locale/fi/index.d.ts
locale/ug/index.d.ts
locale/ko/index.d.ts
locale/hy/index.d.ts
locale/ky/index.d.ts
locale/lv/index.d.ts
locale/da/index.d.ts
locale/se/index.d.ts
locale/es-PY/index.d.ts
locale/ku/index.d.ts
locale/ml/index.d.ts
locale/mr/index.d.ts
locale/af/index.d.ts
locale/ru/index.d.ts
locale/or/index.d.ts
locale/uk/index.d.ts
locale/lo/index.d.ts
locale/fy/index.d.ts
locale/fa/index.d.ts
locale/zh-Hant/index.d.ts
locale/bs/index.d.ts
locale/lkt/index.d.ts
locale/kl/index.d.ts
locale/sk/index.d.ts
locale/nb/index.d.ts
locale/ca/index.d.ts
locale/ksh/index.d.ts
locale/bg/index.d.ts
locale/hr/index.d.ts
locale/uz-Cyrl/index.d.ts
locale/sv/index.d.ts
locale/dz/index.d.ts
locale/uz/index.d.ts
locale/gd/index.d.ts
locale/es-US/index.d.ts
locale/sr-Latn/index.d.ts
locale/fo/index.d.ts
locale/hu/index.d.ts
locale/ccp/index.d.ts
locale/kea/index.d.ts
locale/my/index.d.ts
locale/kok/index.d.ts
locale/th/index.d.ts
locale/el/index.d.ts
locale/ia/index.d.ts
locale/cy/index.d.ts
locale/jgo/index.d.ts
locale/pl/index.d.ts
locale/sl/index.d.ts
locale/ps/index.d.ts
locale/sr/index.d.ts
locale/id/index.d.ts
locale/et/index.d.ts
locale/yue-Hans/index.d.ts
locale/qu/index.d.ts
locale/it/index.d.ts
locale/so/index.d.ts
locale/zh-Hans-HK/index.d.ts
locale/az/index.d.ts
locale/ee/index.d.ts
locale/vi/index.d.ts
locale/ta/index.d.ts
locale/ur-IN/index.d.ts
locale/zu/index.d.ts
locale/mt/index.d.ts
locale/sd/index.d.ts
locale/zh/index.d.ts
locale/pt/index.d.ts
locale/ce/index.d.ts
locale/dsb/index.d.ts
locale/pa/index.d.ts
locale/es-SV/index.d.ts
locale/jv/index.d.ts
locale/cs/index.d.ts
locale/ga/index.d.ts
locale/sah/index.d.ts
locale/ja/index.d.ts
locale/mk/index.d.ts
locale/yi/index.d.ts
locale/fr-CA/index.d.ts
locale/de/index.d.ts
locale/hsb/index.d.ts
locale/be/index.d.ts
locale/gu/index.d.ts
locale/ms/index.d.ts
locale/ro/index.d.ts
locale/ka/index.d.ts
locale/ti/index.d.ts

View File

@ -14,140 +14,6 @@
"esModuleInterop": true
},
"files": [
"locale/lb/index.d.ts",
"locale/si/index.d.ts",
"locale/lt/index.d.ts",
"locale/ar-AE/index.d.ts",
"locale/sw/index.d.ts",
"locale/tk/index.d.ts",
"locale/he/index.d.ts",
"locale/es-MX/index.d.ts",
"locale/to/index.d.ts",
"locale/es-AR/index.d.ts",
"locale/kn/index.d.ts",
"locale/km/index.d.ts",
"locale/nl/index.d.ts",
"locale/br/index.d.ts",
"locale/sq/index.d.ts",
"locale/ast/index.d.ts",
"locale/eu/index.d.ts",
"locale/mn/index.d.ts",
"locale/ar/index.d.ts",
"locale/kk/index.d.ts",
"locale/tr/index.d.ts",
"locale/zh-Hans-MO/index.d.ts",
"locale/te/index.d.ts",
"locale/zh-Hant-MO/index.d.ts",
"locale/hi/index.d.ts",
"locale/se-FI/index.d.ts",
"locale/am/index.d.ts",
"locale/as/index.d.ts",
"locale/bs-Cyrl/index.d.ts",
"locale/es/index.d.ts",
"locale/chr/index.d.ts",
"locale/mzn/index.d.ts",
"locale/fil/index.d.ts",
"locale/bn/index.d.ts",
"locale/ne/index.d.ts",
"locale/is/index.d.ts",
"locale/wae/index.d.ts",
"locale/fur/index.d.ts",
"locale/ur/index.d.ts",
"locale/fr/index.d.ts",
"locale/yue/index.d.ts",
"locale/zh-Hans-SG/index.d.ts",
"locale/gl/index.d.ts",
"locale/nn/index.d.ts",
"locale/fi/index.d.ts",
"locale/ug/index.d.ts",
"locale/en/index.d.ts",
"locale/ko/index.d.ts",
"locale/hy/index.d.ts",
"locale/ky/index.d.ts",
"locale/lv/index.d.ts",
"locale/da/index.d.ts",
"locale/se/index.d.ts",
"locale/es-PY/index.d.ts",
"locale/ku/index.d.ts",
"locale/ml/index.d.ts",
"locale/mr/index.d.ts",
"locale/af/index.d.ts",
"locale/ru/index.d.ts",
"locale/or/index.d.ts",
"locale/uk/index.d.ts",
"locale/lo/index.d.ts",
"locale/fy/index.d.ts",
"locale/fa/index.d.ts",
"locale/zh-Hant/index.d.ts",
"locale/bs/index.d.ts",
"locale/lkt/index.d.ts",
"locale/kl/index.d.ts",
"locale/sk/index.d.ts",
"locale/nb/index.d.ts",
"locale/ca/index.d.ts",
"locale/ksh/index.d.ts",
"locale/bg/index.d.ts",
"locale/hr/index.d.ts",
"locale/uz-Cyrl/index.d.ts",
"locale/sv/index.d.ts",
"locale/dz/index.d.ts",
"locale/uz/index.d.ts",
"locale/gd/index.d.ts",
"locale/es-US/index.d.ts",
"locale/sr-Latn/index.d.ts",
"locale/fo/index.d.ts",
"locale/hu/index.d.ts",
"locale/ccp/index.d.ts",
"locale/kea/index.d.ts",
"locale/my/index.d.ts",
"locale/kok/index.d.ts",
"locale/zh-Hant-HK/index.d.ts",
"locale/th/index.d.ts",
"locale/el/index.d.ts",
"locale/ia/index.d.ts",
"locale/cy/index.d.ts",
"locale/jgo/index.d.ts",
"locale/pl/index.d.ts",
"locale/sl/index.d.ts",
"locale/ps/index.d.ts",
"locale/sr/index.d.ts",
"locale/id/index.d.ts",
"locale/et/index.d.ts",
"locale/yue-Hans/index.d.ts",
"locale/qu/index.d.ts",
"locale/it/index.d.ts",
"locale/so/index.d.ts",
"locale/zh-Hans-HK/index.d.ts",
"locale/az/index.d.ts",
"locale/ee/index.d.ts",
"locale/vi/index.d.ts",
"locale/ta/index.d.ts",
"locale/ur-IN/index.d.ts",
"locale/zu/index.d.ts",
"locale/mt/index.d.ts",
"locale/sd/index.d.ts",
"locale/zh/index.d.ts",
"locale/pt/index.d.ts",
"locale/ce/index.d.ts",
"locale/dsb/index.d.ts",
"locale/pa/index.d.ts",
"locale/es-SV/index.d.ts",
"locale/jv/index.d.ts",
"locale/cs/index.d.ts",
"locale/ga/index.d.ts",
"locale/sah/index.d.ts",
"locale/ja/index.d.ts",
"locale/mk/index.d.ts",
"locale/yi/index.d.ts",
"locale/fr-CA/index.d.ts",
"locale/de/index.d.ts",
"locale/hsb/index.d.ts",
"locale/be/index.d.ts",
"locale/gu/index.d.ts",
"locale/ms/index.d.ts",
"locale/ro/index.d.ts",
"locale/ka/index.d.ts",
"locale/ti/index.d.ts",
"index.d.ts",
"javascript-time-ago-tests.ts"
]