File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -10992,7 +10992,13 @@ namespace ts {
10992
10992
10993
10993
function getEffectiveDeclarationFlags(n: Node, flagsToCheck: NodeFlags): NodeFlags {
10994
10994
let flags = getCombinedNodeFlags(n);
10995
- if (n.parent.kind !== SyntaxKind.InterfaceDeclaration && isInAmbientContext(n)) {
10995
+
10996
+ // children of classes (even ambient classes) should not be marked as ambient or export
10997
+ // because those flags have no useful semantics there.
10998
+ if (n.parent.kind !== SyntaxKind.InterfaceDeclaration &&
10999
+ n.parent.kind !== SyntaxKind.ClassDeclaration &&
11000
+ n.parent.kind !== SyntaxKind.ClassExpression &&
11001
+ isInAmbientContext(n)) {
10996
11002
if (!(flags & NodeFlags.Ambient)) {
10997
11003
// It is nested in an ambient context, which means it is automatically exported
10998
11004
flags |= NodeFlags.Export;
You can’t perform that action at this time.
0 commit comments