You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interfaceFoo<T>{prop: T;}declarefunctionlift<U>(value: U|Foo<U>): Foo<U>;functionunlift<U>(value: U|Foo<U>): U{returnlift(value).prop;// error TS2322: Type '{}' is not assignable to type 'U'.}
In 1.6 and 1.7 lift's generic is correctly inferred as U, so prop is of type U as expected. In 1.8 it's inferred as {}
Explicitly specifying the generic with lift<U>(value).prop works.
The text was updated successfully, but these errors were encountered:
(1.8.0-dev.20151201)
In 1.6 and 1.7
lift
's generic is correctly inferred asU
, soprop
is of typeU
as expected. In 1.8 it's inferred as{}
Explicitly specifying the generic with
lift<U>(value).prop
works.The text was updated successfully, but these errors were encountered: