Correctly mark visibile nodes when declaration isnt explicitly turned on but composite is true

Fixes #26669
This commit is contained in:
Sheetal Nandi
2018-08-29 16:16:01 -07:00
parent 38a85cfbf4
commit 262fa3ac31
2 changed files with 5 additions and 2 deletions

View File

@@ -26347,7 +26347,7 @@ namespace ts {
function checkExportSpecifier(node: ExportSpecifier) {
checkAliasSymbol(node);
if (compilerOptions.declaration) {
if (getEmitDeclarations(compilerOptions)) {
collectLinkedAliases(node.propertyName || node.name, /*setVisibility*/ true);
}
if (!node.parent.parent.moduleSpecifier) {
@@ -26388,7 +26388,7 @@ namespace ts {
if (node.expression.kind === SyntaxKind.Identifier) {
markExportAsReferenced(node);
if (compilerOptions.declaration) {
if (getEmitDeclarations(compilerOptions)) {
collectLinkedAliases(node.expression as Identifier, /*setVisibility*/ true);
}
}

View File

@@ -11,4 +11,7 @@ exports.__esModule = true;
//// [/foo/out/test.d.ts]
interface Foo {
x: number;
}
export default Foo;