__Expected behavior:__
I expect the same type inference/autocompletion when using createUseStyles that I get when I use the style attribute in jsx. Here you can see the autocompletion offered on <div style...

__Describe the bug:__
There is no autocompletion when using createUseStyles

I'm a little bit confused because it appears as though a PR was merged to fix this behaviour but it doesn't seem to be working: https://github.com/cssinjs/jss/pull/1352
@moshest is the behavior you were aiming to fix with that PR? or am I misunderstanding something?
__Codesandbox link:__
https://codesandbox.io/s/react-jss-ts-13cqf
__Versions (please complete the following information):__
Honestly it's hard to follow. A few changes made since this PR and maybe it broken again.
This is the current status:
export type JssStyle =
| {
[K in keyof NormalCssProperties]:
| NormalCssValues<K>
| JssStyle
| Func<NormalCssValues<K> | JssStyle | undefined>
| Observable<NormalCssValues<K> | JssStyle | undefined>
}
| {
[K: string]:
| JssValue
| JssStyle
| Func<JssValue | JssStyle | undefined>
| Observable<JssValue | JssStyle | undefined>
}
This is the working PR version:
export type JssStyle = {
[K in keyof NormalCssProperties | string]:
| NormalCssValues<K>
| JssStyle
| Func<NormalCssValues<K> | JssStyle | undefined>
}
Can you change the declaration locally and check if that fixes it for you?
@moshest when I make the change you suggested I see no change.
I also changed Styles to match what it was in your PR:
export type Styles<Name extends string | number | symbol = string> = Record<
Name,
JssStyle | string | Func<JssStyle | string | null | undefined>
>
But it's still not working.
I even updated my codesandbox to use the version where this was supposed to have been fixed (10.3.0), but I still get no autocomplete.
Well it needs further investigating.
I can share that I did this fix on TypeScript 3.x and the attached test file on the PR worked with autocomplete in WebStorm.
I will update if I will find some time to look into that and apply a new fix. Feel free to dive in in the meantime.
@moshest I have added you to the core team since you have contributed to many typescript changes already, so you can review and merge them as you see fit, feel free to ping me if anything in twitter dm https://twitter.com/kof
I believe https://github.com/cssinjs/jss/pull/1423 has fixed this issue and now works correctly in 10.5.1
Most helpful comment
@moshest I have added you to the core team since you have contributed to many typescript changes already, so you can review and merge them as you see fit, feel free to ping me if anything in twitter dm https://twitter.com/kof