Permalink
Browse files

fix(typings): Revert aliasing interface

  • Loading branch information...
bigopon committed Aug 7, 2018
1 parent ddb9be1 commit 59e4cf29dd25c634f46ea17b9c649f83943ce235
Showing with 3 additions and 8 deletions.
  1. +0 −5 src/interfaces.js
  2. +3 −3 src/router.js
@@ -212,8 +212,3 @@ interface PipelineResult {
output: any;
completed: boolean;
}
/**
* The result of a router navigation.
*/
export type NavigationResult = Promise<PipelineResult | boolean>;
@@ -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.
@@ -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);
}
@@ -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);
}

0 comments on commit 59e4cf2

Please sign in to comment.