Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Support object literal sugaring #297

Open
matsko opened this issue Oct 7, 2015 · 1 comment
Open

Support object literal sugaring #297

matsko opened this issue Oct 7, 2015 · 1 comment

Comments

@matsko
Copy link
Contributor

matsko commented Oct 7, 2015

Typescript and ES6 allow for this:

var name = "matias";
var info = {name};
console.log(info); // { name: "matias" }

Is there anyway we can support like this for the dart side of things via ts2dart?

@mprobst
Copy link
Contributor

mprobst commented Oct 9, 2015

Yes. You'd need to add some code here to handle the appropriate SyntaxKind, and explicitly emit the properties.

However this code here looks as if we should already support them. What's the error you're getting?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants