Skip to content

Support for object literal property value shorthand #418

Closed
@maryo

Description

@maryo

Started here: https://typescript.codeplex.com/workitem/1367

Please consider adding support for object literal property value shorthand, as per the ES6 proposal: http://wiki.ecmascript.org/doku.php?id=harmony:object_literals#object_literal_property_value_shorthand. This would allow for the following:

function foo(a: number) {
  var b = 123;
  return { a, b };  // instead of { a: a, b: b };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    ES6Relates to the ES6 SpecFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions