Lil’ TypeScript tip: Instead of using `@ts-ignore` for stuff you don’t feel like fixing rn, use `@ts-expect-error`.
When you do fix the issue, `@ts-expect-error` will *itself* become an error (which you can fix by deleting the comment).
That way, you avoid stale ignores that aren’t needed anymore.
When you do fix the issue, `@ts-expect-error` will *itself* become an error (which you can fix by deleting the comment).
That way, you avoid stale ignores that aren’t needed anymore.
Comments
Think this is the one! ☝️
'@ts-expect-error the rows have an id by definition of the query"
Do the same for eslint-disable etc. The people reading your code will appreciate it.
I wish Typescript had a config option to disable ignore comments.
Sometimes bad code is good enough code.
And don't forget to open up PRs to fix!