From 6dcf3513597bec893a0a1272c589b0efed837217 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Tue, 10 Sep 2024 09:03:41 +0200 Subject: [PATCH] fix(types): move types declaration into "real" types declaration file (.d.ts) --- package.json | 2 +- types.d.ts | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ types.ts | 52 ---------------------------------------------------- 3 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 types.d.ts delete mode 100644 types.ts diff --git a/package.json b/package.json index fd781f4..afdd5ad 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "files": [ "picocolors.*", - "types.ts" + "types.d.ts" ], "keywords": [ "terminal", diff --git a/types.d.ts b/types.d.ts new file mode 100644 index 0000000..ecd6143 --- /dev/null +++ b/types.d.ts @@ -0,0 +1,52 @@ +export type Formatter = (input: string | number | null | undefined) => string + +export interface Colors { + isColorSupported: boolean + + reset: Formatter + bold: Formatter + dim: Formatter + italic: Formatter + underline: Formatter + inverse: Formatter + hidden: Formatter + strikethrough: Formatter + + black: Formatter + red: Formatter + green: Formatter + yellow: Formatter + blue: Formatter + magenta: Formatter + cyan: Formatter + white: Formatter + gray: Formatter + + bgBlack: Formatter + bgRed: Formatter + bgGreen: Formatter + bgYellow: Formatter + bgBlue: Formatter + bgMagenta: Formatter + bgCyan: Formatter + bgWhite: Formatter + + blackBright: Formatter + redBright: Formatter + greenBright: Formatter + yellowBright: Formatter + blueBright: Formatter + magentaBright: Formatter + cyanBright: Formatter + whiteBright: Formatter + + bgBlackBright: Formatter + bgRedBright: Formatter + bgGreenBright: Formatter + bgYellowBright: Formatter + bgBlueBright: Formatter + bgMagentaBright: Formatter + bgCyanBright: Formatter + bgWhiteBright: Formatter + +} diff --git a/types.ts b/types.ts deleted file mode 100644 index 8046e27..0000000 --- a/types.ts +++ /dev/null @@ -1,52 +0,0 @@ -export type Formatter = (input: string | number | null | undefined) => string - -export interface Colors { - isColorSupported: boolean - - reset: Formatter - bold: Formatter - dim: Formatter - italic: Formatter - underline: Formatter - inverse: Formatter - hidden: Formatter - strikethrough: Formatter - - black: Formatter - red: Formatter - green: Formatter - yellow: Formatter - blue: Formatter - magenta: Formatter - cyan: Formatter - white: Formatter - gray: Formatter - - bgBlack: Formatter - bgRed: Formatter - bgGreen: Formatter - bgYellow: Formatter - bgBlue: Formatter - bgMagenta: Formatter - bgCyan: Formatter - bgWhite: Formatter - - blackBright: Formatter - redBright: Formatter - greenBright: Formatter - yellowBright: Formatter - blueBright: Formatter - magentaBright: Formatter - cyanBright: Formatter - whiteBright: Formatter - - bgBlackBright: Formatter - bgRedBright: Formatter - bgGreenBright: Formatter - bgYellowBright: Formatter - bgBlueBright: Formatter - bgMagentaBright: Formatter - bgCyanBright: Formatter - bgWhiteBright: Formatter - -}