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
Typescript emits the helper with the same name (__awaiter) causing a name conflict with existing declarations, but the emitted references point to __awaiter_1, generating in fact, JS that errors at runtime, with "__awaiter_1 is undeclarated".
I want to point out that the conflict with inlined ts helpers comes after bundling dependencies that already have the helpers inlined, so it's not really up to the user to prevent the conflict by choosing a different function name.
Seems like this issue was introduced at some point in 3.6.x, since it was working fine in 3.5.3.
TypeScript Version: 3.6.3 and Nightly
Search Terms: helpers name conflict
Code
Expected behavior:
The generated helpers declarations include an "id" to prevent the name conflict, and the references to the helpers point to the new name.
Actual behavior:
Typescript emits the helper with the same name (
__awaiter
) causing a name conflict with existing declarations, but the emitted references point to__awaiter_1
, generating in fact, JS that errors at runtime, with "__awaiter_1 is undeclarated".Playground Link: https://www.typescriptlang.org/play/index.html?target=3&ts=3.6.3#code/PTAEBUAsEsGdQMYHsC2BTeAzATq0BDUAIwFcA7AEwBs0LQK0AHNSlhATwChNyEAXaEjKgA+iPwB3fND5psACgCUoAN6gAvp04gIkNKADmLOfll1kDADShsaTHLYYCoMkIC0aAB5wBZA6PEpGTkRAEZOfFh2MgRQHhiBITjeJVVOTSA
The text was updated successfully, but these errors were encountered: