2015-02-03 00:15:54 +01:00
|
|
|
//// [parserShorthandPropertyAssignment1.ts]
|
|
|
|
function foo(obj: { name?: string; id: number }) { }
|
|
|
|
var name:any, id: any;
|
|
|
|
foo({ name?, id? });
|
|
|
|
|
|
|
|
//// [parserShorthandPropertyAssignment1.js]
|
2015-03-09 02:23:23 +01:00
|
|
|
function foo(obj) {
|
|
|
|
}
|
2015-02-03 00:15:54 +01:00
|
|
|
var name, id;
|
2015-03-09 02:23:23 +01:00
|
|
|
foo({
|
|
|
|
name: name,
|
|
|
|
id: id
|
|
|
|
});
|