Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(types): move types declaration into "real" types declaration file (.d.ts) #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"files": [
"picocolors.*",
"types.ts"
"types.d.ts"
],
"keywords": [
"terminal",
Expand Down
52 changes: 52 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
@@ -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

}
52 changes: 0 additions & 52 deletions types.ts

This file was deleted.