forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
react-addons-perf.d.ts
53 lines (46 loc) · 1.91 KB
/
react-addons-perf.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
// Type definitions for React v15.1.0 (react-addons-perf)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
interface ComponentPerfContext {
current: string;
owner: string;
}
interface NumericPerfContext {
[key: string]: number;
}
interface Measurements {
exclusive: NumericPerfContext;
inclusive: NumericPerfContext;
render: NumericPerfContext;
counts: NumericPerfContext;
writes: NumericPerfContext;
displayNames: {
[key: string]: ComponentPerfContext;
};
totalTime: number;
}
namespace __Addons {
namespace Perf {
export function start(): void;
export function stop(): void;
export function printInclusive(measurements?: Measurements[]): void;
export function printExclusive(measurements?: Measurements[]): void;
export function printWasted(measurements?: Measurements[]): void;
export function printOperations(measurements?: Measurements[]): void;
export function getLastMeasurements(): Measurements[];
export function getExclusive(measurements?: Measurements[]): any;
export function getInclusive(measurements?: Measurements[]): any;
export function getWasted(measurements?: Measurements[]): any;
export function getOperations(measurements?: Measurements[]): any;
// Renamed to printOperations(). Please use it instead.
export function printDOM(measurements?: Measurements[]): void;
}
}
}
declare module "react-addons-perf" {
import Perf = __React.__Addons.Perf;
export = Perf;
}