mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 15:12:08 +03:00
11 lines
197 B
TypeScript
11 lines
197 B
TypeScript
// @lib: es5
|
|
var id: number = 10000;
|
|
var name: string = "my name";
|
|
|
|
var person = { name, id };
|
|
|
|
function foo(p: { name: string; id: number }) { }
|
|
foo(person);
|
|
|
|
|
|
var obj = { name: name, id: id }; |