Skip to content

Commit 745a34c

Browse files
committed
fix type errors in compiler
1 parent e848beb commit 745a34c

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/compiler/moduleSpecifiers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ namespace ts.moduleSpecifiers {
463463
}
464464

465465
function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCanonicalFileName, sourceDirectory }: Info, host: ModuleSpecifierResolutionHost, options: CompilerOptions, packageNameOnly?: boolean): string | undefined {
466-
if (!host.fileExists || !host.readFile) {
466+
if (!host.readFile) {
467467
return undefined;
468468
}
469469
const parts: NodeModulePathParts = getNodeModulePathParts(path)!;
@@ -563,7 +563,6 @@ namespace ts.moduleSpecifiers {
563563
}
564564

565565
function tryGetAnyFileFromPath(host: ModuleSpecifierResolutionHost, path: string) {
566-
if (!host.fileExists) return;
567566
// We check all js, `node` and `json` extensions in addition to TS, since node module resolution would also choose those over the directory
568567
const extensions = getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: ScriptKind.JSON }]);
569568
for (const e of extensions) {

src/compiler/sys.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ namespace ts {
7878

7979
/* @internal */
8080
export function setCustomPollingValues(system: System) {
81-
if (!system.getEnvironmentVariable) {
82-
return;
83-
}
8481
const pollingIntervalChanged = setCustomLevels("TSC_WATCH_POLLINGINTERVAL", PollingInterval);
8582
pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
8683
unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || unchangedPollThresholds;

0 commit comments

Comments
 (0)