Skip to content

Commit 8e1fa48

Browse files
authored
fix: remove unnecessary code (#36)
1 parent 4129185 commit 8e1fa48

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/ts.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -292,16 +292,6 @@ export class TSService {
292292
current: true,
293293
});
294294
}
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-
}
305295
if (isVirtualTSX(fileName, extraFileExtensions)) {
306296
const dts = toExtraDtsFileName(normalized, extraFileExtensions);
307297
if (original.fileExists.call(watchCompilerHost, dts)) {
@@ -457,17 +447,6 @@ function toRealFileName(fileName: string, extraFileExtensions: string[]) {
457447
return fileName;
458448
}
459449

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-
471450
/** Checks the given filename has extra extension or not. */
472451
function isExtra(fileName: string, extraFileExtensions: string[]): boolean {
473452
for (const extraFileExtension of extraFileExtensions) {

0 commit comments

Comments
 (0)