97b4063d73
* Don't attach declarations to symbols in mapped types with 'as XXX' clauses * Add test (and tweak comment) Co-authored-by: Eli Barzilay <eli@barzilay.org>
19 lines
517 B
Plaintext
19 lines
517 B
Plaintext
=== tests/cases/compiler/mappedTypeAsStringTemplate.ts ===
|
|
// Repro from #44220
|
|
|
|
function foo<T extends { [K in keyof T as `${Extract<K, string>}y`]: number }>(foox: T) { }
|
|
>foo : <T extends { [K in keyof T as `${Extract<K, string>}y`]: number; }>(foox: T) => void
|
|
>foox : T
|
|
|
|
const c = { x: 1 };
|
|
>c : { x: number; }
|
|
>{ x: 1 } : { x: number; }
|
|
>x : number
|
|
>1 : 1
|
|
|
|
foo(c);
|
|
>foo(c) : void
|
|
>foo : <T extends { [K in keyof T as `${Extract<K, string>}y`]: number; }>(foox: T) => void
|
|
>c : { x: number; }
|
|
|