File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -18436,6 +18436,9 @@ namespace ts {
18436
18436
(<ImportDeclaration>node.parent).moduleSpecifier === node)) {
18437
18437
return resolveExternalModuleName(node, <LiteralExpression>node);
18438
18438
}
18439
+ if (isInJavaScriptFile(node) && isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) {
18440
+ return resolveExternalModuleName(node, <LiteralExpression>node);
18441
+ }
18439
18442
// Fall through
18440
18443
18441
18444
case SyntaxKind.NumericLiteral:
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ // @allowJs : true
4
+ // @Filename : foo.js
5
+ /////*2*/module.exports = {};
6
+
7
+ // @Filename : bar.js
8
+ ////var x = require(/*1*/"./foo");
9
+
10
+ debugger ;
11
+ verify . goToDefinition ( "1" , "2" ) ;
You can’t perform that action at this time.
0 commit comments