Skip to content

Commit

Permalink
Fixed missing types
Browse files Browse the repository at this point in the history
  • Loading branch information
ozziest committed Dec 25, 2023
1 parent a1077ef commit 4f70f71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type RuleType =
| "string"
| "url";

export type RuleFunction = (...args: any[]) => Promise<boolean>;
export type RuleFunction = (...args: any[]) => Promise<boolean> | boolean;

export type ValidationResult = Record<string, IRuleResult[]>;

Expand Down
2 changes: 1 addition & 1 deletion src/rules/isRequired.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default async (value: any): Promise<boolean> => {
export default (value: any): boolean => {
if (value === null || value === undefined) {
return false;
}
Expand Down

0 comments on commit 4f70f71

Please sign in to comment.