From eac645be4f3d4dd6e8616e17c60506eea7531d86 Mon Sep 17 00:00:00 2001 From: Jonathan Van Buren Date: Sun, 23 Dec 2018 11:25:37 +0800 Subject: [PATCH] Changed tagged template literal argument type to unknown --- types/index.d.ts | 2 +- types/test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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;