3 ms·
This is too severe. There are reasons to need // @ts-ignore. Probably the biggest one in my experience is the inability to type functions with conditional retur
by johnfn 1y ago
This is too severe. There are reasons to need // @ts-ignore. Probably the biggest one in my experience is the inability to type functions with conditional return statements[1].
Probably a good rule of thumb is that you get to use a ts-ignore if you can link it back to an open issue on the TS repo :)
[1]: https://github.com/microsoft/TypeScript/issues/33912 https://github.com/microsoft/TypeScript/issues/33912
- prairieroadent 1y ago[dead]
- no_wizard 1y agoI have yet to run into someone who couldn't actually resolve the issue by approaching the problem in a different way. Its why I said 9.9 not 10/10, as this would be a case where would have to comment liberally, but yeah, file an issue with the repository and go from there. That said, I haven't run into this in my many years of working with TypeScript except once.