2014-10-28 08:28:59 +01:00
tests/cases/compiler/typeArgInference2WithError.ts(7,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
2014-10-24 22:51:19 +02:00
Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'.
2014-09-12 22:35:07 +02:00
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/typeArgInference2WithError.ts (1 errors) ====
interface Item {
name: string;
}
declare function foo<T extends Item>(x?: T, y?: T): T;
var z7 = foo("abc", 5); // Error
2014-10-22 00:32:45 +02:00
~~~
2014-10-28 08:28:59 +01:00
!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
2014-10-25 01:42:22 +02:00
!!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'.