Skip to content

Commit

Permalink
Pick #56449 into release-5.3 (#56451)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Nov 18, 2023
1 parent e2a5d45 commit d09b1bf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Expand Up @@ -47515,7 +47515,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
if (target === unknownSymbol) {
return true;
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
}
// const enums and modules that contain only const enums are not considered values from the emit perspective
// unless 'preserveConstEnums' option is set to true
Expand Down
11 changes: 11 additions & 0 deletions src/testRunner/unittests/services/transpile.ts
Expand Up @@ -662,4 +662,15 @@ export * as alias from './file';`,
testVerbatimModuleSyntax: true,
},
);

transpilesCorrectly(
"Elides re-export of type-only import",
`
import type { Foo } from "./types";
export { Foo };
`,
{
options: { compilerOptions: { module: ts.ModuleKind.ESNext, target: ts.ScriptTarget.ESNext } },
},
);
});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d09b1bf

Please sign in to comment.