This project is read-only.

module "import" syntax different from ecmascript 6/harmony proposal?

Topics: Language Specification
Nov 27, 2012 at 10:43 AM
Edited Nov 27, 2012 at 10:44 AM
So in typescript we have:

http1 = module('./http/Request');

And in ecmascript 6/harmony we have:

import {someHttpMethod, someOtherMethod} from './http/Request';

We also have the ability to assign an identifier to an entire module:

module httpRequest = './http/Request';

This seems missing from typescript.

Why the difference and omission?

Do you plan to keep fragment the language by using a different syntax, or will you change to follow the ES6 syntax if/when it is agreed upon?

I also noticed something else that is in ES6 but not typescript:

var cat = "friend";
export cat
Nov 27, 2012 at 5:02 PM

There's a work item for this in the issue tracker ( which you can upvote.