# Ember and TypeScript

**URL:** <https://discuss.emberjs.com/t/ember-and-typescript/2898>\
**Category:** Uncategorized\
**Created:** [October 8, 2013, 6:40am UTC](https://discuss.emberjs.com/t/ember-and-typescript/2898 "2013-10-08T06:40:03Z")\
**Posts on this page:** 1\
**Showing post:** 41

<div class="post-metadata">

**Author:** ![rtm](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rtm/32/10953_2.png) [@rtm](https://discuss.emberjs.com/u/rtm)\
**Post date:** [December 26, 2016, 3:54am UTC](https://discuss.emberjs.com/t/ember-and-typescript/2898/41 "2016-12-26T03:54:07Z")

</div>

My suspicion is that a promising avenue is to fork the TypeScript compiler so that it emits Ember-type class definitions, so that

```
@ember-class()
export default class extends Ember.Component {
  public foo = "foo";
  constructor() { super(); this.foo = "bar"; }
  @computed('foo') repeated(foo) { return foo.repeat(2); }
}

```

would be transpiled into export default Ember.Component.extend({ foo: “foo”, init() { this.\_super(…arguments); this.set(‘foo’, “bar”); }, @computed(‘foo’) repeated(foo) {return foo.repeat(2); } }

where the `@computed` decorator does the work of transforming the function into a computed property. With lots and lots of details still to be worked out.

An example of this (transpiling TS into Closure) is at [TypeScript/Google Closure Demo](http://bolinfest.com/typescript/).

---

_[View the full topic](https://discuss.emberjs.com/t/ember-and-typescript/2898)._
