diff --git a/types/index.d.ts b/types/index.d.ts index b4e4dc5..8a7fd09 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -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; diff --git a/types/test.ts b/types/test.ts index cedb39a..45d44f4 100644 --- a/types/test.ts +++ b/types/test.ts @@ -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;