fix(ngcc): handle new __spreadArrays tslib helper (#33617)

We already have special cases for the `__spread` helper function and with this change we handle the new tslib helper introduced in version 1.10 `__spreadArrays`.

For more context see: https://github.com/microsoft/tslib/releases/tag/1.10.0

Fixes: #33614

PR Close #33617
This commit is contained in:
Alan Agius
2019-11-06 10:28:56 +01:00
committed by atscott
parent 2a4061a3fd
commit d749dd3ea1
5 changed files with 119 additions and 14 deletions

View File

@ -627,10 +627,13 @@ function getTsHelperFn(node: ts.NamedDeclaration): TsHelperFn|null {
stripDollarSuffix(node.name.text) :
null;
if (name === '__spread') {
return TsHelperFn.Spread;
} else {
return null;
switch (name) {
case '__spread':
return TsHelperFn.Spread;
case '__spreadArrays':
return TsHelperFn.SpreadArrays;
default:
return null;
}
}