* 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>
16 lines
298 B
TypeScript
16 lines
298 B
TypeScript
//// [mappedTypeAsStringTemplate.ts]
|
|
// Repro from #44220
|
|
|
|
function foo<T extends { [K in keyof T as `${Extract<K, string>}y`]: number }>(foox: T) { }
|
|
|
|
const c = { x: 1 };
|
|
|
|
foo(c);
|
|
|
|
|
|
//// [mappedTypeAsStringTemplate.js]
|
|
// Repro from #44220
|
|
function foo(foox) { }
|
|
var c = { x: 1 };
|
|
foo(c);
|