Skip to content

Disallow template literals on colors and modifiers in the TypeScript types#380

Closed
sexwithsatan wants to merge 1 commit intochalk:masterfrom
sexwithsatan:feature/341
Closed

Disallow template literals on colors and modifiers in the TypeScript types#380
sexwithsatan wants to merge 1 commit intochalk:masterfrom
sexwithsatan:feature/341

Conversation

@sexwithsatan
Copy link
Copy Markdown

@sexwithsatan sexwithsatan commented Dec 22, 2019

Fixes #341

@sexwithsatan
Copy link
Copy Markdown
Author

Any feedback on this? PR was submitted over 3 weeks ago

@sindresorhus sindresorhus changed the title Disallow template literals on colors and modifiers (#341) Disallow template literals on colors and modifiers Feb 2, 2020
@sindresorhus sindresorhus changed the title Disallow template literals on colors and modifiers Disallow template literals on colors and modifiers in the TypeScript types Feb 2, 2020
@sindresorhus
Copy link
Copy Markdown
Member

@ExE-Boss Can you help review?

@ExE-Boss
Copy link
Copy Markdown
Contributor

ExE-Boss commented Feb 2, 2020

This won’t fix #341, this just makes the TypeScript type definition mark attempting it as an error until #341 is implemented.

This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
*/
declare const chalk: chalk.Chalk & chalk.ChalkFunction & {
declare const chalk: chalk.Chalk & chalk.ChalkFunction & chalk.ChalkTemplateFunction & {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't & chalk.ChalkFunction & chalk.ChalkTemplateFunction moot here as chalk.Chalk already extend those?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template literals are unsupported for nested calls

3 participants