1 | import { Transition } from '../transition/transition';
|
2 | import { ViewTuple } from '../view';
|
3 | import { ActiveUIView, ViewConfig, ViewContext } from '../view/interface';
|
4 | import { Resolvable } from '../resolve/resolvable';
|
5 | import { PathNode } from '../path/pathNode';
|
6 | import { PolicyWhen } from '../resolve/interface';
|
7 | import { TransitionHook } from '../transition/transitionHook';
|
8 | import { HookResult } from '../transition/interface';
|
9 | import { StateObject } from '../state/stateObject';
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | declare enum Category {
|
24 | RESOLVE = 0,
|
25 | TRANSITION = 1,
|
26 | HOOK = 2,
|
27 | UIVIEW = 3,
|
28 | VIEWCONFIG = 4
|
29 | }
|
30 | export { Category };
|
31 |
|
32 |
|
33 |
|
34 | export declare class Trace {
|
35 |
|
36 | approximateDigests: number;
|
37 |
|
38 | private _enabled;
|
39 |
|
40 | constructor();
|
41 | /** @internal */
|
42 | private _set;
|
43 | /**
|
44 | * Enables a trace [[Category]]
|
45 | *
|
46 | * ```js
|
47 | * trace.enable("TRANSITION");
|
48 | * ```
|
49 | *
|
50 | * @param categories categories to enable. If `categories` is omitted, all categories are enabled.
|
51 | * Also takes strings (category name) or ordinal (category position)
|
52 | */
|
53 | enable(...categories: (Category | string | number)[]): any;
|
54 | /**
|
55 | * Disables a trace [[Category]]
|
56 | *
|
57 | * ```js
|
58 | * trace.disable("VIEWCONFIG");
|
59 | * ```
|
60 | *
|
61 | * @param categories categories to disable. If `categories` is omitted, all categories are disabled.
|
62 | * Also takes strings (category name) or ordinal (category position)
|
63 | */
|
64 | disable(...categories: (Category | string | number)[]): any;
|
65 | /**
|
66 | * Retrieves the enabled stateus of a [[Category]]
|
67 | *
|
68 | * ```js
|
69 | * trace.enabled("VIEWCONFIG"); // true or false
|
70 | * ```
|
71 | *
|
72 | * @returns boolean true if the category is enabled
|
73 | */
|
74 | enabled(category: Category | string | number): boolean;
|
75 | /** @internal called by ui-router code */
|
76 | traceTransitionStart(trans: Transition): void;
|
77 | /** @internal called by ui-router code */
|
78 | traceTransitionIgnored(trans: Transition): void;
|
79 | /** @internal called by ui-router code */
|
80 | traceHookInvocation(step: TransitionHook, trans: Transition, options: any): void;
|
81 | /** @internal called by ui-router code */
|
82 | traceHookResult(hookResult: HookResult, trans: Transition, transitionOptions: any): void;
|
83 | /** @internal called by ui-router code */
|
84 | traceResolvePath(path: PathNode[], when: PolicyWhen, trans?: Transition): void;
|
85 | /** @internal called by ui-router code */
|
86 | traceResolvableResolved(resolvable: Resolvable, trans?: Transition): void;
|
87 | /** @internal called by ui-router code */
|
88 | traceError(reason: any, trans: Transition): void;
|
89 | /** @internal called by ui-router code */
|
90 | traceSuccess(finalState: StateObject, trans: Transition): void;
|
91 | /** @internal called by ui-router code */
|
92 | traceUIViewEvent(event: string, viewData: ActiveUIView, extra?: string): void;
|
93 | /** @internal called by ui-router code */
|
94 | traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext): void;
|
95 | /** @internal called by ui-router code */
|
96 | traceUIViewFill(viewData: ActiveUIView, html: string): void;
|
97 | /** @internal called by ui-router code */
|
98 | traceViewSync(pairs: ViewTuple[]): void;
|
99 | /** @internal called by ui-router code */
|
100 | traceViewServiceEvent(event: string, viewConfig: ViewConfig): void;
|
101 | /** @internal called by ui-router code */
|
102 | traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView): void;
|
103 | }
|
104 | /**
|
105 | * The [[Trace]] singleton
|
106 | *
|
107 | * #### Example:
|
108 | * ```js
|
109 | * import {trace} from "@uirouter/core";
|
110 | * trace.enable(1, 5);
|
111 | * ```
|
112 | */
|
113 | declare const trace: Trace;
|
114 | export { trace };
|
115 |
|
\ | No newline at end of file |