-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making Ember + TypeScript Ergonomic #8637
Comments
this is tracked by #5863
how is that different from:
this should be working today through contextual typings. for instance: declare function doSomething(a: { init?(this: BaseObject) });
doSomething({
init() {
this // BaseObject
}
})
We have talked about allowing I would expect, however, that you want this in conjunction with extending generic type parameters (tracked by #4890), is this correct? |
I'll refresh this issue with my sense of the current status later today. |
@wycats Any updates? 😌 |
@crhayes most of the open issues were addressed in 2.2. We had some announcements at EmberConf about it 😄 |
@wycats The announcements were exciting, but I don't think most of us (at least in the places I've brought it up so far) know what the current state is. Were the things announced at EmberConf just stepping stones, or is everything ready already? Can we use TypeScript with Ember yet, and if so, how? |
@wycats Thanks, I'll check out some of the conference content! |
Haven't seen any updates here in a while and the OP doesn't reflect the current state of Ember requests as I understand them. Welcome to a new issue with updated status but closing this as part of |
At @DanielRosenwasser's request, I'm making a checklist of things that Ember needs (or would like) to make an ergonomic TypeScript story for our users.
I'm using notation that may or may not be the correct implementation answer, but should help explain what I'm getting at. I can go into more detail on any of the items if needed:
static create<T>(attrs: T): this & T
static extend<T>(extensions: T): typeof (this & T)
this
onto methods on an object literalextend
, can be passed toinstanceof
and can benew
ed. It should be possible to build this construct dynamically using ES5 constructs and explain the result in terms of typed ES6 at the interface boundary.The text was updated successfully, but these errors were encountered: