From 1284415013c24c5c51c1ee339bf85c7c8b7cbd7c Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Wed, 26 Dec 2018 02:27:57 +0100 Subject: [PATCH] Enforce `chalk.constructor` to be called with `new` in TypeScript --- index.d.ts | 5 ----- index.test-d.ts | 2 -- 2 files changed, 7 deletions(-) diff --git a/index.d.ts b/index.d.ts index f2a1149..b42e4c0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -40,11 +40,6 @@ export interface Constructor { * Return a new Chalk instance. */ new (options?: Options): Chalk; - - /** - * Return a new Chalk instance. - */ - (options?: Options): Chalk; } /** diff --git a/index.test-d.ts b/index.test-d.ts index a91003b..6cda4da 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -17,8 +17,6 @@ expectType(chalk.supportsColor.has16m); // - Chalk - // -- Constructor -- -expectType(chalk.constructor()); -expectType(chalk.constructor()); expectType(new chalk.constructor({level: 1})); // -- Properties --