Skip to content

Commit

Permalink
added types for transition options and nodeName
Browse files Browse the repository at this point in the history
  • Loading branch information
nrakic90 committed May 25, 2018
1 parent d7afde2 commit 4303d2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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;
Expand Down

0 comments on commit 4303d2f

Please sign in to comment.