File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10415,8 +10415,8 @@ module ts {
10415
10415
});
10416
10416
}
10417
10417
10418
- // Non-ambient classes cannot merge with interfaces .
10419
- if (!(node .flags & NodeFlags.Ambient) && symbol.flags & SymbolFlags.Interface ) {
10418
+ // Interfaces cannot be merged with non-ambient classes .
10419
+ if (symbol .flags & SymbolFlags.Interface && !isInAmbientContext(node) ) {
10420
10420
error(node, Diagnostics.Only_an_ambient_class_can_be_merged_with_an_interface)
10421
10421
}
10422
10422
@@ -10603,7 +10603,7 @@ module ts {
10603
10603
// Interfaces cannot merge with non-ambient classes.
10604
10604
if (symbol && symbol.declarations) {
10605
10605
for (let declaration of symbol.declarations) {
10606
- if (declaration.kind === SyntaxKind.ClassDeclaration && !(declaration.flags & NodeFlags.Ambient )) {
10606
+ if (declaration.kind === SyntaxKind.ClassDeclaration && !isInAmbientContext (declaration)) {
10607
10607
error(node, Diagnostics.Only_an_ambient_class_can_be_merged_with_an_interface);
10608
10608
break;
10609
10609
}
You can’t perform that action at this time.
0 commit comments