Skip to content

make auto-complete of createUseStyles value work#1454

Merged
kof merged 1 commit intocssinjs:masterfrom
k-yle:ts-auto-complete
Feb 20, 2021
Merged

make auto-complete of createUseStyles value work#1454
kof merged 1 commit intocssinjs:masterfrom
k-yle:ts-auto-complete

Conversation

@k-yle
Copy link
Copy Markdown
Member

@k-yle k-yle commented Feb 17, 2021

Corresponding issue (if exists):

Closes #1439, Closes #1452, Closes #806, possibly fixes #776

What would you like to add/fix?

Make auto-complete work for Typescript and/or VSCode users like in this screenshot:

image

This is not a breaking change. In the example above, folks can still type display: "dhgjdkfhg" and TS will accept it. This PR only makes auto-complete work. It deliberately doesn't add type-safety because that needs to wait for a semver-major release.

Todo

  • Add test that verifies the modified behaviour - Not possible unfortunately
  • Add documentation if it changes public API - not needed

@k-yle k-yle requested a review from kof as a code owner February 17, 2021 02:06
@kof kof requested a review from moshest February 17, 2021 09:32
Copy link
Copy Markdown
Member

@moshest moshest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice hack.

Worth mention this fix is related to microsoft/TypeScript#29729

@kof kof merged commit 1f25942 into cssinjs:master Feb 20, 2021
@kof
Copy link
Copy Markdown
Member

kof commented Feb 20, 2021

merged, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants