Changed typings for flow from string[] -> mixed[]
This commit is contained in:
parent
3f9e501465
commit
a5192264ea
2 changed files with 2 additions and 10 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue