Ember & TypeScript: class fields and computed properties


#1

Ever since Ember 3.1, people have been reporting issues with the advice from my “Typing Your Ember” series, and I finally had some time to document why: it turns out that class fields (i.e. per-instance rather than on-the-prototype) bindings for computed properties, injections, actions, etc. don’t work. This blog post has the details and the migration options for fixing it. Very much my bad—hopefully this post helps clear that up and helps people looking around find the fix or avoid the problem altogether.

Happy to answer questions and clarify things here if anyone is still confused!


#2

Thank you for taking the time to dig in and write-up the details on why it doesn’t work.

:heart: no blame here, we learned a lot in a short time :smiley_cat: