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

feat: Add dtsLiteral to config to write literal types #28

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

skjalgepalg
Copy link
Collaborator

Declared literal types allow consumers to create more rigid type guards in their projects.

Moves the proposed literal types addition proposed in nrkno/core-icons#303 to a feature of svg-to-js and added @torgeilo as co-author.

This change constitutes a minor change to the package.

Note: Made a couple of attempts to use the typescript compiler to verify that the generated .d.ts -strings are valid types within the jest test-rig to no immediate avail, so the changes are tested manually. Would love some input on how we can validate the syntax generated by a library, and not the types of the library itself.

Declared literal types allow consumers to create more rigid type guards in their projects

Co-authored-by: Torgeir Lorange Østby <[email protected]>
Copy link
Member

@cristobal cristobal left a comment

Choose a reason for hiding this comment

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

👍

@skjalgepalg skjalgepalg merged commit f16f8c1 into master Aug 15, 2024
1 check passed
@skjalgepalg skjalgepalg deleted the add-literal-dts branch August 15, 2024 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants