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
Expected behavior: I should expect bar to correctly infer the generic type in IFoo when given a Foo<string>
Actual behavior:
Argument of type 'Foo<string>' is not assignable to parameter of type 'IFoo<unknown>'.
Types of property 'run' are incompatible.
Type '<R extends string>(value: R) => R' is not assignable to type '<R extends unknown>(value: R) => R'.
Types of parameters 'value' and 'value' are incompatible.
Type 'R' is not assignable to type 'string'.
Type 'unknown' is not assignable to type 'string'.
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 3.8.0-dev.20191121
Search Terms:
unknown' is not assignable to type
,interface cast
,unknown generic
Code
Expected behavior: I should expect
bar
to correctly infer the generic type inIFoo
when given aFoo<string>
Actual behavior:
Playground Link: Playground Link
Related Issues:
The text was updated successfully, but these errors were encountered: