File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1089,10 +1089,11 @@ namespace ts {
10891089 export function isRequireCall ( expression : Node , checkArgumentIsStringLiteral : boolean ) : expression is CallExpression {
10901090 // of the form 'require("name")'
10911091 const isRequire = expression . kind === SyntaxKind . CallExpression &&
1092- ( < CallExpression > expression ) . expression . kind === SyntaxKind . Identifier &&
1093- ( < Identifier > ( < CallExpression > expression ) . expression ) . text === "require" &&
1094- ( < CallExpression > expression ) . arguments . length === 1 ;
1095- return isRequire && ( ! checkArgumentIsStringLiteral || ( < CallExpression > expression ) . arguments [ 0 ] . kind === SyntaxKind . StringLiteral ) ;
1092+ ( < CallExpression > expression ) . expression . kind === SyntaxKind . Identifier &&
1093+ ( < Identifier > ( < CallExpression > expression ) . expression ) . text === "require" &&
1094+ ( < CallExpression > expression ) . arguments . length === 1 ;
1095+
1096+ return isRequire && ( ! checkArgumentIsStringLiteral || ( < CallExpression > expression ) . arguments [ 0 ] . kind === SyntaxKind . StringLiteral ) ;
10961097 }
10971098
10981099 /// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property
You can’t perform that action at this time.
0 commit comments