Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f139a6c

Browse filesBrowse files
Anders HejlsbergAnders Hejlsberg
authored andcommitted
Accept new baselines
1 parent 5ea1463 commit f139a6c
Copy full SHA for f139a6c

3 files changed

+72Lines changed: 72 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//// [deeplyNestedCheck.ts]
2+
// Repro from #14794
3+
4+
interface DataSnapshot<X = {}> {
5+
child(path: string): DataSnapshot;
6+
}
7+
8+
interface Snapshot<T> extends DataSnapshot {
9+
child<U extends keyof T>(path: U): Snapshot<T[U]>;
10+
}
11+
12+
13+
//// [deeplyNestedCheck.js]
14+
// Repro from #14794
Collapse file
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
=== tests/cases/compiler/deeplyNestedCheck.ts ===
2+
// Repro from #14794
3+
4+
interface DataSnapshot<X = {}> {
5+
>DataSnapshot : Symbol(DataSnapshot, Decl(deeplyNestedCheck.ts, 0, 0))
6+
>X : Symbol(X, Decl(deeplyNestedCheck.ts, 2, 23))
7+
8+
child(path: string): DataSnapshot;
9+
>child : Symbol(DataSnapshot.child, Decl(deeplyNestedCheck.ts, 2, 32))
10+
>path : Symbol(path, Decl(deeplyNestedCheck.ts, 3, 8))
11+
>DataSnapshot : Symbol(DataSnapshot, Decl(deeplyNestedCheck.ts, 0, 0))
12+
}
13+
14+
interface Snapshot<T> extends DataSnapshot {
15+
>Snapshot : Symbol(Snapshot, Decl(deeplyNestedCheck.ts, 4, 1))
16+
>T : Symbol(T, Decl(deeplyNestedCheck.ts, 6, 19))
17+
>DataSnapshot : Symbol(DataSnapshot, Decl(deeplyNestedCheck.ts, 0, 0))
18+
19+
child<U extends keyof T>(path: U): Snapshot<T[U]>;
20+
>child : Symbol(Snapshot.child, Decl(deeplyNestedCheck.ts, 6, 44))
21+
>U : Symbol(U, Decl(deeplyNestedCheck.ts, 7, 8))
22+
>T : Symbol(T, Decl(deeplyNestedCheck.ts, 6, 19))
23+
>path : Symbol(path, Decl(deeplyNestedCheck.ts, 7, 27))
24+
>U : Symbol(U, Decl(deeplyNestedCheck.ts, 7, 8))
25+
>Snapshot : Symbol(Snapshot, Decl(deeplyNestedCheck.ts, 4, 1))
26+
>T : Symbol(T, Decl(deeplyNestedCheck.ts, 6, 19))
27+
>U : Symbol(U, Decl(deeplyNestedCheck.ts, 7, 8))
28+
}
29+
Collapse file
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
=== tests/cases/compiler/deeplyNestedCheck.ts ===
2+
// Repro from #14794
3+
4+
interface DataSnapshot<X = {}> {
5+
>DataSnapshot : DataSnapshot<X>
6+
>X : X
7+
8+
child(path: string): DataSnapshot;
9+
>child : (path: string) => DataSnapshot<{}>
10+
>path : string
11+
>DataSnapshot : DataSnapshot<X>
12+
}
13+
14+
interface Snapshot<T> extends DataSnapshot {
15+
>Snapshot : Snapshot<T>
16+
>T : T
17+
>DataSnapshot : DataSnapshot<X>
18+
19+
child<U extends keyof T>(path: U): Snapshot<T[U]>;
20+
>child : <U extends keyof T>(path: U) => Snapshot<T[U]>
21+
>U : U
22+
>T : T
23+
>path : U
24+
>U : U
25+
>Snapshot : Snapshot<T>
26+
>T : T
27+
>U : U
28+
}
29+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.