@@ -12,7 +12,7 @@ namespace ts {
12
12
}
13
13
14
14
export function getExternalModuleNameFromDeclaration ( host : EmitHost , resolver : EmitResolver , declaration : ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration ) : string {
15
- let file = resolver . getExternalModuleFileFromDeclaration ( declaration ) ;
15
+ const file = resolver . getExternalModuleFileFromDeclaration ( declaration ) ;
16
16
if ( ! file || isDeclarationFile ( file ) ) {
17
17
return undefined ;
18
18
}
@@ -355,7 +355,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
355
355
else {
356
356
forEach ( host . getSourceFiles ( ) , sourceFile => {
357
357
if ( shouldEmitToOwnFile ( sourceFile , compilerOptions ) ) {
358
- let jsFilePath = getOwnEmitOutputFilePath ( sourceFile , host , shouldEmitJsx ( sourceFile ) ? ".jsx" : ".js" ) ;
358
+ const jsFilePath = getOwnEmitOutputFilePath ( sourceFile , host , shouldEmitJsx ( sourceFile ) ? ".jsx" : ".js" ) ;
359
359
emitFile ( jsFilePath , sourceFile ) ;
360
360
}
361
361
} ) ;
@@ -616,7 +616,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
616
616
if ( compilerOptions . sourceMap || compilerOptions . inlineSourceMap ) {
617
617
initializeEmitterWithSourceMaps ( jsFilePath , root ) ;
618
618
}
619
-
619
+
620
620
if ( root ) {
621
621
// Do not call emit directly. It does not set the currentSourceFile.
622
622
emitSourceFile ( root ) ;
@@ -7372,7 +7372,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
7372
7372
}
7373
7373
7374
7374
if ( emitRelativePathAsModuleName ) {
7375
- let name = getExternalModuleNameFromDeclaration ( host , resolver , externalImports [ i ] ) ;
7375
+ const name = getExternalModuleNameFromDeclaration ( host , resolver , externalImports [ i ] ) ;
7376
7376
if ( name ) {
7377
7377
text = `"${ name } "` ;
7378
7378
}
@@ -7422,7 +7422,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
7422
7422
let externalModuleName = getExternalModuleNameText ( importNode ) ;
7423
7423
7424
7424
if ( emitRelativePathAsModuleName ) {
7425
- let name = getExternalModuleNameFromDeclaration ( host , resolver , importNode ) ;
7425
+ const name = getExternalModuleNameFromDeclaration ( host , resolver , importNode ) ;
7426
7426
if ( name ) {
7427
7427
externalModuleName = `"${ name } "` ;
7428
7428
}
0 commit comments