mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-29 10:09:46 -05:00
Add regression test
This commit is contained in:
@@ -127,3 +127,10 @@ export type LangCode = keyof typeof langCodeSet
|
||||
export const langCodes = keys(langCodeSet)
|
||||
|
||||
const arr: Obj[] = langCodes.map(code => ({ code }))
|
||||
|
||||
// Repro from #29081
|
||||
|
||||
function test<T extends { a: string, b: string }>(obj: T): T {
|
||||
let { a, ...rest } = obj;
|
||||
return { a: 'hello', ...rest } as T;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user