Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,24 @@ function insertDebugNameIntoCallExpression(

spreadArgs.push(ts.factory.createObjectLiteralExpression([debugNameProperty]));

newArgs = [
...node.arguments,
ts.factory.createSpreadElement(
createNgDevModeConditional(
ts.factory.createArrayLiteralExpression(spreadArgs),
ts.factory.createArrayLiteralExpression(),
),
const spread = ts.factory.createSpreadElement(
createNgDevModeConditional(
ts.factory.createArrayLiteralExpression(spreadArgs),
ts.factory.createArrayLiteralExpression(),
),
];
);

// Add a `ts-ignore` on the spread, because it may raise an error that we don't
// have a spread argument in the signature for the specific signal. We don't update
// the source to add the signature to avoid making it harder to read.
ts.addSyntheticLeadingComment(
spread,
ts.SyntaxKind.MultiLineCommentTrivia,
' @ts-ignore ',
true,
);

newArgs = [...node.arguments, spread];
}

return ts.factory.updateCallExpression(node, node.expression, node.typeArguments, newArgs);
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler-cli/src/ngtsc/transform/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class IvyTransformationVisitor extends Visitor {
node,
combinedModifiers,
node.name,
node.questionToken,
node.questionToken || node.exclamationToken,
node.type,
node.initializer,
) as T & ts.PropertyDeclaration;
Expand Down
Loading
Loading