Skip to content
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

TS: Color should accept text of any type #95

Open
tukusejssirs opened this issue Jun 22, 2022 · 1 comment
Open

TS: Color should accept text of any type #95

tukusejssirs opened this issue Jun 22, 2022 · 1 comment

Comments

@tukusejssirs
Copy link

I tried to colour a message like red(true), but TS warned me that Color needs to be string | number (index.d.ts (L2)).

I think that it should be of any type, just like console.log() or Logger from @nestjs/common can accept them.

I haven’t looked much into your code, but if you really need string | number, you could use JSON.stringify() on other types, however, I think it could be done without it.

@jorgebucaran
Copy link
Owner

I understand the issue that you are having, but wouldn't this be a bad practice?

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

No branches or pull requests

2 participants