mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Update the resolveName symbol flags for 'require' resolution
This commit is contained in:
parent
a830c844b7
commit
28899f3860
@ -12538,7 +12538,7 @@ namespace ts {
|
||||
if (isInJavaScriptFile(node) &&
|
||||
isRequireCall(node, /*checkArgumentIsStringLiteral*/true) &&
|
||||
// Make sure require is not a local function
|
||||
!resolveName(node.expression, (<Identifier>node.expression).text, SymbolFlags.Value | SymbolFlags.ExportValue, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined)) {
|
||||
!resolveName(node.expression, (<Identifier>node.expression).text, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined)) {
|
||||
return resolveExternalModuleTypeByLiteral(<StringLiteral>node.arguments[0]);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user