swc/crates/swc_ecma_parser/tests/tsc/objectRestReadonly.ts

17 lines
199 B
TypeScript

// #23734
type ObjType = {
foo: string
baz: string
quux: string
}
const obj: Readonly<ObjType> = {
foo: 'bar',
baz: 'qux',
quux: 'quuz',
}
const { foo, ...rest } = obj
delete rest.baz