You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dreamorosi opened this issue
Oct 23, 2023
· 2 comments
· Fixed by #1765
Assignees
Labels
completedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
Currently the project does not have the isolatedModules compiler option enabled. We should look into enabling it unless it causes extensive disruption and/or it's not compatible with other existing settings.
While you can use TypeScript to produce JavaScript code from TypeScript code, it’s also common to use other transpilers such as Babel to do this. However, other transpilers only operate on a single file at a time, which means they can’t apply code transforms that depend on understanding the full type system. This restriction also applies to TypeScript’s ts.transpileModule API which is used by some build tools.
These limitations can cause runtime problems with some TypeScript features like const enums and namespaces. Setting the isolatedModules flag tells TypeScript to warn you if you write certain code that can’t be correctly interpreted by a single-file transpilation process.
It does not change the behavior of your code, or otherwise change the behavior of TypeScript’s checking and emitting process.
Why is this needed?
Enabling this feature increases the chances of being compatible with a wider range of compilers & bundlers that our customers might be using.
Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered:
dreamorosi
added
internal
PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
confirmed
The scope is clear, ready for implementation
labels
Oct 23, 2023
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
This is available in preview starting from the 2.0.0-alpha.1 release. You can install this version using the next tag, i.e. npm i @aws-lambda-powertools/logger@next.
completedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
Summary
Currently the project does not have the
isolatedModules
compiler option enabled. We should look into enabling it unless it causes extensive disruption and/or it's not compatible with other existing settings.From the TypeScript docs:
Why is this needed?
Enabling this feature increases the chances of being compatible with a wider range of compilers & bundlers that our customers might be using.
Which area does this relate to?
Other
Solution
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: