Files

19 lines
1.1 KiB
Diff

--- old.generics1.errors.txt
+++ new.generics1.errors.txt
@@= skipped -0, +0 lines =@@
-generics1.ts(10,14): error TS2344: Type 'A' does not satisfy the constraint 'B'.
- Property 'b' is missing in type 'A' but required in type 'B'.
+generics1.ts(10,14): error TS2741: Property 'b' is missing in type 'A' but required in type 'B'.
generics1.ts(13,9): error TS2314: Generic type 'G<T, U>' requires 2 type argument(s).
generics1.ts(14,9): error TS2314: Generic type 'G<T, U>' requires 2 type argument(s).
@@= skipped -15, +14 lines =@@
var v2: G<{ a: string }, C>; // Ok, equivalent to G<A, C>
var v3: G<A, A>; // Error, A not valid argument for U
~
-!!! error TS2344: Type 'A' does not satisfy the constraint 'B'.
-!!! error TS2344: Property 'b' is missing in type 'A' but required in type 'B'.
+!!! error TS2741: Property 'b' is missing in type 'A' but required in type 'B'.
!!! related TS2728 generics1.ts:2:25: 'b' is declared here.
var v4: G<G<A, B>, C>; // Ok
var v5: G<any, any>; // Error, any does not satisfy constraint B