Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Invalidate unnecessary 'as any' and '@ts-ignore' #37391

Closed
steida opened this issue Mar 13, 2020 · 3 comments
Closed

Invalidate unnecessary 'as any' and '@ts-ignore' #37391

steida opened this issue Mar 13, 2020 · 3 comments

Comments

@steida
Copy link

steida commented Mar 13, 2020

TypeScript type system is not easy. Errors are often undecipherable. There is no shame to use as any or @ts-ignore because YOLO is the real thing. Especially after days spent hunting compiler bugs.

But TypeScript and its ecosystem is smarter day by day. Some old as any or @ts-ignore maybe are not required anymore.

TypeScript should detect it.

@IllusionMH
Copy link
Contributor

Not sure if first one is doable or reasonable, however second point us already implemented.
Use //@ts-expect-error #36014

@AlCalzone
Copy link
Contributor

For the first one you might want to try the wotan linter.

@steida
Copy link
Author

steida commented Mar 14, 2020

@IllusionMH Thank you!

@steida steida closed this as completed Mar 14, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants