Merge pull request #1625 from coxm/master

Add RequireJS 'errback' signature; add AngularJS signatures.
This commit is contained in:
Basarat Ali Syed
2014-01-29 02:48:15 -08:00
2 changed files with 14 additions and 5 deletions
+8 -5
View File
@@ -452,6 +452,7 @@ declare module ng {
///////////////////////////////////////////////////////////////////////////
interface IQService {
all(promises: IPromise<any>[]): IPromise<any[]>;
all(promises: {[id: string]: IPromise<any>;}): IPromise<{[id: string]: any}>;
defer<T>(): IDeferred<T>;
reject(reason?: any): IPromise<void>;
when<T>(value: T): IPromise<T>;
@@ -747,12 +748,14 @@ declare module ng {
) => any;
controller?: any;
controllerAs?: string;
// A link function with no arguments is perfectly valid; the norm seems
// to be passing the scope, element and attributes.
link?:
(scope: IScope,
instanceElement: IAugmentedJQuery,
instanceAttributes: IAttributes,
controller: any,
transclude: ITranscludeFunction
(scope?: IScope,
instanceElement?: IAugmentedJQuery,
instanceAttributes?: IAttributes,
controller?: any,
transclude?: ITranscludeFunction
) => void;
name?: string;
priority?: number;
+6
View File
@@ -249,6 +249,12 @@ interface Require {
**/
(modules: string[], ready: Function): void;
/**
* @see http://requirejs.org/docs/api.html#errbacks
* @param ready Called when required modules are ready.
**/
(modules: string[], ready: Function, errback: Function): void;
/**
* Generate URLs from require module
* @param module Module to URL