Accept new baselines

This commit is contained in:
Anders Hejlsberg 2017-03-23 11:24:01 -07:00
parent 5ea146334a
commit f139a6c58a
3 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,14 @@
//// [deeplyNestedCheck.ts]
// Repro from #14794
interface DataSnapshot<X = {}> {
child(path: string): DataSnapshot;
}
interface Snapshot<T> extends DataSnapshot {
child<U extends keyof T>(path: U): Snapshot<T[U]>;
}
//// [deeplyNestedCheck.js]
// Repro from #14794

View File

@ -0,0 +1,29 @@
=== tests/cases/compiler/deeplyNestedCheck.ts ===
// Repro from #14794
interface DataSnapshot<X = {}> {
>DataSnapshot : Symbol(DataSnapshot, Decl(deeplyNestedCheck.ts, 0, 0))
>X : Symbol(X, Decl(deeplyNestedCheck.ts, 2, 23))
child(path: string): DataSnapshot;
>child : Symbol(DataSnapshot.child, Decl(deeplyNestedCheck.ts, 2, 32))
>path : Symbol(path, Decl(deeplyNestedCheck.ts, 3, 8))
>DataSnapshot : Symbol(DataSnapshot, Decl(deeplyNestedCheck.ts, 0, 0))
}
interface Snapshot<T> extends DataSnapshot {
>Snapshot : Symbol(Snapshot, Decl(deeplyNestedCheck.ts, 4, 1))
>T : Symbol(T, Decl(deeplyNestedCheck.ts, 6, 19))
>DataSnapshot : Symbol(DataSnapshot, Decl(deeplyNestedCheck.ts, 0, 0))
child<U extends keyof T>(path: U): Snapshot<T[U]>;
>child : Symbol(Snapshot.child, Decl(deeplyNestedCheck.ts, 6, 44))
>U : Symbol(U, Decl(deeplyNestedCheck.ts, 7, 8))
>T : Symbol(T, Decl(deeplyNestedCheck.ts, 6, 19))
>path : Symbol(path, Decl(deeplyNestedCheck.ts, 7, 27))
>U : Symbol(U, Decl(deeplyNestedCheck.ts, 7, 8))
>Snapshot : Symbol(Snapshot, Decl(deeplyNestedCheck.ts, 4, 1))
>T : Symbol(T, Decl(deeplyNestedCheck.ts, 6, 19))
>U : Symbol(U, Decl(deeplyNestedCheck.ts, 7, 8))
}

View File

@ -0,0 +1,29 @@
=== tests/cases/compiler/deeplyNestedCheck.ts ===
// Repro from #14794
interface DataSnapshot<X = {}> {
>DataSnapshot : DataSnapshot<X>
>X : X
child(path: string): DataSnapshot;
>child : (path: string) => DataSnapshot<{}>
>path : string
>DataSnapshot : DataSnapshot<X>
}
interface Snapshot<T> extends DataSnapshot {
>Snapshot : Snapshot<T>
>T : T
>DataSnapshot : DataSnapshot<X>
child<U extends keyof T>(path: U): Snapshot<T[U]>;
>child : <U extends keyof T>(path: U) => Snapshot<T[U]>
>U : U
>T : T
>path : U
>U : U
>Snapshot : Snapshot<T>
>T : T
>U : U
}