1
|
/**
|
2
|
* @license
|
3
|
* Copyright Google Inc. All Rights Reserved.
|
4
|
*
|
5
|
* Use of this source code is governed by an MIT-style license that can be
|
6
|
* found in the LICENSE file at https://angular.io/license
|
7
|
*/
|
8
|
import { Injector } from '../di';
|
9
|
import { DebugContext } from '../view/index';
|
10
|
export declare class EventListener {
|
11
|
name: string;
|
12
|
callback: Function;
|
13
|
constructor(name: string, callback: Function);
|
14
|
}
|
15
|
/**
|
16
|
* @experimental All debugging apis are currently experimental.
|
17
|
*/
|
18
|
export declare class DebugNode {
|
19
|
private _debugContext;
|
20
|
nativeNode: any;
|
21
|
listeners: EventListener[];
|
22
|
parent: DebugElement | null;
|
23
|
constructor(nativeNode: any, parent: DebugNode | null, _debugContext: DebugContext);
|
24
|
readonly injector: Injector;
|
25
|
readonly componentInstance: any;
|
26
|
readonly context: any;
|
27
|
readonly references: {
|
28
|
[key: string]: any;
|
29
|
};
|
30
|
readonly providerTokens: any[];
|
31
|
/**
|
32
|
* @deprecated since v4
|
33
|
*/
|
34
|
readonly source: string;
|
35
|
}
|
36
|
/**
|
37
|
* @experimental All debugging apis are currently experimental.
|
38
|
*/
|
39
|
export declare class DebugElement extends DebugNode {
|
40
|
name: string;
|
41
|
properties: {
|
42
|
[key: string]: any;
|
43
|
};
|
44
|
attributes: {
|
45
|
[key: string]: string | null;
|
46
|
};
|
47
|
classes: {
|
48
|
[key: string]: boolean;
|
49
|
};
|
50
|
styles: {
|
51
|
[key: string]: string | null;
|
52
|
};
|
53
|
childNodes: DebugNode[];
|
54
|
nativeElement: any;
|
55
|
constructor(nativeNode: any, parent: any, _debugContext: DebugContext);
|
56
|
addChild(child: DebugNode): void;
|
57
|
removeChild(child: DebugNode): void;
|
58
|
insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]): void;
|
59
|
insertBefore(refChild: DebugNode, newChild: DebugNode): void;
|
60
|
query(predicate: Predicate<DebugElement>): DebugElement;
|
61
|
queryAll(predicate: Predicate<DebugElement>): DebugElement[];
|
62
|
queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
|
63
|
readonly children: DebugElement[];
|
64
|
triggerEventHandler(eventName: string, eventObj: any): void;
|
65
|
}
|
66
|
/**
|
67
|
* @experimental
|
68
|
*/
|
69
|
export declare function asNativeElements(debugEls: DebugElement[]): any;
|
70
|
/**
|
71
|
* @experimental
|
72
|
*/
|
73
|
export declare function getDebugNode(nativeNode: any): DebugNode | null;
|
74
|
export declare function getAllDebugNodes(): DebugNode[];
|
75
|
export declare function indexDebugNode(node: DebugNode): void;
|
76
|
export declare function removeDebugNodeFromIndex(node: DebugNode): void;
|
77
|
/**
|
78
|
* A boolean-valued function over a value, possibly including context information
|
79
|
* regarding that value's position in an array.
|
80
|
*
|
81
|
* @experimental All debugging apis are currently experimental.
|
82
|
*/
|
83
|
export interface Predicate<T> {
|
84
|
(value: T): boolean;
|
85
|
}
|