TypeScript/tests/cases/compiler/mappedTypeWithCombinedTypeMappers.ts

19 lines
338 B
TypeScript
Raw Normal View History

2017-01-09 18:19:03 +01:00
// Repro from #13351
type Meta<T, A> = {
readonly[P in keyof T]: {
value: T[P];
also: A;
readonly children: Meta<T[P], A>;
};
}
interface Input {
x: string;
y: number;
}
declare const output: Meta<Input, boolean>;
const shouldFail: { important: boolean } = output.x.children;