From 1195fc6b5eb88872af95850521ea54babac2407c Mon Sep 17 00:00:00 2001 From: scottmcarthur Date: Sat, 15 Feb 2014 09:06:02 +0000 Subject: [PATCH 1/2] 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 eebed96c3..c26bc9fe8 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; +} From 4d64913cdbf438a6ab8cdf812c4e75cfae1ccf7b Mon Sep 17 00:00:00 2001 From: Scott McArthur Date: Sat, 15 Feb 2014 20:37:05 +0000 Subject: [PATCH 2/2] angular.d.ts Annotated spelt incorrectly Fixed spelling mistake in parameter names. Changed all occurrences of `Annotaded` to `Annotated` --- angularjs/angular.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index a8c1d991d..a2a335d0f 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -79,7 +79,7 @@ declare module ng { /////////////////////////////////////////////////////////////////////////// interface IModule { animation(name: string, animationFactory: Function): IModule; - animation(name: string, inlineAnnotadedFunction: any[]): IModule; + animation(name: string, inlineAnnotatedFunction: any[]): IModule; animation(object: Object): IModule; /** configure existing services. Use this method to register work which needs to be performed on module loading @@ -88,29 +88,29 @@ declare module ng { /** configure existing services. Use this method to register work which needs to be performed on module loading */ - config(inlineAnnotadedFunction: any[]): IModule; + config(inlineAnnotatedFunction: any[]): IModule; constant(name: string, value: any): IModule; constant(object: Object): IModule; controller(name: string, controllerConstructor: Function): IModule; - controller(name: string, inlineAnnotadedConstructor: any[]): IModule; + controller(name: string, inlineAnnotatedConstructor: any[]): IModule; controller(object : Object): IModule; directive(name: string, directiveFactory: Function): IModule; - directive(name: string, inlineAnnotadedFunction: any[]): IModule; + directive(name: string, inlineAnnotatedFunction: any[]): IModule; directive(object: Object): IModule; factory(name: string, serviceFactoryFunction: Function): IModule; - factory(name: string, inlineAnnotadedFunction: any[]): IModule; + factory(name: string, inlineAnnotatedFunction: any[]): IModule; factory(object: Object): IModule; filter(name: string, filterFactoryFunction: Function): IModule; - filter(name: string, inlineAnnotadedFunction: any[]): IModule; + filter(name: string, inlineAnnotatedFunction: any[]): IModule; filter(object: Object): IModule; provider(name: string, serviceProviderConstructor: Function): IModule; - provider(name: string, inlineAnnotadedConstructor: any[]): IModule; + provider(name: string, inlineAnnotatedConstructor: any[]): IModule; provider(name: string, providerObject: auto.IProvider): IModule; provider(object: Object): IModule; run(initializationFunction: Function): IModule; - run(inlineAnnotadedFunction: any[]): IModule; + run(inlineAnnotatedFunction: any[]): IModule; service(name: string, serviceConstructor: Function): IModule; - service(name: string, inlineAnnotadedConstructor: any[]): IModule; + service(name: string, inlineAnnotatedConstructor: any[]): IModule; service(object: Object): IModule; value(name: string, value: any): IModule; value(object: Object): IModule; @@ -570,7 +570,7 @@ declare module ng { interface IControllerProvider extends IServiceProvider { register(name: string, controllerConstructor: Function): void; - register(name: string, dependencyAnnotadedConstructor: any[]): void; + register(name: string, dependencyAnnotatedConstructor: any[]): void; } /////////////////////////////////////////////////////////////////////////// @@ -818,11 +818,11 @@ declare module ng { /////////////////////////////////////////////////////////////////////// interface IInjectorService { annotate(fn: Function): string[]; - annotate(inlineAnnotadedFunction: any[]): string[]; + annotate(inlineAnnotatedFunction: any[]): string[]; get(name: string): any; has(name: string): boolean; instantiate(typeConstructor: Function, locals?: any): any; - invoke(inlineAnnotadedFunction: any[]): any; + invoke(inlineAnnotatedFunction: any[]): any; invoke(func: Function, context?: any, locals?: any): any; } @@ -839,7 +839,7 @@ declare module ng { decorator(name: string, decorator: Function): void; decorator(name: string, decoratorInline: any[]): void; factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider; - factory(name: string, inlineAnnotadedFunction: any[]): ng.IServiceProvider; + factory(name: string, inlineAnnotatedFunction: any[]): ng.IServiceProvider; provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider; provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider; service(name: string, constructor: Function): ng.IServiceProvider;