@pact-foundation/pact-core
Version:
Core of @pact-foundation/pact. You almost certainly don't want to depend on this directly.
8 lines (7 loc) • 457 B
TypeScript
export declare const wrapWithCheck: <F extends (...args: never[]) => boolean>(f: BooleanFunction<F>, contextMessage: string) => (...args: Parameters<F>) => boolean;
type BooleanFunction<T> = T extends (...args: infer A) => boolean ? (...args: A) => boolean : never;
type BooleanFunctions<T> = {
[key in keyof T]: BooleanFunction<T[key]>;
};
export declare const wrapAllWithCheck: <T extends BooleanFunctions<T>>(o: T) => BooleanFunctions<T>;
export {};