@@ -292,16 +292,6 @@ export class TSService {
292
292
current : true ,
293
293
} ) ;
294
294
}
295
- if ( isExtraDts ( fileName , extraFileExtensions ) ) {
296
- const real = normalizeFileName (
297
- extraDtsToExtra ( fileName , extraFileExtensions )
298
- ) ;
299
- if ( this . currTarget . filePath === real ) {
300
- // If try to read the .d.ts of the target file,
301
- // respect the target file and consider the .d.ts doesn't exist.
302
- return undefined ;
303
- }
304
- }
305
295
if ( isVirtualTSX ( fileName , extraFileExtensions ) ) {
306
296
const dts = toExtraDtsFileName ( normalized , extraFileExtensions ) ;
307
297
if ( original . fileExists . call ( watchCompilerHost , dts ) ) {
@@ -457,17 +447,6 @@ function toRealFileName(fileName: string, extraFileExtensions: string[]) {
457
447
return fileName ;
458
448
}
459
449
460
- /** If the given filename is has extra extension with d.ts, returns the real filename. */
461
- function extraDtsToExtra (
462
- fileName : string ,
463
- extraFileExtensions : string [ ]
464
- ) : string {
465
- if ( isExtraDts ( fileName , extraFileExtensions ) ) {
466
- return fileName . slice ( 0 , - 5 ) ;
467
- }
468
- return fileName ;
469
- }
470
-
471
450
/** Checks the given filename has extra extension or not. */
472
451
function isExtra ( fileName : string , extraFileExtensions : string [ ] ) : boolean {
473
452
for ( const extraFileExtension of extraFileExtensions ) {
0 commit comments