mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
b887b30092
**Description:** This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
11 lines
356 B
TypeScript
11 lines
356 B
TypeScript
// @lib: es5
|
|
var id: number = 10000;
|
|
var name: string = "my name";
|
|
|
|
var person: { b: string; id: number } = { name, id }; // error
|
|
var person1: { name, id }; // ok
|
|
function foo(name: string, id: number): { id: string, name: number } { return { name, id }; } // error
|
|
function bar(obj: { name: string; id: boolean }) { }
|
|
bar({ name, id }); // error
|
|
|