Closed
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