Skip to content

Commit

Permalink
types(vest): Add types for skipWhen
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Nov 2, 2021
1 parent f0f066d commit 9555d1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vest/src/typings/vest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,16 @@ interface ICreateResult {
subscribe: (payload: ISubscribePayload) => void;
}

interface ISkipWhen {
(conditional: boolean | (() => boolean), callback: () => void): void;
}

declare namespace vest {
const enforce: TEnforce;
const test: ITest;
const only: IOnly;
const skip: ISkip;
const skipWhen: ISkipWhen;

function optional(optionalFields: string | string[]): boolean;

Expand Down

0 comments on commit 9555d1b

Please sign in to comment.