Skip to content

Commit 35cfcff

Browse files
Use 'getTextOfNode'.
1 parent 392cd61 commit 35cfcff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: src/compiler/checker.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -16382,8 +16382,7 @@ namespace ts {
1638216382
}
1638316383

1638416384
if (isPotentiallyUncalledDecorator(node, callSignatures)) {
16385-
const printer = createPrinter({ removeComments: true });
16386-
const nodeStr = printer.printNode(EmitHint.Expression, node.expression, getSourceFileOfNode(node));
16385+
const nodeStr = getTextOfNode(node.expression, /*includeTrivia*/ false);
1638716386
error(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr);
1638816387
return resolveErrorCall(node);
1638916388
}

0 commit comments

Comments
 (0)