<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.6.3, 3.7-Beta <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** - generic function infer return type - generic function destructure **Code** Minimal reproducible example: ```ts 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 ``` **Expected behavior:** No type errors **Actual behavior:** ``` Type 'TX' is not assignable to type 'number' ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> https://www.typescriptlang.org/play/index.html?ts=3.7-Beta&ssl=10&ssc=58&pln=1&pc=1#code/JYOwLgpgTgZghgYwgAgCoQM5gOIRNYBAHlWwD5kBvAWAChlkYAuZLKUAczoY5dLoC+dOggD2ILMigQAtqIBuEAGLIAvMhIANMgApKjADTIAdKemSBfTDjwFiqbQEo1FGvSkQwAVyggPWQWFaMQkwfy8AGzAWEC8ZACNoNQ85RSUiWIToXX1mZAByfKNeZABmZAFHYy5aIA **Related Issues:** <!-- Did you find other bugs that looked similar? --> #33579 #28234