[TypeScript] createStyles() does not have smart property hints in the vscode editor
See original GitHub issue- This is a v1.x issue (v0.x is no longer maintained).
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
Current Behavior
Context
export default function createStyles<K extends string = string>(styles: StyleRules<K>): StyleRules<K>;
Your Environment
Tech | Version |
---|---|
Material-UI | v1.2.0 |
TypeScript | v2.8.3 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:9 (6 by maintainers)
Top Results From Across the Web
[TypeScript] createStyles() does not have smart property hints ...
This is a v1.x issue (v0.x is no longer maintained). ... [TypeScript] createStyles() does not have smart property hints in the vscode editor...
Read more >TypeScript editing with Visual Studio Code
Property type inlay hints show the type of class properties that don't have an explicit type annotation. Setting: typescript.inlayHints.
Read more >TypeScript Programming with Visual Studio Code
TypeScript in Visual Studio Code. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. It offers classes, modules, and interfaces ......
Read more >TypeScript tutorial with Visual Studio Code
TypeScript tutorial in Visual Studio Code. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. It offers classes, modules, ...
Read more >IntelliSense in Visual Studio Code
Visual Studio Code IntelliSense is provided for JavaScript, TypeScript, JSON, HTML, CSS, SCSS, and Less out of the box. VS Code supports word...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pelotom using the
createStyles(...)
function breaks autocomplete inside the CSS properties. Which is the issue outlined above by the OC.A temporary workaround I’ve found if you want autocomplete on the CSS properties and inferred class keys is to just add
CSSProperties
to each class key, like so@BrendonSled yep, I was just responding to later comments. This seems like maybe an issue worth raising with the TypeScript team? I would think that if the
as CSSProperties
annotation is sufficient to get autocompletion then it should also work withcreateStyles
.