|
| 1 | +//// [tests/cases/compiler/homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts] //// |
| 2 | + |
| 3 | +=== homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts === |
| 4 | +type HandleOptions<O> = { |
| 5 | +>HandleOptions : Symbol(HandleOptions, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 0, 0)) |
| 6 | +>O : Symbol(O, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 0, 19)) |
| 7 | + |
| 8 | + [I in keyof O]: { |
| 9 | +>I : Symbol(I, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 1, 5)) |
| 10 | +>O : Symbol(O, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 0, 19)) |
| 11 | + |
| 12 | + value: O[I]; |
| 13 | +>value : Symbol(value, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 1, 21)) |
| 14 | +>O : Symbol(O, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 0, 19)) |
| 15 | +>I : Symbol(I, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 1, 5)) |
| 16 | + |
| 17 | + }; |
| 18 | +}; |
| 19 | + |
| 20 | +declare function func1< |
| 21 | +>func1 : Symbol(func1, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 4, 2)) |
| 22 | + |
| 23 | + T extends Record<PropertyKey, readonly any[]>, |
| 24 | +>T : Symbol(T, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 6, 23)) |
| 25 | +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) |
| 26 | +>PropertyKey : Symbol(PropertyKey, Decl(lib.es5.d.ts, --, --)) |
| 27 | + |
| 28 | +>(fields: { |
| 29 | +>fields : Symbol(fields, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 8, 2)) |
| 30 | + |
| 31 | + [K in keyof T]: { |
| 32 | +>K : Symbol(K, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 9, 5)) |
| 33 | +>T : Symbol(T, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 6, 23)) |
| 34 | + |
| 35 | + label: string; |
| 36 | +>label : Symbol(label, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 9, 21)) |
| 37 | + |
| 38 | + options: [...HandleOptions<T[K]>]; |
| 39 | +>options : Symbol(options, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 10, 22)) |
| 40 | +>HandleOptions : Symbol(HandleOptions, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 0, 0)) |
| 41 | +>T : Symbol(T, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 6, 23)) |
| 42 | +>K : Symbol(K, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 9, 5)) |
| 43 | + |
| 44 | + }; |
| 45 | +}): T; |
| 46 | +>T : Symbol(T, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 6, 23)) |
| 47 | + |
| 48 | +const result = func1({ |
| 49 | +>result : Symbol(result, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 15, 5)) |
| 50 | +>func1 : Symbol(func1, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 4, 2)) |
| 51 | + |
| 52 | + prop: { |
| 53 | +>prop : Symbol(prop, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 15, 22)) |
| 54 | + |
| 55 | + label: "first", |
| 56 | +>label : Symbol(label, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 16, 11)) |
| 57 | + |
| 58 | + options: [ |
| 59 | +>options : Symbol(options, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 17, 23)) |
| 60 | + { |
| 61 | + value: 123, |
| 62 | +>value : Symbol(value, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 19, 13)) |
| 63 | + |
| 64 | + }, |
| 65 | + { |
| 66 | + value: "foo", |
| 67 | +>value : Symbol(value, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 22, 13)) |
| 68 | + |
| 69 | + }, |
| 70 | + ], |
| 71 | + }, |
| 72 | + other: { |
| 73 | +>other : Symbol(other, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 26, 6)) |
| 74 | + |
| 75 | + label: "second", |
| 76 | +>label : Symbol(label, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 27, 12)) |
| 77 | + |
| 78 | + options: [ |
| 79 | +>options : Symbol(options, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 28, 24)) |
| 80 | + { |
| 81 | + value: "bar", |
| 82 | +>value : Symbol(value, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 30, 13)) |
| 83 | + |
| 84 | + }, |
| 85 | + { |
| 86 | + value: true, |
| 87 | +>value : Symbol(value, Decl(homomorphicMappedTypeWithNonHomomorphicInstantiationSpreadable1.ts, 33, 13)) |
| 88 | + |
| 89 | + }, |
| 90 | + ], |
| 91 | + }, |
| 92 | +}); |
| 93 | + |
0 commit comments