mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
50 lines
2.4 KiB
Plaintext
50 lines
2.4 KiB
Plaintext
//// [tests/cases/compiler/recursiveIndexedAccessSimplification.ts] ////
|
|
|
|
=== recursiveIndexedAccessSimplification.ts ===
|
|
// https://github.com/microsoft/TypeScript/issues/63270
|
|
|
|
type Recur<T> =
|
|
>Recur : Symbol(Recur, Decl(recursiveIndexedAccessSimplification.ts, 0, 0))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 2, 11))
|
|
|
|
(T extends (unknown[]) ? {} : { [K in keyof T]?: Recur<T[K]>}) |
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 2, 11))
|
|
>K : Symbol(K, Decl(recursiveIndexedAccessSimplification.ts, 3, 38))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 2, 11))
|
|
>Recur : Symbol(Recur, Decl(recursiveIndexedAccessSimplification.ts, 0, 0))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 2, 11))
|
|
>K : Symbol(K, Decl(recursiveIndexedAccessSimplification.ts, 3, 38))
|
|
|
|
[...Recur<T>[number][]];
|
|
>Recur : Symbol(Recur, Decl(recursiveIndexedAccessSimplification.ts, 0, 0))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 2, 11))
|
|
|
|
function join<T>(l: Recur<T>[]): Recur<T> {
|
|
>join : Symbol(join, Decl(recursiveIndexedAccessSimplification.ts, 4, 28))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 6, 14))
|
|
>l : Symbol(l, Decl(recursiveIndexedAccessSimplification.ts, 6, 17))
|
|
>Recur : Symbol(Recur, Decl(recursiveIndexedAccessSimplification.ts, 0, 0))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 6, 14))
|
|
>Recur : Symbol(Recur, Decl(recursiveIndexedAccessSimplification.ts, 0, 0))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 6, 14))
|
|
|
|
return ['marker', ...l];
|
|
>l : Symbol(l, Decl(recursiveIndexedAccessSimplification.ts, 6, 17))
|
|
}
|
|
|
|
function a<T>(l: Recur<T>[]): void {
|
|
>a : Symbol(a, Decl(recursiveIndexedAccessSimplification.ts, 8, 1))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 10, 11))
|
|
>l : Symbol(l, Decl(recursiveIndexedAccessSimplification.ts, 10, 14))
|
|
>Recur : Symbol(Recur, Decl(recursiveIndexedAccessSimplification.ts, 0, 0))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 10, 11))
|
|
|
|
const x: Recur<T> | undefined = join(l);
|
|
>x : Symbol(x, Decl(recursiveIndexedAccessSimplification.ts, 11, 9))
|
|
>Recur : Symbol(Recur, Decl(recursiveIndexedAccessSimplification.ts, 0, 0))
|
|
>T : Symbol(T, Decl(recursiveIndexedAccessSimplification.ts, 10, 11))
|
|
>join : Symbol(join, Decl(recursiveIndexedAccessSimplification.ts, 4, 28))
|
|
>l : Symbol(l, Decl(recursiveIndexedAccessSimplification.ts, 10, 14))
|
|
}
|
|
|