TypeScript/tests/cases/compiler/restParameterTypeInstantiation.ts

15 lines
239 B
TypeScript
Raw Normal View History

// @strict: true
// Repro from #33823
interface TestGeneric<TG> {
f: string
g: TG
}
const removeF = <TX>({ f, ...rest }: TestGeneric<TX>) => {
return rest
}
const result: number = removeF<number>({ f: '', g: 3 }).g