1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
=== tests/cases/compiler/mappedTypeWithCombinedTypeMappers.ts ===
// Repro from #13351
type Meta<T, A> = {
>Meta : Symbol(Meta, Decl(mappedTypeWithCombinedTypeMappers.ts, 0, 0))
>T : Symbol(T, Decl(mappedTypeWithCombinedTypeMappers.ts, 2, 10))
>A : Symbol(A, Decl(mappedTypeWithCombinedTypeMappers.ts, 2, 12))
readonly[P in keyof T]: {
>P : Symbol(P, Decl(mappedTypeWithCombinedTypeMappers.ts, 3, 13))
>T : Symbol(T, Decl(mappedTypeWithCombinedTypeMappers.ts, 2, 10))
value: T[P];
>value : Symbol(value, Decl(mappedTypeWithCombinedTypeMappers.ts, 3, 29))
>T : Symbol(T, Decl(mappedTypeWithCombinedTypeMappers.ts, 2, 10))
>P : Symbol(P, Decl(mappedTypeWithCombinedTypeMappers.ts, 3, 13))
also: A;
>also : Symbol(also, Decl(mappedTypeWithCombinedTypeMappers.ts, 4, 20))
>A : Symbol(A, Decl(mappedTypeWithCombinedTypeMappers.ts, 2, 12))
readonly children: Meta<T[P], A>;
>children : Symbol(children, Decl(mappedTypeWithCombinedTypeMappers.ts, 5, 16))
>Meta : Symbol(Meta, Decl(mappedTypeWithCombinedTypeMappers.ts, 0, 0))
>T : Symbol(T, Decl(mappedTypeWithCombinedTypeMappers.ts, 2, 10))
>P : Symbol(P, Decl(mappedTypeWithCombinedTypeMappers.ts, 3, 13))
>A : Symbol(A, Decl(mappedTypeWithCombinedTypeMappers.ts, 2, 12))
};
}
interface Input {
>Input : Symbol(Input, Decl(mappedTypeWithCombinedTypeMappers.ts, 8, 1))
x: string;
>x : Symbol(Input.x, Decl(mappedTypeWithCombinedTypeMappers.ts, 10, 17))
y: number;
>y : Symbol(Input.y, Decl(mappedTypeWithCombinedTypeMappers.ts, 11, 14))
}
declare const output: Meta<Input, boolean>;
>output : Symbol(output, Decl(mappedTypeWithCombinedTypeMappers.ts, 15, 13))
>Meta : Symbol(Meta, Decl(mappedTypeWithCombinedTypeMappers.ts, 0, 0))
>Input : Symbol(Input, Decl(mappedTypeWithCombinedTypeMappers.ts, 8, 1))
const shouldFail: { important: boolean } = output.x.children;
>shouldFail : Symbol(shouldFail, Decl(mappedTypeWithCombinedTypeMappers.ts, 17, 5))
>important : Symbol(important, Decl(mappedTypeWithCombinedTypeMappers.ts, 17, 19))
>output.x.children : Symbol(children, Decl(mappedTypeWithCombinedTypeMappers.ts, 5, 16))
>output.x : Symbol(x, Decl(mappedTypeWithCombinedTypeMappers.ts, 10, 17))
>output : Symbol(output, Decl(mappedTypeWithCombinedTypeMappers.ts, 15, 13))
>x : Symbol(x, Decl(mappedTypeWithCombinedTypeMappers.ts, 10, 17))
>children : Symbol(children, Decl(mappedTypeWithCombinedTypeMappers.ts, 5, 16))
|