From 59e4cf29dd25c634f46ea17b9c649f83943ce235 Mon Sep 17 00:00:00 2001 From: "bigopon.777@gmail.com" Date: Tue, 7 Aug 2018 15:05:25 +1000 Subject: [PATCH 1/2] fix(typings): Revert aliasing interface --- src/interfaces.js | 5 ----- src/router.js | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/interfaces.js b/src/interfaces.js index 2a6ac909..08bc2894 100644 --- a/src/interfaces.js +++ b/src/interfaces.js @@ -212,8 +212,3 @@ interface PipelineResult { output: any; completed: boolean; } - -/** -* The result of a router navigation. -*/ -export type NavigationResult = Promise; diff --git a/src/router.js b/src/router.js index c29061d1..cda5b6af 100644 --- a/src/router.js +++ b/src/router.js @@ -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 { 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 { let path = this.generate(route, params); return this.navigate(path, options); } From 28166473d933c5d71e73bde3c437b8968642ab42 Mon Sep 17 00:00:00 2001 From: "bigopon.777@gmail.com" Date: Tue, 7 Aug 2018 16:03:36 +1000 Subject: [PATCH 2/2] add import PipelineResult --- src/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router.js b/src/router.js index cda5b6af..c79bc3fc 100644 --- a/src/router.js +++ b/src/router.js @@ -10,7 +10,7 @@ import { _createRootedPath, _resolveUrl } from './util'; -import {RouteConfig} from './interfaces'; +import {RouteConfig, PipelineResult} from './interfaces'; /** * The primary class responsible for handling routing and navigation.