UNPKG

1.2 kBTypeScriptView Raw
1import { Executor } from '../executors/Executor';
2import BenchmarkTest, { BenchmarkDeferredTestFunction, BenchmarkTestFunction } from '../BenchmarkTest';
3import { BenchmarkSuiteProperties } from '../BenchmarkSuite';
4export default function registerSuite(name: string, descriptorOrFactory: BenchmarkSuiteDescriptor | BenchmarkSuiteFactory | BenchmarkTests): void;
5export declare function getInterface(executor: Executor): {
6 registerSuite(name: string, descriptorOrFactory: BenchmarkSuiteDescriptor | BenchmarkSuiteFactory | BenchmarkTests): void;
7 async: typeof BenchmarkTest.async;
8};
9export interface BenchmarkInterface {
10 registerSuite(name: string, descriptor: BenchmarkSuiteDescriptor | BenchmarkSuiteFactory | BenchmarkTests): void;
11 async: (testFunction: BenchmarkDeferredTestFunction, numCallsUntilResolution?: number) => BenchmarkTestFunction;
12}
13export interface BenchmarkTests {
14 [name: string]: BenchmarkSuiteDescriptor | BenchmarkTestFunction | BenchmarkTests;
15}
16export interface BenchmarkSuiteDescriptor extends Partial<BenchmarkSuiteProperties> {
17 tests: BenchmarkTests;
18}
19export interface BenchmarkSuiteFactory {
20 (): BenchmarkSuiteDescriptor | BenchmarkTests;
21}