-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
Based on #14017, when exporting a class that extends from a mixin, the emitted type contains an intersection. Inheriting from an intersection is not allowed, even though it should be.
Note that inheriting from a type alias of an intersection already works:
// A *self-contained* demonstration of the problem follows...
class A { a = 1 }
class B { b = 2 }
type Both = A & B
class C extends A & B { } // error
class D extends Both { } // okExpected behavior:
No error for C or D.
Actual behavior:
Error for C.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue