diff --git a/index.js b/index.js index 0de53d9..fedadd0 100644 --- a/index.js +++ b/index.js @@ -40,7 +40,7 @@ function chalkFactory(options) { Object.setPrototypeOf(chalk, Chalk.prototype); Object.setPrototypeOf(chalk.template, chalk); - chalk.template.constructor = Chalk; + chalk.template.constructor = () => {throw new Error('Chalk.constructor() is deprecated. Use new Chalk.instance() instead.')}; chalk.template.instance = ChalkClass; return chalk.template;