Skip to content

Commit

Permalink
additioanl node16 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Nov 22, 2023
1 parent aa87a3b commit 8eb3e2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Expand Up @@ -8386,7 +8386,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Node16 || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.NodeNext) {
// We might be able to write a portable import type using a mode override; try specifier generation again, but with a different mode set
const swappedMode = contextFile?.impliedNodeFormat === ModuleKind.ESNext ? ModuleKind.CommonJS : ModuleKind.ESNext;
specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
specifier = getSpecifierForModuleSymbolSpecial(chain[0], context, swappedMode);

if (specifier.includes("/node_modules/")) {
// Still unreachable :(
Expand Down

0 comments on commit 8eb3e2f

Please sign in to comment.