-
Notifications
You must be signed in to change notification settings - Fork 121
/
index.d.ts
72 lines (67 loc) · 2.57 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
declare module "d3-flame-graph" {
export function flamegraph(): FlameGraph;
export interface StackFrame {
name: string;
value: number;
children: StackFrame[];
}
type LabelHandler = (node: any) => string;
type NameHandler = (node: any) => string;
type ClickHandler = (node: any) => void;
type DetailsHandler = (node: any) => void;
type SearchHandler = (results: any, sum: any, totalValue: any) => void;
type ColorMapper = (node: any, originalColor: string) => string;
type SearchMatch = (node: any, term: string) => boolean;
interface FlameGraph {
(selection: any): any;
selfValue(val: boolean): FlameGraph;
selfValue(): boolean;
width(val: number): FlameGraph;
width(): number;
height(val: number): FlameGraph;
height(): number;
cellHeight(val: number): FlameGraph;
cellHeight(): number;
minFrameSize(val: number): FlameGraph;
minFrameSize(): number;
title(val: string): FlameGraph;
title(): string;
tooltip(val: boolean): FlameGraph;
tooltip(): boolean;
transitionDuration(val: number): FlameGraph;
transitionDuration(): number;
transitionEase(val: string): FlameGraph;
transitionEase(): string;
label(val: LabelHandler): FlameGraph;
label(): LabelHandler;
getName(val: NameHandler): FlameGraph;
getName(): NameHandler;
sort(val: boolean): FlameGraph;
sort(comparator: (a: StackFrame, b: StackFrame) => number): FlameGraph;
sort(): boolean;
inverted(val: boolean): FlameGraph;
inverted(): boolean;
computeDelta(val: boolean): FlameGraph;
computeDelta(): boolean;
resetZoom(): void;
onClick(val: ClickHandler): FlameGraph;
onClick(): ClickHandler;
setDetailsElement(val: HTMLElement | null): FlameGraph;
setDetailsElement(): HTMLElement | null;
setDetailsHandler(val: DetailsHandler): FlameGraph;
setDetailsHandler(): FlameGraph;
setSearchHandler(val: SearchHandler): FlameGraph;
setSearchHandler(): FlameGraph;
setColorMapper(val: ColorMapper): FlameGraph;
setColorMapper(): FlameGraph;
setColorHue(val: string): FlameGraph;
setColorHue(): FlameGraph;
setSearchMatch(val: SearchMatch): FlameGraph;
setSearchMatch(): FlameGraph;
search(term: string): void;
clear(): void;
merge(node: StackFrame): void;
update(node: StackFrame): void;
destroy(): void;
}
}