Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[design-tokens] Add types for JS tokens #109

Closed
laurenbarker opened this issue Aug 4, 2020 · 0 comments · Fixed by #125
Closed

[design-tokens] Add types for JS tokens #109

laurenbarker opened this issue Aug 4, 2020 · 0 comments · Fixed by #125
Assignees
Labels
🔑 tokens Issues and work related to Design Tokens

Comments

@laurenbarker
Copy link
Collaborator

What

Add types for JS tokens. See amzn/style-dictionary#425 (comment) for an example of how we can generate type files.

Why

Since we will be using the tokens in TS files, we need a type declaration file for the JS tokens.

@laurenbarker laurenbarker added the 🔑 tokens Issues and work related to Design Tokens label Aug 4, 2020
@nathanstilwell nathanstilwell self-assigned this Sep 10, 2020
nathanstilwell pushed a commit that referenced this issue Sep 21, 2020
* Adding types for design tokens

Generating a tokens.d.ts file for TypeScript support in applications. It
turns out that TypeScipt can infer types from exports that have
primative types, so we are just generating a duplicate of tokens.js with
a `.d.ts` extension and identifying it as `types` in package.json.

fixes #109

* README update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔑 tokens Issues and work related to Design Tokens
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants