mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-17 15:30:26 +00:00
* react-addons-perf: Update APIs to version 15.1.0 https://facebook.github.io/react/docs/perf.html * Add deprecation comment to printDOM() * Add more exported APIs https://github.com/facebook/react/blob/d101f68bce34a62613a3e86981266111e8950267/src/renderers/shared/ReactPerf.js#L432
54 lines
1.9 KiB
TypeScript
54 lines
1.9 KiB
TypeScript
// 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;
|
|
}
|