Skip to content

Commit 262fa3a

Browse files
committed
Correctly mark visibile nodes when declaration isnt explicitly turned on but composite is true
Fixes #26669
1 parent 38a85cf commit 262fa3a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/compiler/checker.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26347,7 +26347,7 @@ namespace ts {
2634726347

2634826348
function checkExportSpecifier(node: ExportSpecifier) {
2634926349
checkAliasSymbol(node);
26350-
if (compilerOptions.declaration) {
26350+
if (getEmitDeclarations(compilerOptions)) {
2635126351
collectLinkedAliases(node.propertyName || node.name, /*setVisibility*/ true);
2635226352
}
2635326353
if (!node.parent.parent.moduleSpecifier) {
@@ -26388,7 +26388,7 @@ namespace ts {
2638826388
if (node.expression.kind === SyntaxKind.Identifier) {
2638926389
markExportAsReferenced(node);
2639026390

26391-
if (compilerOptions.declaration) {
26391+
if (getEmitDeclarations(compilerOptions)) {
2639226392
collectLinkedAliases(node.expression as Identifier, /*setVisibility*/ true);
2639326393
}
2639426394
}

tests/baselines/reference/declarationEmitWithComposite.js

+3
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ exports.__esModule = true;
1111

1212

1313
//// [/foo/out/test.d.ts]
14+
interface Foo {
15+
x: number;
16+
}
1417
export default Foo;

0 commit comments

Comments
 (0)