Skip to content

Commit 9bcbc97

Browse files
author
Andy
authored
Replace 'isSourceFileJavaScript(getSourceFileOfNode())' with 'NodeFlags.JavaScriptFile' (#17835)
1 parent 54af8aa commit 9bcbc97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19655,7 +19655,7 @@ namespace ts {
1965519655
// checkFunctionOrConstructorSymbol wouldn't be called if we didnt ignore javascript function.
1965619656
const firstDeclaration = find(localSymbol.declarations,
1965719657
// Get first non javascript function declaration
19658-
declaration => declaration.kind === node.kind && !isSourceFileJavaScript(getSourceFileOfNode(declaration)));
19658+
declaration => declaration.kind === node.kind && !(declaration.flags & NodeFlags.JavaScriptFile));
1965919659

1966019660
// Only type check the symbol once
1966119661
if (node === firstDeclaration) {

0 commit comments

Comments
 (0)