mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-05 08:50:16 +00:00
ICollectionPromise<T> extends ng.IPromise<T> is the equivalent of
interface IPromise<T> extends ng.IPromise<T> for arrays of T. Therefore
it makes no sense to extend ng.IPromise with just T. Instead it has to
be an array of T.
The consequence of this bug can be observed when calling
Restangular.all('someEntity').getList<SomeEntity>().then((entities) =>
{...})
In this case the TypeScript compiler handles entities as SomeEntity, not
SomeEntity[].