UNPKG

1.02 kBTypeScriptView Raw
1/**
2 * Attribute to be placed on any HTML element in a view to emit the View instance
3 * to the debug console, giving you insight into the live View instance, including
4 * all child views, live bindings, behaviors and more.
5 */
6export declare class ViewSpy {
7 private logger;
8 private value;
9 private view;
10 /**
11 * Creates a new instance of ViewSpy.
12 */
13 constructor();
14 private _log(lifecycleName, context?);
15 /**
16 * Invoked when the target view is created.
17 * @param view The target view.
18 */
19 created(view: any): void;
20 /**
21 * Invoked when the target view is bound.
22 * @param bindingContext The target view's binding context.
23 */
24 bind(bindingContext: {}): void;
25 /**
26 * Invoked when the target element is attached to the DOM.
27 */
28 attached(): void;
29 /**
30 * Invoked when the target element is detached from the DOM.
31 */
32 detached(): void;
33 /**
34 * Invoked when the target element is unbound.
35 */
36 unbind(): void;
37}