Replace 'isSourceFileJavaScript(getSourceFileOfNode())' with 'NodeFlags.JavaScriptFile' (#17835)

This commit is contained in:
Andy 2017-08-16 14:48:46 -07:00 committed by GitHub
parent 54af8aa945
commit 9bcbc97e14

View file

@ -19655,7 +19655,7 @@ namespace ts {
// checkFunctionOrConstructorSymbol wouldn't be called if we didnt ignore javascript function.
const firstDeclaration = find(localSymbol.declarations,
// Get first non javascript function declaration
declaration => declaration.kind === node.kind && !isSourceFileJavaScript(getSourceFileOfNode(declaration)));
declaration => declaration.kind === node.kind && !(declaration.flags & NodeFlags.JavaScriptFile));
// Only type check the symbol once
if (node === firstDeclaration) {