Skip to content

Commit

Permalink
fix(types): add Ref type to parameters in validators, fixes vuelidate…
Browse files Browse the repository at this point in the history
…#1054

add Ref type to parameters to requiredIf, requiredUnless and sameAs
  • Loading branch information
mina-skunk authored May 28, 2022
1 parent a693093 commit 0962038
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/validators/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export const or: <T = unknown>(
...validators: ValidationRule<T>[]
) => ValidationRuleWithoutParams;
export const required: ValidationRuleWithoutParams;
export const requiredIf: (prop: boolean | string | (() => boolean | Promise<boolean>)) => ValidationRuleWithoutParams;
export const requiredUnless: (prop: boolean | string | (() => boolean | Promise<boolean>)) => ValidationRuleWithoutParams;
export const requiredIf: (prop: boolean | Ref<boolean> | string | (() => boolean | Promise<boolean>)) => ValidationRuleWithoutParams;
export const requiredUnless: (prop: boolean | Ref<boolean> | string | (() => boolean | Promise<boolean>)) => ValidationRuleWithoutParams;
export const sameAs: <E = unknown>(
equalTo: E,
equalTo: E | Ref<E>,
otherName?: string
) => ValidationRuleWithParams<{ equalTo: E, otherName: string }>;
export const url: ValidationRuleWithoutParams;
Expand Down

0 comments on commit 0962038

Please sign in to comment.