@@ -271,14 +271,13 @@ namespace ts.Completions {
271271 const span = getDirectoryFragmentTextSpan ( ( < StringLiteral > node ) . text , node . getStart ( ) + 1 ) ;
272272 let entries : CompletionEntry [ ] ;
273273 if ( isPathRelativeToScript ( literalValue ) || isRootedDiskPath ( literalValue ) ) {
274- const fileExtensionMap = host . getFileExtensionMap ? host . getFileExtensionMap ( ) : { } ;
275274 if ( compilerOptions . rootDirs ) {
276275 entries = getCompletionEntriesForDirectoryFragmentWithRootDirs (
277- compilerOptions . rootDirs , literalValue , scriptDirectory , getSupportedExtensions ( compilerOptions , fileExtensionMap ) , /*includeExtensions*/ false , span , scriptPath ) ;
276+ compilerOptions . rootDirs , literalValue , scriptDirectory , getSupportedExtensions ( compilerOptions ) , /*includeExtensions*/ false , span , scriptPath ) ;
278277 }
279278 else {
280279 entries = getCompletionEntriesForDirectoryFragment (
281- literalValue , scriptDirectory , getSupportedExtensions ( compilerOptions , fileExtensionMap ) , /*includeExtensions*/ false , span , scriptPath ) ;
280+ literalValue , scriptDirectory , getSupportedExtensions ( compilerOptions ) , /*includeExtensions*/ false , span , scriptPath ) ;
282281 }
283282 }
284283 else {
@@ -412,8 +411,7 @@ namespace ts.Completions {
412411 let result : CompletionEntry [ ] ;
413412
414413 if ( baseUrl ) {
415- const fileExtensionMap = host . getFileExtensionMap ? host . getFileExtensionMap ( ) : { } ;
416- const fileExtensions = getSupportedExtensions ( compilerOptions , fileExtensionMap ) ;
414+ const fileExtensions = getSupportedExtensions ( compilerOptions ) ;
417415 const projectDir = compilerOptions . project || host . getCurrentDirectory ( ) ;
418416 const absolute = isRootedDiskPath ( baseUrl ) ? baseUrl : combinePaths ( projectDir , baseUrl ) ;
419417 result = getCompletionEntriesForDirectoryFragment ( fragment , normalizePath ( absolute ) , fileExtensions , /*includeExtensions*/ false , span ) ;
@@ -590,8 +588,7 @@ namespace ts.Completions {
590588 if ( kind === "path" ) {
591589 // Give completions for a relative path
592590 const span : TextSpan = getDirectoryFragmentTextSpan ( toComplete , range . pos + prefix . length ) ;
593- const fileExtensionMap = host . getFileExtensionMap ? host . getFileExtensionMap ( ) : { } ;
594- completionInfo . entries = getCompletionEntriesForDirectoryFragment ( toComplete , scriptPath , getSupportedExtensions ( compilerOptions , fileExtensionMap ) , /*includeExtensions*/ true , span , sourceFile . path ) ;
591+ completionInfo . entries = getCompletionEntriesForDirectoryFragment ( toComplete , scriptPath , getSupportedExtensions ( compilerOptions ) , /*includeExtensions*/ true , span , sourceFile . path ) ;
595592 }
596593 else {
597594 // Give completions based on the typings available
0 commit comments