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

Downlevel type modifiers on import/export names for TS <4.5 #67

Merged
merged 3 commits into from
Feb 26, 2022
Merged

Downlevel type modifiers on import/export names for TS <4.5 #67

merged 3 commits into from
Feb 26, 2022

Conversation

sisp
Copy link
Contributor

@sisp sisp commented Feb 17, 2022

This PR adds support for downleveling type modifiers on import names introduced in TS 4.5.

Please feel free to request any changes, it's my first contribution to this project and first time using the TS API. One remark: The copyComment helper function seems to have a bug, it does not correctly preserve comments (see the test files).

Closes #66.

@sisp sisp requested a review from sandersn as a code owner February 17, 2022 10:59
@simmo
Copy link

simmo commented Feb 17, 2022

This is great! Do you think this should also cover export { type example }?

@sisp
Copy link
Contributor Author

sisp commented Feb 18, 2022

Good point, I'll add a commit with support for exports.

@sisp
Copy link
Contributor Author

sisp commented Feb 18, 2022

Done (see 62bbbe3).

@sisp sisp changed the title Downlevel type modifiers on import names for TS <4.5 Downlevel type modifiers on import/export names for TS <4.5 Feb 18, 2022
@sandersn sandersn merged commit 27f583e into sandersn:master Feb 26, 2022
@sisp sisp deleted the downlevel-type-modifiers-on-import-names branch February 26, 2022 18:43
@sisp sisp mentioned this pull request Feb 27, 2022
@sandersn
Copy link
Owner

downlevel-dts@0.9.0 is now published with this change (and the new tests, thanks for those too).

@sisp
Copy link
Contributor Author

sisp commented Feb 28, 2022

Awesome, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add downleveling of type modifiers on import names (TS 4.5+)
3 participants