Changed tagged template literal argument type to unknown
This commit is contained in:
parent
70bb378e8e
commit
eac645be4f
2 changed files with 2 additions and 1 deletions
2
types/index.d.ts
vendored
2
types/index.d.ts
vendored
|
|
@ -27,7 +27,7 @@ export interface ColorSupport {
|
|||
|
||||
export interface Chalk {
|
||||
(...text: string[]): string;
|
||||
(text: TemplateStringsArray, ...placeholders: string[]): string;
|
||||
(text: TemplateStringsArray, ...placeholders: unknown[]): string;
|
||||
constructor: ChalkConstructor;
|
||||
enabled: boolean;
|
||||
level: Level;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ const ctx = chalk.constructor({level: Level.TrueColor });
|
|||
ctx('foo');
|
||||
ctx.red('foo');
|
||||
ctx`foo`;
|
||||
ctx`works with numbers ${1}`;
|
||||
|
||||
chalk.enabled = true;
|
||||
chalk.level = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue