diff --git a/angularjs/angular-component-router.d.ts b/angularjs/angular-component-router.d.ts index e015a712a1..2c56ef3a21 100644 --- a/angularjs/angular-component-router.d.ts +++ b/angularjs/angular-component-router.d.ts @@ -45,7 +45,7 @@ declare namespace angular { specificity(): number; - resolveComponent(): Promise; + resolveComponent(): IPromise; /** * converts the instruction into a URL string @@ -87,20 +87,20 @@ declare namespace angular { * Called by the Router to instantiate a new component during the commit phase of a navigation. * This method in turn is responsible for calling the `routerOnActivate` hook of its child. */ - activate(nextInstruction: ComponentInstruction): Promise; + activate(nextInstruction: ComponentInstruction): IPromise; /** * Called by the {@link Router} during the commit phase of a navigation when an outlet * reuses a component between different routes. * This method in turn is responsible for calling the `routerOnReuse` hook of its child. */ - reuse(nextInstruction: ComponentInstruction): Promise; + reuse(nextInstruction: ComponentInstruction): IPromise; /** * Called by the {@link Router} when an outlet disposes of a component's contents. * This method in turn is responsible for calling the `routerOnDeactivate` hook of its child. */ - deactivate(nextInstruction: ComponentInstruction): Promise; + deactivate(nextInstruction: ComponentInstruction): IPromise; /** * Called by the {@link Router} during recognition phase of a navigation. @@ -110,7 +110,7 @@ declare namespace angular { * This method delegates to the child component's `routerCanDeactivate` hook if it exists, * and otherwise resolves to true. */ - routerCanDeactivate(nextInstruction: ComponentInstruction): Promise; + routerCanDeactivate(nextInstruction: ComponentInstruction): IPromise; /** * Called by the {@link Router} during recognition phase of a navigation. @@ -122,7 +122,7 @@ declare namespace angular { * Otherwise, this method delegates to the child component's `routerCanReuse` hook if it exists, * or resolves to true if the hook is not present. */ - routerCanReuse(nextInstruction: ComponentInstruction): Promise; + routerCanReuse(nextInstruction: ComponentInstruction): IPromise; } interface RouteRegistry { @@ -140,7 +140,7 @@ declare namespace angular { * Given a URL and a parent component, return the most specific instruction for navigating * the application into the state specified by the url */ - recognize(url: string, ancestorInstructions: Instruction[]): Promise; + recognize(url: string, ancestorInstructions: Instruction[]): IPromise; /** * Given a normalized list with component names and params like: `['user', {id: 3 }]` @@ -197,14 +197,14 @@ declare namespace angular { * * You probably don't need to use this unless you're writing a reusable component. */ - registerPrimaryOutlet(outlet: RouterOutlet): Promise; + registerPrimaryOutlet(outlet: RouterOutlet): IPromise; /** * Register an outlet to notified of auxiliary route changes. * * You probably don't need to use this unless you're writing a reusable component. */ - registerAuxOutlet(outlet: RouterOutlet): Promise; + registerAuxOutlet(outlet: RouterOutlet): IPromise; /** * Given an instruction, returns `true` if the instruction is currently active, @@ -224,7 +224,7 @@ declare namespace angular { * ]); * ``` */ - config(definitions: RouteDefinition[]): Promise; + config(definitions: RouteDefinition[]): IPromise; /** * Navigate based on the provided Route Link DSL. It's preferred to navigate with this method @@ -238,7 +238,7 @@ declare namespace angular { * ``` * See the {@link RouterLink} directive for more. */ - navigate(linkParams: any[]): Promise; + navigate(linkParams: any[]): IPromise; /** * Navigate to a URL. Returns a promise that resolves when navigation is complete. @@ -247,19 +247,19 @@ declare namespace angular { * If the given URL begins with a `/`, router will navigate absolutely. * If the given URL does not begin with `/`, the router will navigate relative to this component. */ - navigateByUrl(url: string, _skipLocationChange?: boolean): Promise; + navigateByUrl(url: string, _skipLocationChange?: boolean): IPromise; /** * Navigate via the provided instruction. Returns a promise that resolves when navigation is * complete. */ navigateByInstruction(instruction: Instruction, - _skipLocationChange?: boolean): Promise; + _skipLocationChange?: boolean): IPromise; /** * Updates this router and all descendant routers according to the given instruction */ - commit(instruction: Instruction, _skipLocationChange?: boolean): Promise; + commit(instruction: Instruction, _skipLocationChange?: boolean): IPromise; /** * Subscribe to URL updates from the router @@ -269,18 +269,18 @@ declare namespace angular { /** * Removes the contents of this router's outlet and all descendant outlets */ - deactivate(instruction: Instruction): Promise; + deactivate(instruction: Instruction): IPromise; /** * Given a URL, returns an instruction representing the component graph */ - recognize(url: string): Promise; + recognize(url: string): IPromise; /** * Navigates to either the last URL successfully navigated to, or the last URL requested if the * router has yet to successfully navigate. */ - renavigate(): Promise; + renavigate(): IPromise; /** * Generate an `Instruction` based on the provided Route Link DSL. @@ -364,7 +364,7 @@ declare namespace angular { * {@example router/ts/can_deactivate/can_deactivate_example.ts region='routerCanDeactivate'} */ interface CanDeactivate { - $routerCanDeactivate(next?: ComponentInstruction, prev?: ComponentInstruction): boolean | Promise; + $routerCanDeactivate(next?: ComponentInstruction, prev?: ComponentInstruction): boolean | IPromise; } /** @@ -407,7 +407,7 @@ declare namespace angular { * {@example router/ts/reuse/reuse_example.ts region='reuseCmp'} */ interface CanReuse { - $routerCanReuse(next?: angular.ComponentInstruction, prev?: angular.ComponentInstruction): boolean | Promise; + $routerCanReuse(next?: angular.ComponentInstruction, prev?: angular.ComponentInstruction): boolean | IPromise; } /**