emotion: @emotion/serialize/types/index.ts TS2411: error
Current behavior:
TypeScript compiler throws numerous errors related to CSSInterpolation:
node_modules/@emotion/serialize/types/index.d.ts:37:18 - error TS2411: Property 'zoom' of type 'Zoom | readonly NonNullable<Zoom | undefined>[] | ("normal" | "reset" | (string & {}) | Globals)[] | undefined' is not assignable to 'string' index type 'CSSInterpolation'.
Found 825 errors in the same file, starting at: node_modules/@emotion/serialize/types/index.d.ts:37
Using TS version 5.3.2
Not sure what changed but suddenly index.d.ts appered under node_modules/@emotion/serialize/types even though we have been using same version 1.1.2 all the time (or actually it’s dependency of react-select)
└─┬ react-select@5.7.2 └─┬ @emotion/react@11.11.1 ├─┬ @emotion/babel-plugin@11.11.0 │ └── @emotion/serialize@1.1.2 deduped └── @emotion/serialize@1.1.2
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Reactions: 19
- Comments: 17 (2 by maintainers)
Commits related to this issue
- Add csstype version override to fix @emotion/serialize type checking error See https://github.com/emotion-js/emotion/issues/3136 — committed to ASL-19/emotion-utils by GrantASL19 7 months ago
- Change `Array` to `ReadonlyArray` in CSS type declarations, according to change in `csstype` (issue #3136) — committed to Cerber-Ursi/emotion by Cerber-Ursi 7 months ago
Having the same issue as well
This is causing the issue - https://github.com/frenic/csstype/issues/189
If anyone is looking for a workaround I used the solution in this comment pinning csstype to 3.1.2 for now. https://github.com/frenic/csstype/issues/189#issuecomment-1853012588
I was experiencing the same issue, and it was resolved by setting the skipLibCheck property to true within the compilerOptions in the tsconfig file.
I have the same issue!
Fixed by #3141
same issue
Same issue here.