@@ -1621,7 +1621,7 @@ namespace Parser {
1621
1621
var parseErrorBeforeNextFinishedNode = false;
1622
1622
/* eslint-enable no-var */
1623
1623
1624
- const tsPlusExternalTypeCache = new Map<string, Record<string, TsPlusTypeDefinition[]>>()
1624
+ const tsPlusExternalTypeCache = new Map<string, Record<string, TsPlusTypeDefinition[]> | undefined >()
1625
1625
const tsPlusResolvedPathsCache = new Map<string, string[]>()
1626
1626
const tsPlusResolvedModuleCache = new Map<string, any>()
1627
1627
let currentTsPlusTypes: TsPlusTypeDefinition[] | null = null;
@@ -1975,18 +1975,18 @@ namespace Parser {
1975
1975
}
1976
1976
for (const resolvedPath of resolvedPaths) {
1977
1977
let json = tsPlusExternalTypeCache.get(resolvedPath);
1978
- if (!json ) {
1978
+ if (!tsPlusExternalTypeCache.has(resolvedPath) ) {
1979
1979
const text = sys.readFile(resolvedPath);
1980
1980
if (text) {
1981
1981
json = JSON.parse(text);
1982
- if (json) { tsPlusExternalTypeCache.set(resolvedPath, json) }
1983
1982
}
1983
+ tsPlusExternalTypeCache.set(resolvedPath, json)
1984
1984
}
1985
1985
if (!json) return;
1986
1986
for (const moduleName in json) {
1987
1987
const key = `${options.configFilePath ?? fileName}+${moduleName}`;
1988
1988
let resolvedModule = tsPlusResolvedModuleCache.get(key);
1989
- if (!resolvedModule ) {
1989
+ if (!tsPlusResolvedModuleCache.has(key) ) {
1990
1990
resolvedModule = resolveModuleName(moduleName, resolvedPath, options, sys).resolvedModule ?? resolveModuleName(moduleName, fileName, options, sys).resolvedModule;
1991
1991
tsPlusResolvedModuleCache.set(key, resolvedModule);
1992
1992
}
0 commit comments