TypeScript/tests/baselines/reference/deeplyNestedCheck.js
2018-04-09 08:52:20 -10:00

15 lines
296 B
TypeScript

//// [deeplyNestedCheck.ts]
// Repro from #14794
interface DataSnapshot<X = {}> {
child(path: string): DataSnapshot;
}
interface Snapshot<T> extends DataSnapshot {
child<U extends Extract<keyof T, string>>(path: U): Snapshot<T[U]>;
}
//// [deeplyNestedCheck.js]
// Repro from #14794