-
Notifications
You must be signed in to change notification settings - Fork 22
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
TypeChecking (CI): issue with 3rd party libraries #972
Labels
bug
Something isn't working
maintenance
Code refactoring, project structure, dev tooling (storybook, dev server, npm tasks...)
Comments
florian-sanders-cc
added a commit
that referenced
this issue
Mar 4, 2024
Fixes #972 chore(tsconfig-ci): tmp dark magic to solve TypeChecking issue TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies yay). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours (which is SO stupid in my noob opinion). I went for another solution that apparently tells TypeScript to only check our `d.ts` and `node` types ("node" here could be any other 3rd party as long as it does not contain errors). I have no idea about the drawbacks of this solution and I do not fully understand it. fix(tsconfig): fixup
florian-sanders-cc
added a commit
that referenced
this issue
Mar 4, 2024
Fixes #972 chore(tsconfig-ci): tmp dark magic to solve TypeChecking issue TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies yay). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours (which is SO stupid in my noob opinion). I went for another solution that apparently tells TypeScript to only check our `d.ts` and `node` types ("node" here could be any other 3rd party as long as it does not contain errors). I have no idea about the drawbacks of this solution and I do not fully understand it. fix(tsconfig): fixup
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
florian-sanders-cc
added a commit
that referenced
this issue
Mar 5, 2024
TypeScript always checks all types found in the `node_modules/@types` folder. It looks like with the new storybook version, some types in there are in conflict and contain mistakes (storybook & react dependencies). The common solution is to use `skipLibCheck: true` but this disables typechecking for all `d.ts` files, including ours. Fixes #972
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
maintenance
Code refactoring, project structure, dev tooling (storybook, dev server, npm tasks...)
Context
With the latest Storybook upgrade (7.0, see #952), it looks like CI TypeChecking is broken.
What's going on?
d.ts
files from thenode_modules/@types
folder (see https://www.typescriptlang.org/tsconfig#types),We cannot solve these errors sicne they are related to 3rd party libraries imported by Storybook.
The typical solution
Usually, people set
skipLibCheck
totrue
.This improves performances and prevents 3rd party libraries from making your compilation / typechecking fail.
Unfortunately, this also means our own
d.ts
files are no longer typechecked.Since we actually hand-author these
d.ts
files, we think it's critical they are typechecked like the rest of our code.What we'd like
We would like to be able to exclude the offending types from our typechecking.
Unfortunately, this does not seem to be possible at the moment (microsoft/TypeScript#30511) because we're in a case that is not officially supported by TypeScript:
What can we do?
Instead of excluding the types, we can declare types we want to be included thanks to the
types
option (see https://www.typescriptlang.org/tsconfig#types).This is cumbersome because we need to manually add types.
At the moment, we only typecheck the
src/lib/utils.js
file and it looks like the only type we need to import isnode
so we'll go with that.We will gradually add types to the list as we need them and if it starts to become painful to maintain, we might need to consider another option, perhaps even the
skiLibCheck: true
solution.EDIT: we had to go with
skipLibCheck
because the solution with thetypes
option failed when upgrading some of our dependencies. One of our dependencies is bringingts4.8
types innode
types and this node lib cannot be checked with our current TypeScript version (~4.3.2).The text was updated successfully, but these errors were encountered: