[Typescript] Incorrect return type of functions `changeset` and `Changeset`
bartocc opened this issue · comments
Julien Palmas commented
I might be wrong, but I believe the EmberChangeset
return type I used in #641 is not completely correct:
Lines 15 to 16 in aac0b2c
If we pass an EmberChangeset subclass to the options param changeset
, the return type won't be EmberChangeset
, but the subclass.
For example
class MyChangeset extends EmberChangeset {}
const cs = Changeset({foo: "bar"}, () => true, {}, {changeset: MyChangeset})
Then the cs
variable will be of type MyChangeset
, not EmberChangeset
@kpfefferle Do you agree?