Accept new baselines

This commit is contained in:
Anders Hejlsberg 2019-04-13 08:24:34 -10:00
parent 2c951b3ca9
commit f3fd27c0ee
4 changed files with 36 additions and 0 deletions

View File

@ -80,4 +80,9 @@ tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12
type UnexpectedError<T extends PropertyKey> = T
type NoErrorHere<T extends PropertyKey> = T
// Repro from #30331
type a<T> = T extends Array<infer U> ? U : never;
type b<T> = { [K in a<T> & keyof T ]: 42 };

View File

@ -33,6 +33,11 @@ type Example<T, U> = { [K in keyof T]: K extends keyof U ? UnexpectedError<K> :
type UnexpectedError<T extends PropertyKey> = T
type NoErrorHere<T extends PropertyKey> = T
// Repro from #30331
type a<T> = T extends Array<infer U> ? U : never;
type b<T> = { [K in a<T> & keyof T ]: 42 };
//// [intersectionWithUnionConstraint.js]

View File

@ -112,3 +112,21 @@ type NoErrorHere<T extends PropertyKey> = T
>PropertyKey : Symbol(PropertyKey, Decl(lib.es5.d.ts, --, --))
>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 33, 17))
// Repro from #30331
type a<T> = T extends Array<infer U> ? U : never;
>a : Symbol(a, Decl(intersectionWithUnionConstraint.ts, 33, 43))
>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 37, 7))
>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 37, 7))
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 37, 33))
>U : Symbol(U, Decl(intersectionWithUnionConstraint.ts, 37, 33))
type b<T> = { [K in a<T> & keyof T ]: 42 };
>b : Symbol(b, Decl(intersectionWithUnionConstraint.ts, 37, 49))
>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 38, 7))
>K : Symbol(K, Decl(intersectionWithUnionConstraint.ts, 38, 15))
>a : Symbol(a, Decl(intersectionWithUnionConstraint.ts, 33, 43))
>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 38, 7))
>T : Symbol(T, Decl(intersectionWithUnionConstraint.ts, 38, 7))

View File

@ -84,3 +84,11 @@ type UnexpectedError<T extends PropertyKey> = T
type NoErrorHere<T extends PropertyKey> = T
>NoErrorHere : T
// Repro from #30331
type a<T> = T extends Array<infer U> ? U : never;
>a : a<T>
type b<T> = { [K in a<T> & keyof T ]: 42 };
>b : b<T>