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;