Description
To add tsdoc comments to the generated type definitions, containing the contents of a token's description.
Problem Statement/Justification
Consider a design system that has semantic spacing units. While it's best to focus on the semantic tokens, sometimes it's very helpful to know the underlying unit. That space.04 === 4px.
TSDoc allows annotations with /* */ comments, so these could contain the token's description.
This would be a great DX as developers can see immediately what the values are, or other useful information such as common uses, provided they're added to config.
With this config, the descriptions could appear:
spacing: {
'space.01': { value: '4px', description: '4px' },
'space.02': { value: '8px', description: '8px' },
Proposed Solution or API
To add tsdoc comments to the generated code.
Alternatives
No response
Additional Information
No response
Description
To add tsdoc comments to the generated type definitions, containing the contents of a token's description.
Problem Statement/Justification
Consider a design system that has semantic spacing units. While it's best to focus on the semantic tokens, sometimes it's very helpful to know the underlying unit. That
space.04 === 4px.TSDoc allows annotations with
/* */comments, so these could contain the token's description.This would be a great DX as developers can see immediately what the values are, or other useful information such as common uses, provided they're added to config.
With this config, the descriptions could appear:
Proposed Solution or API
To add tsdoc comments to the generated code.
Alternatives
No response
Additional Information
No response