/// import { CB, Maybe, Nullable, ValueOf } from 'vest-utils'; import { TIsolate } from 'vestjs-runtime'; declare enum Severity { WARNINGS = "warnings", ERRORS = "errors" } declare enum TestSeverity { Error = "error", Warning = "warning" } declare const TestStatus: { [x: string]: string; CANCELED: string; FAILED: string; OMITTED: string; PASSING: string; SKIPPED: string; UNTESTED: string; WARNING: string; }; type TestStatus = ValueOf; type TIsolateTest = TIsolate & IsolateTestPayload>; type IsolateTestPayload = CommonTestFields & { severity: TestSeverity; status: TestStatus; asyncTest?: AsyncTest; }; type CommonTestFields = { message?: Maybe; groupName?: G; fieldName: F; testFn: TestFn; }; declare class SummaryFailure implements WithFieldName { fieldName: F; message: string | undefined; groupName: G | undefined; constructor(fieldName: F, message: string | undefined, groupName: G | undefined); static fromTestObject(testObject: TIsolateTest): SummaryFailure; } interface Done { (...args: [ cb: (res: SuiteResult) => void ]): SuiteRunResult; (...args: [ fieldName: F, cb: (res: SuiteResult) => void ]): SuiteRunResult; } interface SuiteSelectors { getWarning(): SummaryFailure | undefined; getWarning(fieldName: F): string | undefined; getWarning(fieldName?: F): SummaryFailure | string | undefined; getError(): SummaryFailure | undefined; getError(fieldName: F): string | undefined; getError(fieldName?: F): SummaryFailure | string | undefined; getMessage(fieldName: F): string | undefined; getErrors(): FailureMessages; getErrors(fieldName: F): string[]; getErrors(fieldName?: F): string[] | FailureMessages; getWarnings(): FailureMessages; getWarnings(fieldName: F): string[]; getWarnings(fieldName?: F): string[] | FailureMessages; getErrorsByGroup(groupName: G): FailureMessages; getErrorsByGroup(groupName: G, fieldName: F): string[]; getErrorsByGroup(groupName: G, fieldName?: F): string[] | FailureMessages; getWarningsByGroup(groupName: G): FailureMessages; getWarningsByGroup(groupName: G, fieldName: F): string[]; getWarningsByGroup(groupName: G, fieldName?: F): string[] | FailureMessages; hasErrors(fieldName?: F): boolean; hasWarnings(fieldName?: F): boolean; hasErrorsByGroup(groupName: G, fieldName?: F): boolean; hasWarningsByGroup(groupName: G, fieldName?: F): boolean; isTested(fieldName: F): boolean; isPending(fieldName?: F): boolean; isValid(fieldName?: F): boolean; isValidByGroup(groupName: G, fieldName?: F): boolean; } declare class SummaryBase { errorCount: number; warnCount: number; testCount: number; pendingCount: number; } declare class SuiteSummary extends SummaryBase { [Severity.ERRORS]: SummaryFailure[]; [Severity.WARNINGS]: SummaryFailure[]; groups: Groups; tests: Tests; valid: Nullable; } type GroupTestSummary = SingleTestSummary; type Groups = Record>; type Group = Record; type Tests = Record; type SingleTestSummary = SummaryBase & { errors: string[]; warnings: string[]; valid: Nullable; pendingCount: number; }; type FailureMessages = Record; type SuiteResult = SuiteSummary & SuiteSelectors & { suiteName: SuiteName; }; type SuiteRunResult = SuiteResult & { done: Done; }; type SuiteName = Maybe; type TFieldName = T; type TGroupName = G; type TestFnPayload = { signal: AbortSignal; }; type TestFn = (payload: TestFnPayload) => TestResult; type AsyncTest = Promise; type TestResult = Maybe | void; type WithFieldName = { fieldName: F; }; declare function debounce(callback: Callback, delay?: number): TestFn; declare class IsolateDebounceReconciler { static match(currentNode: TIsolate, historyNode: TIsolate): boolean; static reconcile(current: TIsolateDebounce, history: TIsolateDebounce): TIsolateDebounce; } type TIsolateDebounce = TIsolate; type IsolateDebouncePayload = { clearTimeout: () => void; }; export { debounce as default, IsolateDebounceReconciler, TIsolateDebounce, IsolateDebouncePayload }; //# sourceMappingURL=debounce.d.ts.map