TS errors with styled-engine-sc and skipLibCheck: false
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Steps to reproduce 🕹
Steps:
git clone https://github.com/jscheid/mui-sc-lib-check
cd mui-sc-lib-check
yarn
yarn tsc
Current behavior 😯
TS compilation errors: https://gist.github.com/jscheid/c2debf024f6683153de705520e8f5ca6
Expected behavior 🤔
No errors.
Context 🔦
This is only an issue with skipLibCheck: false in tsconfig.json. When skipping lib checks, no errors appear.
It could be something I’m doing wrong? Specifically I’m not sure about including @types/styled-components, which I didn’t see recommended anywhere. However, when I leave it out I’m getting a different set of errors.
Obviously this is easy to work around by setting skipLibCheck but I’d prefer to be able to enable these checks.
Your environment 🌎
See repo.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
skipLibCheck false resolving incorrect third party type alias ...
Currently trying to figure out why I need "skipLibCheck": true in order for compiler to resolve and emit the correct imported type alias....
Read more >Understanding TypeScript's skipLibCheck Once and For All
When skipLibCheck is enabled, tsc will ignore all errors coming from declaration files ( d.ts ). Some types may be treated as any...
Read more >TSConfig Option: skipLibCheck - TypeScript
A common case where you might think to use skipLibCheck is when there are two copies of a library's types in your node_modules...
Read more >TypeScript skipLibCheck still checking node_modules libs
If I set skipLibCheck to false, and build the project, I'll have MANY more errors. So seems like the skipLibcheck works partially. Any...
Read more >TypeScript: the skipLibCheck Option Explained
Enabling the skipLibCheck option instructs the compiler to skip type checking of all declaration ( *.d.ts ) files. This includes the *.d.ts ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mnajdova thanks!
@vanyaxk thanks but this issue is specifically about typings with
@mui/styled-engine-scas described here, sorry if I haven’t made that clear enough.Your documentation offers multiple different methods of installing
styled-engine-sc:The example that you refer to only shows that it works with the Webpack method.
Is the Yarn method still supported? If so, there is still a bug here because when using that method you’re getting typing errors. If it’s no longer supported, it should probably be removed from the documentation.