File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -965,7 +965,7 @@ namespace ts {
965965 // Escape the name in the "require(...)" clause to ensure we find the right symbol.
966966 let moduleName = escapeIdentifier(moduleReferenceLiteral.text);
967967
968- if (! moduleName) {
968+ if (moduleName === undefined ) {
969969 return;
970970 }
971971 let isRelative = isExternalModuleNameRelative(moduleName);
Original file line number Diff line number Diff line change 1+ tests/cases/compiler/emptyModuleName.ts(1,20): error TS2307: Cannot find module ''.
2+
3+
4+ ==== tests/cases/compiler/emptyModuleName.ts (1 errors) ====
5+ import * as A from "";
6+ ~~
7+ !!! error TS2307: Cannot find module ''.
8+ class B extends A {
9+ }
Original file line number Diff line number Diff line change 1+ //// [emptyModuleName.ts]
2+ import * as A from "" ;
3+ class B extends A {
4+ }
5+
6+ //// [emptyModuleName.js]
7+ var __extends = ( this && this . __extends ) || function ( d , b ) {
8+ for ( var p in b ) if ( b . hasOwnProperty ( p ) ) d [ p ] = b [ p ] ;
9+ function __ ( ) { this . constructor = d ; }
10+ d . prototype = b === null ? Object . create ( b ) : ( __ . prototype = b . prototype , new __ ( ) ) ;
11+ } ;
12+ var A = require ( "" ) ;
13+ var B = ( function ( _super ) {
14+ __extends ( B , _super ) ;
15+ function B ( ) {
16+ _super . apply ( this , arguments ) ;
17+ }
18+ return B ;
19+ } ) ( A ) ;
Original file line number Diff line number Diff line change 1+ // @module : commonjs
2+ import * as A from "" ;
3+ class B extends A {
4+ }
You can’t perform that action at this time.
0 commit comments