Skip to content

Commit

Permalink
fix(typings): Revert aliasing interface
Browse files Browse the repository at this point in the history
  • Loading branch information
bigopon committed Aug 7, 2018
1 parent ddb9be1 commit 59e4cf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/interfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,3 @@ interface PipelineResult {
output: any;
completed: boolean;
}

/**
* The result of a router navigation.
*/
export type NavigationResult = Promise<PipelineResult | boolean>;
6 changes: 3 additions & 3 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
_createRootedPath,
_resolveUrl
} from './util';
import {RouteConfig, NavigationResult} from './interfaces';
import {RouteConfig} from './interfaces';

/**
* The primary class responsible for handling routing and navigation.
Expand Down Expand Up @@ -218,7 +218,7 @@ export class Router {
* @param fragment The URL fragment to use as the navigation destination.
* @param options The navigation options.
*/
navigate(fragment: string, options?: NavigationOptions): NavigationResult {
navigate(fragment: string, options?: NavigationOptions): Promise<PipelineResult | boolean> {
if (!this.isConfigured && this.parent) {
return this.parent.navigate(fragment, options);
}
Expand All @@ -235,7 +235,7 @@ export class Router {
* @param params The route parameters to be used when populating the route pattern.
* @param options The navigation options.
*/
navigateToRoute(route: string, params?: any, options?: NavigationOptions): NavigationResult {
navigateToRoute(route: string, params?: any, options?: NavigationOptions): Promise<PipelineResult | boolean> {
let path = this.generate(route, params);
return this.navigate(path, options);
}
Expand Down

0 comments on commit 59e4cf2

Please sign in to comment.