UNPKG

1.02 kBTypeScriptView Raw
1/** @module rx */
2/** */
3import "rxjs/add/operator/mergeMap";
4import "rxjs/add/operator/map";
5import { Observable } from "rxjs/Observable";
6import { Transition, UIRouter, StateDeclaration, UIRouterPlugin } from "@uirouter/core";
7export interface StatesChangedEvent {
8 currentStates: StateDeclaration[];
9 registered: StateDeclaration[];
10 deregistered: StateDeclaration[];
11}
12declare module '@uirouter/core/lib/globals' {
13 interface UIRouterGlobals {
14 states$?: Observable<StatesChangedEvent>;
15 start$?: Observable<Transition>;
16 success$?: Observable<Transition>;
17 params$?: Observable<{
18 [paramName: string]: any;
19 }>;
20 }
21}
22/** Augments UIRouterGlobals with observables for transition starts, successful transitions, and state parameters */
23export declare class UIRouterRx implements UIRouterPlugin {
24 name: string;
25 private deregisterFns;
26 constructor(router: UIRouter);
27 dispose(): void;
28}
29export declare const UIRouterRxPlugin: typeof UIRouterRx;