mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 02:30:15 -06:00
Accept new baselines
This commit is contained in:
parent
94e0df39cc
commit
a7437fd355
@ -12,9 +12,10 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(72,43): error TS2304: C
|
||||
tests/cases/conformance/types/conditional/inferTypes1.ts(72,43): error TS4081: Exported type alias 'T62' has or is using private name 'U'.
|
||||
tests/cases/conformance/types/conditional/inferTypes1.ts(78,44): error TS2344: Type 'U' does not satisfy the constraint 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/conditional/inferTypes1.ts(131,40): error TS2322: Type 'T' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/conditional/inferTypes1.ts (12 errors) ====
|
||||
==== tests/cases/conformance/types/conditional/inferTypes1.ts (13 errors) ====
|
||||
type Unpacked<T> =
|
||||
T extends (infer U)[] ? U :
|
||||
T extends (...args: any[]) => infer U ? U :
|
||||
@ -167,4 +168,11 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(78,44): error TS2344: T
|
||||
type A2<T, U extends void> = [T, U];
|
||||
type B2<S> = S extends A2<infer T, infer U> ? [T, U] : never;
|
||||
type C2<S, U extends void> = S extends A2<infer T, U> ? [T, U] : never;
|
||||
|
||||
// Repro from #21735
|
||||
|
||||
type A<T> = T extends string ? { [P in T]: void; } : T;
|
||||
type B<T> = string extends T ? { [P in T]: void; } : T; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'string'.
|
||||
|
||||
@ -125,6 +125,11 @@ type B1<S> = S extends A1<infer T, infer U> ? [T, U] : never;
|
||||
type A2<T, U extends void> = [T, U];
|
||||
type B2<S> = S extends A2<infer T, infer U> ? [T, U] : never;
|
||||
type C2<S, U extends void> = S extends A2<infer T, U> ? [T, U] : never;
|
||||
|
||||
// Repro from #21735
|
||||
|
||||
type A<T> = T extends string ? { [P in T]: void; } : T;
|
||||
type B<T> = string extends T ? { [P in T]: void; } : T; // Error
|
||||
|
||||
|
||||
//// [inferTypes1.js]
|
||||
|
||||
@ -551,3 +551,21 @@ type C2<S, U extends void> = S extends A2<infer T, U> ? [T, U] : never;
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 125, 47))
|
||||
>U : Symbol(U, Decl(inferTypes1.ts, 125, 10))
|
||||
|
||||
// Repro from #21735
|
||||
|
||||
type A<T> = T extends string ? { [P in T]: void; } : T;
|
||||
>A : Symbol(A, Decl(inferTypes1.ts, 125, 71))
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 129, 7))
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 129, 7))
|
||||
>P : Symbol(P, Decl(inferTypes1.ts, 129, 34))
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 129, 7))
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 129, 7))
|
||||
|
||||
type B<T> = string extends T ? { [P in T]: void; } : T; // Error
|
||||
>B : Symbol(B, Decl(inferTypes1.ts, 129, 55))
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 130, 7))
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 130, 7))
|
||||
>P : Symbol(P, Decl(inferTypes1.ts, 130, 34))
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 130, 7))
|
||||
>T : Symbol(T, Decl(inferTypes1.ts, 130, 7))
|
||||
|
||||
|
||||
@ -558,3 +558,21 @@ type C2<S, U extends void> = S extends A2<infer T, U> ? [T, U] : never;
|
||||
>T : T
|
||||
>U : U
|
||||
|
||||
// Repro from #21735
|
||||
|
||||
type A<T> = T extends string ? { [P in T]: void; } : T;
|
||||
>A : A<T>
|
||||
>T : T
|
||||
>T : T
|
||||
>P : P
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
type B<T> = string extends T ? { [P in T]: void; } : T; // Error
|
||||
>B : B<T>
|
||||
>T : T
|
||||
>T : T
|
||||
>P : P
|
||||
>T : T
|
||||
>T : T
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user