1 |
|
2 |
|
3 | import { Aurelia, FrameworkConfiguration } from 'aurelia-framework';
|
4 | import { IStaticResourceConfig, TargetInstruction } from 'aurelia-templating';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare class CompileSpy {
|
12 | |
13 |
|
14 |
|
15 |
|
16 |
|
17 | constructor(element: Element, instruction: TargetInstruction);
|
18 | }
|
19 | /**
|
20 | * Attribute to be placed on any HTML element in a view to emit the View instance
|
21 | * to the debug console, giving you insight into the live View instance, including
|
22 | * all child views, live bindings, behaviors and more.
|
23 | */
|
24 | export declare class ViewSpy {
|
25 | static $resource: IStaticResourceConfig;
|
26 | private logger;
|
27 | private value;
|
28 | private view;
|
29 | |
30 |
|
31 |
|
32 | constructor();
|
33 | private _log;
|
34 | /**
|
35 | * Invoked when the target view is created.
|
36 | * @param view The target view.
|
37 | */
|
38 | created(view: any): void;
|
39 | /**
|
40 | * Invoked when the target view is bound.
|
41 | * @param bindingContext The target view's binding context.
|
42 | */
|
43 | bind(bindingContext: {}): void;
|
44 | /**
|
45 | * Invoked when the target element is attached to the DOM.
|
46 | */
|
47 | attached(): void;
|
48 | /**
|
49 | * Invoked when the target element is detached from the DOM.
|
50 | */
|
51 | detached(): void;
|
52 | /**
|
53 | * Invoked when the target element is unbound.
|
54 | */
|
55 | unbind(): void;
|
56 | }
|
57 | export declare class StageComponent {
|
58 | static withResources<T = any>(resources?: string | string[]): ComponentTester<T>;
|
59 | }
|
60 | export declare class ComponentTester<T = any> {
|
61 | bind: (bindingContext: {}) => Promise<void>;
|
62 | attached: () => Promise<void>;
|
63 | detached: () => Promise<void>;
|
64 | unbind: () => Promise<void>;
|
65 | element: Element;
|
66 | viewModel: T;
|
67 | private html;
|
68 | private resources;
|
69 | private bindingContext;
|
70 | private rootView;
|
71 | private host;
|
72 | configure(aurelia: Aurelia): FrameworkConfiguration;
|
73 | bootstrap(configure: (aurelia: Aurelia) => FrameworkConfiguration): void;
|
74 | withResources(resources: string | string[]): this;
|
75 | inView(html: string): this;
|
76 | boundTo(bindingContext: {}): this;
|
77 | manuallyHandleLifecycle(): this;
|
78 | create(bootstrap: (configure: (aurelia: Aurelia) => Promise<void>) => Promise<void>): Promise<void>;
|
79 | dispose(): Element;
|
80 | private _prepareLifecycle;
|
81 | waitForElement(selector: string, options?: {
|
82 | present?: boolean;
|
83 | interval?: number;
|
84 | timeout?: number;
|
85 | }): Promise<Element>;
|
86 | waitForElements(selector: string, options?: {
|
87 | present?: boolean;
|
88 | interval?: number;
|
89 | timeout?: number;
|
90 | }): Promise<NodeListOf<Element>>;
|
91 | }
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 | export declare function waitFor<T>(getter: () => T, options?: {
|
101 | present?: boolean;
|
102 | interval?: number;
|
103 | timeout?: number;
|
104 | }): Promise<T>;
|
105 | export declare function waitForDocumentElement(selector: string, options?: {
|
106 | present?: boolean;
|
107 | interval?: number;
|
108 | timeout?: number;
|
109 | }): Promise<Element>;
|
110 | export declare function waitForDocumentElements(selector: string, options?: {
|
111 | present?: boolean;
|
112 | interval?: number;
|
113 | timeout?: number;
|
114 | }): Promise<NodeListOf<Element>>;
|
115 | export declare function configure(config: FrameworkConfiguration): void;
|
116 |
|
117 | export {};
|