|
| 1 | +=== tests/cases/compiler/mappedTypeGenericInstantiationPreservesInlineForm.ts === |
| 2 | +// repro from #53109 |
| 3 | + |
| 4 | +export const test1 = <T = Record<string, never>>(schema: { |
| 5 | +>test1 : Symbol(test1, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 2, 12)) |
| 6 | +>T : Symbol(T, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 2, 22)) |
| 7 | +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) |
| 8 | +>schema : Symbol(schema, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 2, 49)) |
| 9 | + |
| 10 | + [K in keyof Required<T>]: T[K]; |
| 11 | +>K : Symbol(K, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 3, 5)) |
| 12 | +>Required : Symbol(Required, Decl(lib.es5.d.ts, --, --)) |
| 13 | +>T : Symbol(T, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 2, 22)) |
| 14 | +>T : Symbol(T, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 2, 22)) |
| 15 | +>K : Symbol(K, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 3, 5)) |
| 16 | + |
| 17 | +}) => {} |
| 18 | + |
| 19 | +export function test2<T = Record<string, never>>(schema: { |
| 20 | +>test2 : Symbol(test2, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 4, 8)) |
| 21 | +>T : Symbol(T, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 6, 22)) |
| 22 | +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) |
| 23 | +>schema : Symbol(schema, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 6, 49)) |
| 24 | + |
| 25 | + [K in keyof Required<T>]: T[K]; |
| 26 | +>K : Symbol(K, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 7, 5)) |
| 27 | +>Required : Symbol(Required, Decl(lib.es5.d.ts, --, --)) |
| 28 | +>T : Symbol(T, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 6, 22)) |
| 29 | +>T : Symbol(T, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 6, 22)) |
| 30 | +>K : Symbol(K, Decl(mappedTypeGenericInstantiationPreservesInlineForm.ts, 7, 5)) |
| 31 | + |
| 32 | +}) {}; |
| 33 | + |
0 commit comments