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

9 lines
169 B
TypeScript

// @lib: es5
var id: number = 10000;
var name: string = "my name";
var person = { name, id };
function foo(p: { a: string; id: number }) { }
foo(person); // error