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

18 lines
259 B
TypeScript

// @strict: true
// @declaration: true
// Repro from #49480
export interface BarProps {
barProp?: string;
}
export interface FooProps {
fooProps?: BarProps & object;
}
declare const foo: FooProps;
const { fooProps = {} } = foo;
fooProps.barProp;