-
Notifications
You must be signed in to change notification settings - Fork 47
/
index.d.ts
81 lines (72 loc) · 2.32 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* The specific action format used within redux-ui-router
*/
export interface ReduxUIRouterAction {
type: string;
payload: any;
}
/**
* The type of a redux-ui-router route
*/
export interface ReduxUIRoute {
name: string;
params: any;
url: string;
}
/**
* The shape of the state tree used to manage the state of redux-ui-router
*/
export interface ReduxUIRouterState {
currentState: ReduxUIRoute;
currentParams: any;
prevState: ReduxUIRoute;
prevParams: any;
}
/**
* The middleware function to provide to Redux's combineReducers()
* function.
*/
export function router(state: ReduxUIRouterState, action: ReduxUIRouterAction): ReduxUIRouterState;
/**
* The name of the provided angular module that can be injected into
* the application's top-level module.
*/
export var ngReduxUiRouter: string;
/**
* This action create will trigger a $state.go in the UiRouter Middleware.
* Accepts a payload which matches the UI Router $state.go function.
*
* http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state
*
* @param {String} to - State name
* @param {Object} params - (optional) Parameters to send with state
* @param {Object} options - (optional) Options object
* @return {Object} Action object
*/
export function stateGo(to: string, params?: any, options?: any): ReduxUIRouterAction;
/**
* This action create will trigger a $state.reload in the UiRouter Middleware.
* Accepts a payload which matches the UI Router $state.reload function.
*
* http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state
*
* @param {String} state - (optional) Root of the resolves to be re-resolved
* @return {Object} Action object
*/
export function stateReload(state: any): ReduxUIRouterAction;
/**
* This action create will trigger a $state.transitionTo in the UiRouter Middleware.
* Accepts a payload which matches the UI Router $state.transitionTo function.
*
* http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state
*
* @param {String} to - State name
* @param {Object} toParams - (optional) Parameters to send with state
* @param {Object} options - (optional) Options object
* @return {Object} Action object
*/
export function stateTransitionTo(to: string, params?: any, options?: any): ReduxUIRouterAction;
/**
* The default export is the name of the provided angular module
*/
export default ngReduxUiRouter;