-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Milestone
Description
π Search Terms
variance annotations
π Version & Regression Information
- This seems to be a bug
- This is the behavior in every version I tried since variance annotations came out
β― Playground Link
π» Code
type TFoo<Value> = { value: Value }
type TBar<in out Value> = TFoo<Value> // OK
interface IFoo<Value> { value: Value }
interface IBar<in out Value> extends IFoo<Value> {} // OK
type Bar<in out Value> = IBar<Value> // Error
π Actual behavior
The error says that variance annotations are only allowed for object types, but IBar
is an object type.
π Expected behavior
There should be no errors
Additional information about the issue
No response
RyanCavanaugh
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed