UNPKG

@sauce-api/core

Version:

Sauce API core functionality

12 lines (11 loc) 615 B
import { Sauce } from "../Sauce"; import { SauceConfig } from "../resources/SauceConfig"; import { ObjectOfAnything } from "../resources/Common"; export type policyMethod<custom> = (Sauce: Sauce<custom>) => Promise<void>; export type policyList<custom> = Map<String, policyMethod<custom>>; export declare function setPolicies<custom = ObjectOfAnything>(policies: SauceConfig["policies"]): policyList<custom>; export declare class Policies<custom = ObjectOfAnything> { private policyList; constructor(policyList: policyList<custom>); runPolicy(policyName: string, Sauce: Sauce<custom>): Promise<void>; }