We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5270b49 commit 2212f47Copy full SHA for 2212f47
1 file changed
tests/cases/conformance/types/mapped/recursiveMappedTypes.ts
@@ -61,3 +61,21 @@ type Remap2<T> = T extends object ? { [P in keyof T]: Remap2<T[P]>; } : T;
61
62
type a = Remap1<string[]>; // string[]
63
type b = Remap2<string[]>; // string[]
64
+
65
+// Repro from #29992
66
67
+type NonOptionalKeys<T> = { [P in keyof T]: undefined extends T[P] ? never : P }[keyof T];
68
+type Child<T> = { [P in NonOptionalKeys<T>]: T[P] }
69
70
+export interface ListWidget {
71
+ "type": "list",
72
+ "minimum_count": number,
73
+ "maximum_count": number,
74
+ "collapsable"?: boolean, //default to false, means all expanded
75
+ "each": Child<ListWidget>;
76
+}
77
78
+type ListChild = Child<ListWidget>
79
80
+declare let x: ListChild;
81
+x.type;
0 commit comments