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

fix: Better use of @ts-expect-error #6038

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Jun 2, 2020

Fixes #6033

There was a significant amount of overuse of @ts-ignore or @ts-expect-error in the code base. As found in #6033 this can cause problems. We should really only ever ignore or expect TypeScript errors when it is a legitimate limitation of TypeScript (which is rare), not to work around the type system. There are sufficient tools to work around the type system which are not then specific to the configuration of the compiler, like using the any keyword. It is better to use the any hammer and adjust the linting rules, then it is to just "ignore" errors in TypeScript.

In a lot of cases that were fixed, better typing was all that was required.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit 3fe6bc1 into denoland:master Jun 2, 2020
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Jun 5, 2020
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
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

Successfully merging this pull request may close these issues.

@ts-expect-error directive breaks under non-strict tsconfig
2 participants