From 1195fc6b5eb88872af95850521ea54babac2407c Mon Sep 17 00:00:00 2001 From: scottmcarthur Date: Sat, 15 Feb 2014 09:06:02 +0000 Subject: [PATCH] Added $promise & $resolved properties [ngResource.$resource](http://docs.angularjs.org/api/ngResource.$resource) defines a `$promise` property and a `$resolve` property on the Resource. --- angularjs/angular-resource.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index eebed96c30..c26bc9fe82 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -105,6 +105,10 @@ declare module ng.resource { $delete(dataOrParams: any, success: Function): T; $delete(success: Function, error?: Function): T; $delete(params: any, data: any, success?: Function, error?: Function): T; + + /** the promise of the original server interaction that created this instance. **/ + $promise : ng.IPromise; + $resolved : boolean; } /** when creating a resource factory via IModule.factory */ @@ -122,3 +126,10 @@ declare module ng { factory(name: string, resourceServiceFactoryFunction: ng.resource.IResourceServiceFactoryFunction): IModule; } } + +interface Array> +{ + /** the promise of the original server interaction that created this collection. **/ + $promise : ng.IPromise>; + $resolved : boolean; +}