ember-cli-typescript
ember-cli-typescript copied to clipboard
MutableArray.setObjects does not have to accept EmberArray
Which package(s) does this problem pertain to?
- [x] @types/ember__array
MutableArray.setObjects is defined as:
setObjects(objects: EmberArray<T>): this;
It works fine when passed a native array so the type definition could be loosened to:
setObjects(objects: T[]): this;
In the Ember docs it says it accepts an Ember Array but I think this can also be changed.
Or am I mistaken?
This has since been fixed: it now takes Enumerable<T>, which correctly accepts native arrays as well.
@chriskrycho - I think you're mistaken. The issue is about setObjects, not pushObjects, and it still accepts EmberArray. Please reopen the issue. :)
Ah, you are correct, my apologies! (Thanks for reopening, @mike-north!)
I believe this issue is no longer relevant with the new Ember preview types.