cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.08k stars 399 forks source link

fix: jssStyle type #1423

Closed hosseinmd closed 4 years ago

hosseinmd commented 4 years ago

typescript can't work with [K in keyof NormalCssProperties | string]

Corresponding issue (if exists):

What would you like to add/fix?

type definition

Todo

kof commented 4 years ago

What is the actual error compiler was reporting? This fix seems fishy, need some ts experts to confirm cc @moshest

hosseinmd commented 4 years ago

the bug is where intellisense no suggestions can't suggest CSS Properties.

hosseinmd commented 4 years ago

Because we tell them k is CSS properties or string, which means any string.

kof commented 4 years ago

oh I see, that makes sense

moshest commented 4 years ago

Why we remove there the Observable<NormalCssValues<K> | JssStyle | undefined> part?

hosseinmd commented 4 years ago

Why we remove there the Observable<NormalCssValues<K> | JssStyle | undefined> part?

Hi, You are right, that is my mistake, I fix that.

hosseinmd commented 4 years ago

@kof please review the last commit

moshest commented 4 years ago

lgtm

kof commented 4 years ago

merged, thanks

hosseinmd commented 3 years ago

Could you please publish master?

hosseinmd commented 3 years ago

Please publish

kof commented 3 years ago

Released https://github.com/cssinjs/jss/releases/tag/v10.5.1