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
test.ts(20,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
Type argument candidate 'Config' is not a valid type argument because it is not a supertype of candidate '{ mime: string; }'.
I can't tell exactly what's going wrong here, but it appears to be some issue at the intersection between generics and plain objects implementing interfaces. I would assume by the fact that both assigning the object to a typed variable and using a specified type in the function that Config is in fact a supertype of the candidate; this fact is just not being picked up during the type inference stage.
The text was updated successfully, but these errors were encountered:
with
tsc
version 1.4.1.0 givesI can't tell exactly what's going wrong here, but it appears to be some issue at the intersection between generics and plain objects implementing interfaces. I would assume by the fact that both assigning the object to a typed variable and using a specified type in the function that
Config
is in fact a supertype of the candidate; this fact is just not being picked up during the type inference stage.The text was updated successfully, but these errors were encountered: