mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 06:10:06 +00:00
26 lines
740 B
TypeScript
26 lines
740 B
TypeScript
// Type definitions for leakage 0.4
|
|
// Project: https://github.com/andywer/leakage#readme
|
|
// Definitions by: Arne Schubert <https://github.com/atd-schubert>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export class MemoryLeakError extends Error {}
|
|
|
|
export interface IterateOptions {
|
|
iterations?: number;
|
|
gcollections?: number;
|
|
}
|
|
|
|
export function iterate(iteratorFn: () => void, options?: IterateOptions): Result;
|
|
|
|
export namespace iterate {
|
|
function async(iteratorFn: () => Promise<void>, options?: IterateOptions): Promise<Result>;
|
|
}
|
|
|
|
export interface Result {
|
|
heapDiffs: any[];
|
|
gcollections: number;
|
|
iterations: number;
|
|
|
|
printSummary(title: string, log?: (msg: string) => void): void;
|
|
}
|