From 28e1983bfd53639afd91336a5c37a87d7f5684d1 Mon Sep 17 00:00:00 2001 From: David Herges Date: Tue, 5 Sep 2017 03:23:36 +0200 Subject: [PATCH] docs(RouterStore): Fix type signature of ROUTER_NAVIGATION action (#344) --- docs/router-store/README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/router-store/README.md b/docs/router-store/README.md index a3907c2366..4574848bc0 100644 --- a/docs/router-store/README.md +++ b/docs/router-store/README.md @@ -14,13 +14,23 @@ Install @ngrx/router-store from npm: ## Usage -During the navigation, before any guards or resolvers run, the router will dispatch a ROUTER_NAVIGATION action, which has the following signature: +During the navigation, before any guards or resolvers run, the router will dispatch a `ROUTER_NAVIGATION` action, which has the signature `RouterNavigationAction`: ```ts -export type RouterNavigationPayload = { - routerState: T, - event: RoutesRecognized -} +/** + * Payload of ROUTER_NAVIGATION. + */ +export declare type RouterNavigationPayload = { + routerState: T; + event: RoutesRecognized; +}; +/** + * An action dispatched when the router navigates. + */ +export declare type RouterNavigationAction = { + type: typeof ROUTER_NAVIGATION; + payload: RouterNavigationPayload; +}; ``` - Reducers receive this action. Throwing an error in the reducer cancels navigation.