From 41d21c491c0bb1eff11d98265e30a290d4410ce2 Mon Sep 17 00:00:00 2001 From: rgvassar Date: Wed, 2 Mar 2016 10:25:09 -0800 Subject: [PATCH 1/2] angular-animate Added the on, off, and pin methods to the IAnimateService interface. --- angularjs/angular-animate.d.ts | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/angularjs/angular-animate.d.ts b/angularjs/angular-animate.d.ts index be83611e07..c29fd1857e 100644 --- a/angularjs/angular-animate.d.ts +++ b/angularjs/angular-animate.d.ts @@ -27,6 +27,42 @@ declare module angular.animate { * see http://docs.angularjs.org/api/ngAnimate/service/$animate */ interface IAnimateService { + /** + * Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...) has fired + * on the given element or among any of its children. Once the listener is fired, the provided callback + * is fired with the following params: + * + * @event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...) + * @container the container element that will capture each of the animation events that are fired on itself as well as among its children + * @callback the callback function that will be fired when the listener is triggered + * The arguments present in the callback function are: + * element - The captured DOM element that the animation was fired on. + * phase - The phase of the animation. The two possible phases are start (when the animation starts) and close (when it ends). + */ + on(event: string, container: JQuery, callback: (element?: JQuery, phase?: string) => any): void; + + /** + * Deregisters an event listener based on the event which has been associated with the provided element. + * This method can be used in three different ways depending on the arguments. + * + * @event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...) + * @container the container element the event listener was placed on. + * @callback the callback function that was registered as the listener + */ + off(event: string, container?: JQuery, callback?: (element?: JQuery, phase?: string) => any): void; + + /** + * Associates the provided element with a host parent element to allow the element to be animated even if + * it exists outside of the DOM structure of the Angular application. By doing so, any animation triggered + * via $animate can be issued on the element despite being outside the realm of the application or within + * another application. Say for example if the application was bootstrapped on an element that is somewhere + * inside of the tag, but we wanted to allow for an element to be situated as a direct child of document.body, + * then this can be achieved by pinning the element via $animate.pin(element). Keep in mind that calling + * $animate.pin(element, parentElement) will not actually insert into the DOM anywhere; it will just create the association. + * Note that this feature is only active when the ngAnimate module is used. + */ + pin(element: JQuery, parentElement: JQuery): void; + /** * Globally enables / disables animations. * From 5597d81a2dfa7a555e8af3d5bfd57357e902b916 Mon Sep 17 00:00:00 2001 From: RVassar Date: Sat, 12 Mar 2016 20:21:20 -0800 Subject: [PATCH 2/2] Not sure what the changes are here. Different line endings or something. --- angular-load/angular-load.d.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/angular-load/angular-load.d.ts b/angular-load/angular-load.d.ts index a35d1c59d8..65d5bc388a 100644 --- a/angular-load/angular-load.d.ts +++ b/angular-load/angular-load.d.ts @@ -1,15 +1,15 @@ -// Type definitions for angular-load v0.4.1 -// Project: https://github.com/urish/angular-load -// Definitions by: david-gang -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module angular.load { - - interface IAngularLoadService { - loadScript(url:string): ng.IPromise; - loadCss(url:string): ng.IPromise; - } - -} +// Type definitions for angular-load v0.4.1 +// Project: https://github.com/urish/angular-load +// Definitions by: david-gang +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.load { + + interface IAngularLoadService { + loadScript(url:string): ng.IPromise; + loadCss(url:string): ng.IPromise; + } + +}