New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to class-based construction #188
Comments
Class syntax requires |
True. Should |
@sindresorhus @Qix- I can take this! implement the new instance function |
@wuweiweiwu Sure, go ahead. Just make sure you run the benchmark so Chalk doesn't regress in performance. |
@sindresorhus I have a question. I was planning adding a new function |
Let me complete this task |
@shaoron please do! |
@issuehuntfest has funded $60.00 to this issue. See it on IssueHunt |
@tom-sherman has submitted a pull request. See it on IssueHunt |
@IssueHuntBot don't care about seeing funding status - that's cool and all - but we can already see when people submit PRs. Don't need you to mirror that data, it just causes noise. cc @Rokt33r |
@sindresorhus has rewarded $54.00 to @tom-sherman. See it on IssueHunt
|
@sindresorhus right now, we use a traditional function/prototype build up of the Chalk class.
This has the negative side effect that in order to enable templating on custom contexts, you have to omit
new
- which is counterintuitive.Unless I'm mistaken, we can leverage
constructor()
's ability to return a completely different object (even withnew
) to allow templates on all new chalk functions.Is this something we should do?
// cc @sindresorhus
The text was updated successfully, but these errors were encountered: