@@ -978,7 +978,7 @@ function getEmitSyntaxForUsageLocationWorker(file: Pick<SourceFile, "fileName" |
978
978
const fileEmitMode = getEmitModuleFormatOfFileWorker ( file , compilerOptions ) ;
979
979
return fileEmitMode === ModuleKind . CommonJS ? ModuleKind . CommonJS :
980
980
emitModuleKindIsNonNodeESM ( fileEmitMode ) || fileEmitMode === ModuleKind . Preserve ? ModuleKind . ESNext :
981
- undefined ;
981
+ undefined ;
982
982
}
983
983
984
984
/** @internal */
@@ -1353,8 +1353,8 @@ export function getImpliedNodeFormatForFileWorker(
1353
1353
|| pathContainsNodeModules ( fileName ) ;
1354
1354
return fileExtensionIsOneOf ( fileName , [ Extension . Dmts , Extension . Mts , Extension . Mjs ] ) ? ModuleKind . ESNext :
1355
1355
fileExtensionIsOneOf ( fileName , [ Extension . Dcts , Extension . Cts , Extension . Cjs ] ) ? ModuleKind . CommonJS :
1356
- shouldLookupFromPackageJson && fileExtensionIsOneOf ( fileName , [ Extension . Dts , Extension . Ts , Extension . Tsx , Extension . Js , Extension . Jsx ] ) ? lookupFromPackageJson ( ) :
1357
- undefined ; // other extensions, like `json` or `tsbuildinfo`, are set as `undefined` here but they should never be fed through the transformer pipeline
1356
+ shouldLookupFromPackageJson && fileExtensionIsOneOf ( fileName , [ Extension . Dts , Extension . Ts , Extension . Tsx , Extension . Js , Extension . Jsx ] ) ? lookupFromPackageJson ( ) :
1357
+ undefined ; // other extensions, like `json` or `tsbuildinfo`, are set as `undefined` here but they should never be fed through the transformer pipeline
1358
1358
1359
1359
function lookupFromPackageJson ( ) : Partial < CreateSourceFileOptions > {
1360
1360
const state = getTemporaryModuleResolutionState ( packageJsonInfoCache , host , options ) ;
@@ -2276,8 +2276,8 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro
2276
2276
Diagnostics . Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 :
2277
2277
Diagnostics . Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 :
2278
2278
oldResolved . packageId ?
2279
- Diagnostics . Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 :
2280
- Diagnostics . Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 ,
2279
+ Diagnostics . Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 :
2280
+ Diagnostics . Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 ,
2281
2281
name ,
2282
2282
containingSourceFile ? getNormalizedAbsolutePath ( containingSourceFile . originalFileName , currentDirectory ) : containingFile ,
2283
2283
oldResolved . resolvedFileName ,
@@ -4986,8 +4986,8 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host: HostForUseSource
4986
4986
4987
4987
function fileOrDirectoryExistsUsingSource ( fileOrDirectory : string , isFile : boolean ) : boolean {
4988
4988
const fileOrDirectoryExistsUsingSource = isFile ?
4989
- ( file : string ) => fileExistsIfProjectReferenceDts ( file ) :
4990
- ( dir : string ) => directoryExistsIfProjectReferenceDeclDir ( dir ) ;
4989
+ fileExistsIfProjectReferenceDts :
4990
+ directoryExistsIfProjectReferenceDeclDir ;
4991
4991
// Check current directory or file
4992
4992
const result = fileOrDirectoryExistsUsingSource ( fileOrDirectory ) ;
4993
4993
if ( result !== undefined ) return result ;
0 commit comments