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

chore(codegen): match lib and target declarations #678

Merged

Conversation

aisamu
Copy link
Contributor

@aisamu aisamu commented Jan 26, 2023

lib declarations targeting standards newer than the target are useful when one polyfills missing features.

lib declarations targeting older standards are constraining in a strange way: we emit code relying on newer features, but types prevent us from using them

Since were are already emitting es2018 code, we can target that standard for the types as well.

This is a spin-off of @eduardomourar's #667

Co-authored-by: Eduardo Rodrigues eduardomourar@users.noreply.github.com

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

`lib` declarations targeting standards newer than the `target` are
useful when one polyfills missing features.

`lib` declarations targeting _older_ standards are constraining in a
strange way: we emit code relying on newer features, but types prevent
us from using them

Since were are already emitting `es2018` code, we can target that
standard for the types as well.

This is a spin-off of @eduardomourar's smithy-lang#667

Co-authored-by: Eduardo Rodrigues <eduardomourar@users.noreply.github.com>
@aisamu aisamu requested a review from a team as a code owner January 26, 2023 21:40
@srchase srchase merged commit 366c0fd into smithy-lang:main Feb 3, 2023
srchase pushed a commit to srchase/smithy-typescript that referenced this pull request Mar 17, 2023
`lib` declarations targeting standards newer than the `target` are
useful when one polyfills missing features.

`lib` declarations targeting _older_ standards are constraining in a
strange way: we emit code relying on newer features, but types prevent
us from using them

Since were are already emitting `es2018` code, we can target that
standard for the types as well.

This is a spin-off of @eduardomourar's smithy-lang#667

Co-authored-by: Eduardo Rodrigues <eduardomourar@users.noreply.github.com>
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.

None yet

2 participants