Skip to content

Commit

Permalink
Fix TypeScript definition (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
LitoMore authored Sep 7, 2022
1 parent ee88ebc commit 2b1f237
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface ColorSupport {

export type ColorInfo = ColorSupport | false;

export function createSupportsColor(stream: WriteStream, options?: Options): ColorInfo;
export function createSupportsColor(stream?: WriteStream, options?: Options): ColorInfo;

declare const supportsColor: {
stdout: ColorInfo;
Expand Down
1 change: 1 addition & 0 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ expectType<ColorInfo>(supportsColor.stderr);

expectType<ColorInfo>(createSupportsColor(stdout));
expectType<ColorInfo>(createSupportsColor(stderr));
expectType<ColorInfo>(createSupportsColor(undefined));

expectType<ColorInfo>(createSupportsColor(stdout, options));

0 comments on commit 2b1f237

Please sign in to comment.