@@ -1317,3 +1317,57 @@ type Extracted<Struct> = {
13171317>K : Symbol(K, Decl(conditionalTypes1.ts, 338, 5))
13181318}
13191319
1320+ // Repro from #22985
1321+
1322+ type RecursivePartial<T> = {
1323+ >RecursivePartial : Symbol(RecursivePartial, Decl(conditionalTypes1.ts, 339, 1))
1324+ >T : Symbol(T, Decl(conditionalTypes1.ts, 343, 22))
1325+
1326+ [P in keyof T]?: T[P] extends Array<any> ? {[index: number]: RecursivePartial<T[P][0]>} :
1327+ >P : Symbol(P, Decl(conditionalTypes1.ts, 344, 3))
1328+ >T : Symbol(T, Decl(conditionalTypes1.ts, 343, 22))
1329+ >T : Symbol(T, Decl(conditionalTypes1.ts, 343, 22))
1330+ >P : Symbol(P, Decl(conditionalTypes1.ts, 344, 3))
1331+ >Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
1332+ >index : Symbol(index, Decl(conditionalTypes1.ts, 344, 47))
1333+ >RecursivePartial : Symbol(RecursivePartial, Decl(conditionalTypes1.ts, 339, 1))
1334+ >T : Symbol(T, Decl(conditionalTypes1.ts, 343, 22))
1335+ >P : Symbol(P, Decl(conditionalTypes1.ts, 344, 3))
1336+
1337+ T[P] extends object ? RecursivePartial<T[P]> : T[P];
1338+ >T : Symbol(T, Decl(conditionalTypes1.ts, 343, 22))
1339+ >P : Symbol(P, Decl(conditionalTypes1.ts, 344, 3))
1340+ >RecursivePartial : Symbol(RecursivePartial, Decl(conditionalTypes1.ts, 339, 1))
1341+ >T : Symbol(T, Decl(conditionalTypes1.ts, 343, 22))
1342+ >P : Symbol(P, Decl(conditionalTypes1.ts, 344, 3))
1343+ >T : Symbol(T, Decl(conditionalTypes1.ts, 343, 22))
1344+ >P : Symbol(P, Decl(conditionalTypes1.ts, 344, 3))
1345+
1346+ };
1347+
1348+ declare function assign<T>(o: T, a: RecursivePartial<T>): void;
1349+ >assign : Symbol(assign, Decl(conditionalTypes1.ts, 346, 2))
1350+ >T : Symbol(T, Decl(conditionalTypes1.ts, 348, 24))
1351+ >o : Symbol(o, Decl(conditionalTypes1.ts, 348, 27))
1352+ >T : Symbol(T, Decl(conditionalTypes1.ts, 348, 24))
1353+ >a : Symbol(a, Decl(conditionalTypes1.ts, 348, 32))
1354+ >RecursivePartial : Symbol(RecursivePartial, Decl(conditionalTypes1.ts, 339, 1))
1355+ >T : Symbol(T, Decl(conditionalTypes1.ts, 348, 24))
1356+
1357+ var a = {o: 1, b: 2, c: [{a: 1, c: '213'}]}
1358+ >a : Symbol(a, Decl(conditionalTypes1.ts, 350, 3))
1359+ >o : Symbol(o, Decl(conditionalTypes1.ts, 350, 9))
1360+ >b : Symbol(b, Decl(conditionalTypes1.ts, 350, 14))
1361+ >c : Symbol(c, Decl(conditionalTypes1.ts, 350, 20))
1362+ >a : Symbol(a, Decl(conditionalTypes1.ts, 350, 26))
1363+ >c : Symbol(c, Decl(conditionalTypes1.ts, 350, 31))
1364+
1365+ assign(a, {o: 2, c: {0: {a: 2, c: '213123'}}})
1366+ >assign : Symbol(assign, Decl(conditionalTypes1.ts, 346, 2))
1367+ >a : Symbol(a, Decl(conditionalTypes1.ts, 350, 3))
1368+ >o : Symbol(o, Decl(conditionalTypes1.ts, 351, 11))
1369+ >c : Symbol(c, Decl(conditionalTypes1.ts, 351, 16))
1370+ >0 : Symbol(0, Decl(conditionalTypes1.ts, 351, 21))
1371+ >a : Symbol(a, Decl(conditionalTypes1.ts, 351, 25))
1372+ >c : Symbol(c, Decl(conditionalTypes1.ts, 351, 30))
1373+
0 commit comments