From 4303d2fa6b9fb93775f2ea1397bfca5b143c6848 Mon Sep 17 00:00:00 2001 From: Nenad Rakic Date: Fri, 25 May 2018 10:40:15 +0200 Subject: [PATCH] added types for transition options and nodeName --- src/index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index 98ab78a..8a5e2b8 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,6 +1,7 @@ import {State} from "router5"; import {IComputedValue} from "mobx/lib/core/computedvalue"; import {Route, Router} from "router5/create-router"; +import {Options} from "router5/core/navigation"; declare module "mobx-router5" { import {PluginFactory} from "router5/core/plugins"; @@ -19,12 +20,12 @@ declare module "mobx-router5" { public updateRoute: (routeType: string, route: Route) => void; public resetRoute: (routeType: string) => void; public onTransitionStart: (route: Route, previousRoute: Route) => void; - public onTransitionSuccess: (route: Route, previousRoute: Route, opts) => void; + public onTransitionSuccess: (route: Route, previousRoute: Route, opts: Options) => void; public onTransitionCancel: (route: Route, previousRoute: Route) => void; public onTransitionError: (route: Route, previousRoute: Route, transitionError: any) => void; public clearErrors: () => void; public navigate: (toRoute: string, params?: Params) => void; - public shouldUpdateNodeFactory: (nodeName) => IComputedValue<(toState: State, fromState?: State) => Boolean>; + public shouldUpdateNodeFactory: (nodeName: string) => IComputedValue<(toState: State, fromState?: State) => Boolean>; } function mobxPlugin(routerStore: RouterStore): PluginFactory;