Skip to content

Commit

Permalink
Changed typings for flow from string[] -> mixed[]
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbujm committed Dec 26, 2018
1 parent 3f9e501 commit a519226
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions index.js.flow
Expand Up @@ -22,8 +22,8 @@ export type ColorSupport = {|
|};

export interface Chalk {
(...text: string[]): string,
(text: TemplateStringsArray, ...placeholders: string[]): string,
(...text: mixed[]): string,
(text: TemplateStringsArray, ...placeholders: mixed[]): string,
constructor(options?: ChalkOptions): Chalk,
enabled: boolean,
level: Level,
Expand Down
8 changes: 0 additions & 8 deletions test/_flow.js
Expand Up @@ -9,10 +9,6 @@ chalk.constructor({level: 1});
new chalk.constructor({enabled: 'true'});
new chalk.constructor({enabled: true});

// $ExpectError (Can't pass in null)
chalk.underline(null);
chalk.underline('foo');

// $ExpectError (Can't have typo in chalk method)
chalk.rd('foo');
chalk.red('foo');
Expand All @@ -29,10 +25,6 @@ chalk.red.bgBlue.underline('foo');
const badCtx = chalk.constructor({level: 4});
const ctx = chalk.constructor({level: 3});

// $ExpectError (Can't pass in null)
ctx(null);
ctx('foo');

// $ExpectError (Can't have typo in method name)
ctx.gry('foo');
ctx.grey('foo');
Expand Down

0 comments on commit a519226

Please sign in to comment.