You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
Fallbacks array with typescript styles
Describe the bug:
Using fallbacks array in style object with typescript leads to an error. If I'm using fallbacks as an object it works just fine. Also the style compiles successfully, but the typerror may lead to the pipeline fails and other messy things.
Type '{ width: string; }[]' is not assignable to type 'JssValue | JssStyle<any, undefined> | Observable<JssValue | JssStyle<any, undefined> | undefined> | ((data: any) => JssValue | ... 1 more ... | undefined)'. Type '{ width: string; }[]' is not assignable to type '(string | number | (string | number)[])[]'. Type '{ width: string; }' is not assignable to type 'string | number | (string | number)[]'. Object literal may only specify known properties, and 'width' does not exist in type '(string | number)[]'.ts(2322)
Expected behavior:
Fallbacks array with typescript styles
Describe the bug:
Using fallbacks array in style object with typescript leads to an error. If I'm using fallbacks as an object it works just fine. Also the style compiles successfully, but the typerror may lead to the pipeline fails and other messy things.
Reproduction:
https://codesandbox.io/s/jss-typescript-react-test-forked-lq0sm?file=/src/styles.ts
Versions (please complete the following information):
Feel free to add any additional versions which you may think are relevant to the bug.
The text was updated successfully, but these errors were encountered: