Accept new baselines

This commit is contained in:
Anders Hejlsberg
2017-01-16 14:30:24 -08:00
parent f7d8e3befc
commit 59a8aa4d82
3 changed files with 25 additions and 0 deletions

View File

@@ -500,6 +500,10 @@ function updateIds2<T extends { [x: string]: string }, K extends keyof T>(
var x = obj[key];
stringMap[x]; // Should be OK.
}
// Repro from #13514
declare function head<T extends Array<any>>(list: T): T[0];
//// [keyofAndIndexedAccess.js]
@@ -1061,3 +1065,4 @@ declare function updateIds2<T extends {
}, K extends keyof T>(obj: T, key: K, stringMap: {
[oldId: string]: string;
}): void;
declare function head<T extends Array<any>>(list: T): T[0];

View File

@@ -1806,3 +1806,13 @@ function updateIds2<T extends { [x: string]: string }, K extends keyof T>(
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 498, 7))
}
// Repro from #13514
declare function head<T extends Array<any>>(list: T): T[0];
>head : Symbol(head, Decl(keyofAndIndexedAccess.ts, 500, 1))
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 504, 22))
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
>list : Symbol(list, Decl(keyofAndIndexedAccess.ts, 504, 44))
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 504, 22))
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 504, 22))

View File

@@ -2128,3 +2128,13 @@ function updateIds2<T extends { [x: string]: string }, K extends keyof T>(
>x : T[K]
}
// Repro from #13514
declare function head<T extends Array<any>>(list: T): T[0];
>head : <T extends any[]>(list: T) => T[0]
>T : T
>Array : T[]
>list : T
>T : T
>T : T