mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
Initial React v0.14 definitions
This commit is contained in:
Vendored
+46
@@ -0,0 +1,46 @@
|
||||
// Type definitions for React v0.14 (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/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="react.d.ts" />
|
||||
|
||||
declare namespace __React {
|
||||
namespace __Addons {
|
||||
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 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 printDOM(measurements: Measurements[]): void;
|
||||
export function getLastMeasurements(): Measurements[];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare module "react-addons-perf" {
|
||||
import Perf = __React.__Addons.Perf;
|
||||
export = Perf;
|
||||
}
|
||||
Reference in New Issue
Block a user