import { ExpectFn } from './adapter-chai-expect';
import { Assert, TestContext } from './types-internal';
export { Assert, TestContext } from './types-internal';
export declare type MatchingSpecs
= Partial<{
[K in keyof P]: P[K] extends unknown[] ? Specification
| Readonly
| MatchingSpecs
>[] : P[K] extends object ? MatchingSpecs
: P[K] | Specification
| Specification>;
}>;
declare type Annotations = {
$topic?: string;
$spec?: string;
$description?: string;
};
export declare type Specifications = Annotations & MatchingSpecs
;
export declare type Specification = Annotations & {
(val: T): boolean;
};
export declare type SpokFunction = (t: Assert | TestContext, obj: T, specifications: Specifications, prefix?: string | null) => void;
export declare type SpokFunctionAny = (t: Assert, obj: T, specifications: P, prefix?: string | null) => void;
export declare type SpokConfig = {
printSpec: boolean;
printDescription: boolean;
sound: boolean;
color: boolean;
};
export declare type SpokAssertions = {
gtz: Specification;
gez: Specification;
ltz: Specification;
lez: Specification;
array: Specification;
number: Specification;
string: Specification;
function: Specification;
definedObject: Specification;
defined: Specification;
notDefined: Specification;
range(min: number, max: number): Specification;
gt(x: number): Specification;
ge(x: number): Specification;
lt(x: number): Specification;
le(x: number): Specification;
ne(x: unknown): Specification;
type(x: string): Specification;
arrayElements(n: number): Specification;
arrayElementsRange(min: number, max: number): Specification;
startsWith(what: string): Specification;
endsWith(what: string): Specification;
test(regex: RegExp): Specification;
};
export declare type Spok = SpokFunction & SpokAssertions & SpokConfig & {
any: SpokFunctionAny;
adapters: {
chaiExpect: (expectFn: ExpectFn) => Assert;
};
};
//# sourceMappingURL=types.d.ts.map