|
| 1 | +=== tests/cases/compiler/circularContextualMappedType.ts === |
| 2 | +type Func<T> = () => T; |
| 3 | +>Func : Symbol(Func, Decl(circularContextualMappedType.ts, 0, 0)) |
| 4 | +>T : Symbol(T, Decl(circularContextualMappedType.ts, 0, 10)) |
| 5 | +>T : Symbol(T, Decl(circularContextualMappedType.ts, 0, 10)) |
| 6 | + |
| 7 | +type Mapped<T> = { [K in keyof T]: Func<T[K]> }; |
| 8 | +>Mapped : Symbol(Mapped, Decl(circularContextualMappedType.ts, 0, 23)) |
| 9 | +>T : Symbol(T, Decl(circularContextualMappedType.ts, 2, 12)) |
| 10 | +>K : Symbol(K, Decl(circularContextualMappedType.ts, 2, 20)) |
| 11 | +>T : Symbol(T, Decl(circularContextualMappedType.ts, 2, 12)) |
| 12 | +>Func : Symbol(Func, Decl(circularContextualMappedType.ts, 0, 0)) |
| 13 | +>T : Symbol(T, Decl(circularContextualMappedType.ts, 2, 12)) |
| 14 | +>K : Symbol(K, Decl(circularContextualMappedType.ts, 2, 20)) |
| 15 | + |
| 16 | +declare function reproduce(options: number): void; |
| 17 | +>reproduce : Symbol(reproduce, Decl(circularContextualMappedType.ts, 2, 48), Decl(circularContextualMappedType.ts, 4, 50)) |
| 18 | +>options : Symbol(options, Decl(circularContextualMappedType.ts, 4, 27)) |
| 19 | + |
| 20 | +declare function reproduce<T>(options: Mapped<T>): T |
| 21 | +>reproduce : Symbol(reproduce, Decl(circularContextualMappedType.ts, 2, 48), Decl(circularContextualMappedType.ts, 4, 50)) |
| 22 | +>T : Symbol(T, Decl(circularContextualMappedType.ts, 5, 27)) |
| 23 | +>options : Symbol(options, Decl(circularContextualMappedType.ts, 5, 30)) |
| 24 | +>Mapped : Symbol(Mapped, Decl(circularContextualMappedType.ts, 0, 23)) |
| 25 | +>T : Symbol(T, Decl(circularContextualMappedType.ts, 5, 27)) |
| 26 | +>T : Symbol(T, Decl(circularContextualMappedType.ts, 5, 27)) |
| 27 | + |
| 28 | +reproduce({ |
| 29 | +>reproduce : Symbol(reproduce, Decl(circularContextualMappedType.ts, 2, 48), Decl(circularContextualMappedType.ts, 4, 50)) |
| 30 | + |
| 31 | + name: () => { return 123 } |
| 32 | +>name : Symbol(name, Decl(circularContextualMappedType.ts, 7, 11)) |
| 33 | + |
| 34 | +}); |
| 35 | + |
| 36 | +reproduce({ |
| 37 | +>reproduce : Symbol(reproduce, Decl(circularContextualMappedType.ts, 2, 48), Decl(circularContextualMappedType.ts, 4, 50)) |
| 38 | + |
| 39 | + name() { return 123 } |
| 40 | +>name : Symbol(name, Decl(circularContextualMappedType.ts, 11, 11)) |
| 41 | + |
| 42 | +}); |
| 43 | + |
| 44 | +reproduce({ |
| 45 | +>reproduce : Symbol(reproduce, Decl(circularContextualMappedType.ts, 2, 48), Decl(circularContextualMappedType.ts, 4, 50)) |
| 46 | + |
| 47 | + name: function () { return 123 } |
| 48 | +>name : Symbol(name, Decl(circularContextualMappedType.ts, 15, 11)) |
| 49 | + |
| 50 | +}); |
| 51 | + |
0 commit comments