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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user