Ember and TypeScript

@chilicoder sounds like great news :smile:

How do the new TypeScript changes help us in the short term, and how do they help us in the long term? I got excited when I read that tweet, too, but didn’t know if it was immediately useful or just paving the way for a better future.

@rosshadden I had exactly the same question in mind. Hopefully someone could explain it to us :slight_smile:

There was a very interesting mini-talk at the Ember-Conf, you can watch it here: - YouTube

1 Like

Hi everyone!

I’d like to mention another TypeScript-related news from EmberConf, for those who missed it :wink:

We have released Glimmer! The rendering engine that powers Ember can now be used to build independent UI components, complete with a Web Component wrapper for ease of use. As Glimmer is written in TypeScript, it could provide a glimpse into what Ember could look like in the future, as we carry out the integration work of bringing angle bracket components into Ember.

4 Likes

There shouldn’t be anything about Ember CLI that prevents you from using TypeScript, see broccoli-typescript-compiler and ember-cli-typescript, which uses the former. Instead of creating a gulp task, you create a broccoli plugin and hook it into the pipeline, like how ember-cli-coffeescript and it’s TypeScript equivalent do.

2 Likes

That’s great idea. I’ll try to do that. I think it’s also needed to create some guides with best practises when using typescript in Ember (for example how to properly get and set properties to Ember Object). I see that many ppl (especially those, who came from strong typed languages) prefers TS over JS. In my company there are many ActionScript (which is strong typed lang) programmers who would like to switch to EmberJS and i think it’ll be easier for them to use TS in Ember.

Totally agree, I think that’s one of the major missing parts at the moment: how to use these new building blocks in a proper way? Do we have any good example repos using ember-cli-typescript we can look at?

Hi!

We have been working on getting TypeScript to type check our Ember app, and as a kind of experiment we created an addon, which enables out-of-the-box type checking and compilation of Ember apps.

While this addon is experimental and still in an early stage, it can already find a lot of type errors, thanks to the TypeScript 2.x features (keyof, lookup types, indexed signatures, ThisType),

The addon can be found here:

Please try it out and share your thoughts!

5 Likes