[ember-data] references API is not compatible with [email protected] and higher #1416
Open
1 of 21 tasks
Labels
types:core:data
Something is wrong with the Ember Data type definitions
types:core
Something is wrong with the Ember type definitions
The problem appears when you try to use
this.belongsTo(
orthis.hasMany(
in scope of a model method or accesor. In this casethis
is broken, and it complains about the invalid invocation, untilthis
type is explicitly specified in the method signature.Unfortunately, an explicit
this
workaround doesn't work for accesors in [email protected] and higher, since they forbidden to specifythis
on getters/setters, see microsoft/TypeScript#39254 (comment).Which package(s) does this problem pertain to?
What are instructions we can follow to reproduce the issue?
Reproduction Case
Link: https://codesandbox.io/s/my-app-forked-zqghf?file=/app/models/user.ts
Now about that bug. What did you expect to see?
I expect:
to work w/o a need for explicit
this
and compilation errors.What happened instead?
If remove an explicit
this
from the signature,would lead to a compilation error:
The text was updated successfully, but these errors were encountered: