Skip to content

Commit bbd556e

Browse files
alan-agius4kara
authored andcommitted
test: enable importHelpers for UMD builds (angular#36989)
This is a workaround for a TS 3.9 regression microsoft/TypeScript#38501 where the emitted `__exportStar` helpers have a missing semi-colon at the end of the unnamed function, when targetting UMD, and causes the following runtime error `Uncaught TypeError: (intermediate value)(…) is not a function`. This is because the anonymous `__exportStar` function will be invoked with the function on the next like as the parameter which is subsequently invoking whatever was returned. To get around this TS bug, add `importHelpers: true` in your tsconfig. This also, is recommanded to avoid multiple copies of the same helper being inlined, which might cause increase in bundle size. PR Close angular#36989
1 parent 466df41 commit bbd556e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

integration/bazel/src/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"importHelpers": true,
34
"experimentalDecorators": true,
45
"lib": [
56
"dom",

packages/examples/upgrade/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"importHelpers": true,
34
"lib": ["dom", "es2015"],
45
"types": ["angular"]
56
}

0 commit comments

Comments
 (0)