TS: Error with @font-face
and @import
rules in globalCss
function
#803
Labels
@font-face
and @import
rules in globalCss
function
#803
Bug report
Describe the bug
Using
@font-face
and@import
rules inglobalCss
function results in type errors.To Reproduce
https://codesandbox.io/s/withered-meadow-j4hcj
Expected behavior
No type errors as it used to be in previous releases.
System information
Additional context
I stumbled upon this error while working on my Next.js project after updating from v1.1.0 to v1.2.0. I've managed to reproduce the error using Code Sandbox with React TypeScript template. I'm pretty sure the bug is related to changes made in #793 though those type definitions are too complex for me to come up with a fix.
Error message produced by TypeScript is quite long. There are two sentences that stand out in my opinion:
With
@import
rule bothstring
andstring[]
values result in type errors whereas@font-face
rule only produces an error with array of objects. Additionally hovering over@font-face
key in VSCode shows that it is of typeunknown
while I believe it should actually beAtRule.FontFace | AtRule.FontFace[]
.The text was updated successfully, but these errors were encountered: