Accept new baselines

This commit is contained in:
Anders Hejlsberg 2019-06-23 09:20:03 -10:00
parent 076d9ad2ab
commit be4147ddf3
4 changed files with 80 additions and 0 deletions

View file

@ -237,4 +237,13 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23
type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };
type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
// Repro from #32038
const actions = ['resizeTo', 'resizeBy'] as const;
for (const action of actions) {
window[action] = (x, y) => {
window[action](x, y);
}
}

View file

@ -156,6 +156,15 @@ type Bar<T> = { [key: string]: { [K in keyof T]: [K] }[keyof T] };
type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };
type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
// Repro from #32038
const actions = ['resizeTo', 'resizeBy'] as const;
for (const action of actions) {
window[action] = (x, y) => {
window[action](x, y);
}
}
//// [keyofAndIndexedAccess2.js]
@ -253,3 +262,10 @@ export class c {
this["a"] = "b";
}
}
// Repro from #32038
const actions = ['resizeTo', 'resizeBy'];
for (const action of actions) {
window[action] = (x, y) => {
window[action](x, y);
};
}

View file

@ -564,3 +564,26 @@ type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
>Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 156, 11))
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 156, 35))
// Repro from #32038
const actions = ['resizeTo', 'resizeBy'] as const;
>actions : Symbol(actions, Decl(keyofAndIndexedAccess2.ts, 160, 5))
for (const action of actions) {
>action : Symbol(action, Decl(keyofAndIndexedAccess2.ts, 161, 10))
>actions : Symbol(actions, Decl(keyofAndIndexedAccess2.ts, 160, 5))
window[action] = (x, y) => {
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
>action : Symbol(action, Decl(keyofAndIndexedAccess2.ts, 161, 10))
>x : Symbol(x, Decl(keyofAndIndexedAccess2.ts, 162, 19))
>y : Symbol(y, Decl(keyofAndIndexedAccess2.ts, 162, 21))
window[action](x, y);
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
>action : Symbol(action, Decl(keyofAndIndexedAccess2.ts, 161, 10))
>x : Symbol(x, Decl(keyofAndIndexedAccess2.ts, 162, 19))
>y : Symbol(y, Decl(keyofAndIndexedAccess2.ts, 162, 21))
}
}

View file

@ -540,3 +540,35 @@ type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };
type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
>Qux : Qux<T, Q>
// Repro from #32038
const actions = ['resizeTo', 'resizeBy'] as const;
>actions : readonly ["resizeTo", "resizeBy"]
>['resizeTo', 'resizeBy'] as const : readonly ["resizeTo", "resizeBy"]
>['resizeTo', 'resizeBy'] : readonly ["resizeTo", "resizeBy"]
>'resizeTo' : "resizeTo"
>'resizeBy' : "resizeBy"
for (const action of actions) {
>action : "resizeTo" | "resizeBy"
>actions : readonly ["resizeTo", "resizeBy"]
window[action] = (x, y) => {
>window[action] = (x, y) => { window[action](x, y); } : (x: number, y: number) => void
>window[action] : ((x: number, y: number) => void) & ((x: number, y: number) => void)
>window : Window
>action : "resizeTo" | "resizeBy"
>(x, y) => { window[action](x, y); } : (x: number, y: number) => void
>x : number
>y : number
window[action](x, y);
>window[action](x, y) : void
>window[action] : ((x: number, y: number) => void) | ((x: number, y: number) => void)
>window : Window
>action : "resizeTo" | "resizeBy"
>x : number
>y : number
}
}