Skip to content

Commit

Permalink
Remove util.styleText type overrides because @types/node has them…
Browse files Browse the repository at this point in the history
… now (#10746)
  • Loading branch information
mangs authored May 1, 2024
1 parent fd45c67 commit 2a40148
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 63 deletions.
Binary file modified packages/bun-types/bun.lockb
Binary file not shown.
61 changes: 0 additions & 61 deletions packages/bun-types/overrides.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,64 +62,3 @@ declare module "tls" {

function connect(options: BunConnectionOptions, secureConnectListener?: () => void): TLSSocket;
}

declare module "util" {
// https://nodejs.org/docs/latest/api/util.html#foreground-colors
type ForegroundColors =
| "black"
| "blackBright"
| "blue"
| "blueBright"
| "cyan"
| "cyanBright"
| "gray"
| "green"
| "greenBright"
| "grey"
| "magenta"
| "magentaBright"
| "red"
| "redBright"
| "white"
| "whiteBright"
| "yellow"
| "yellowBright";

// https://nodejs.org/docs/latest/api/util.html#background-colors
type BackgroundColors =
| "bgBlack"
| "bgBlackBright"
| "bgBlue"
| "bgBlueBright"
| "bgCyan"
| "bgCyanBright"
| "bgGray"
| "bgGreen"
| "bgGreenBright"
| "bgGrey"
| "bgMagenta"
| "bgMagentaBright"
| "bgRed"
| "bgRedBright"
| "bgWhite"
| "bgWhiteBright"
| "bgYellow"
| "bgYellowBright";

// https://nodejs.org/docs/latest/api/util.html#modifiers
type Modifiers =
| "blink"
| "bold"
| "dim"
| "doubleunderline"
| "framed"
| "hidden"
| "inverse"
| "italic"
| "overlined"
| "reset"
| "strikethrough"
| "underline";

function styleText(format: ForegroundColors | BackgroundColors | Modifiers, text: string): string;
}
4 changes: 2 additions & 2 deletions packages/bun-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"homepage": "https://bun.sh",
"dependencies": {
"@types/node": "~20.11.3",
"@types/node": "~20.12.8",
"@types/ws": "~8.5.10"
},
"devDependencies": {
Expand All @@ -34,4 +34,4 @@
"bun.js",
"types"
]
}
}

0 comments on commit 2a40148

Please sign in to comment.