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
We want the equivalent px values of these tokens to be visible in the IDE wherever this type is used in our components for spacing based props. This way our users wouldn't need to refer the library documentation for what the final value of a token is.
Currently this is only possible by building an extension for the IDE, something similar to Tailwind CSS IntelliSense.
Suggestion
π Search Terms
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Support adding JSDoc comments for individual union constituents.
π Motivating Example
JSDoc comments for union members would appear in IDE IntelliSense (refer below example).
π» Use Cases
Consider the following type for spacing tokens in a UI library.
We want the equivalent px values of these tokens to be visible in the IDE wherever this type is used in our components for spacing based props. This way our users wouldn't need to refer the library documentation for what the final value of a token is.
Currently this is only possible by building an extension for the IDE, something similar to Tailwind CSS IntelliSense.
We're discussing workarounds here: razorpay/blade#1249
Similar use-case has also been asked on StackOverflow:
https://stackoverflow.com/questions/63067208/writing-more-descriptive-intellisense-docs-for-typescript-union-types
The text was updated successfully, but these errors were encountered: