Skip to content

Commit

Permalink
Merge pull request #1301 from fugufish/update_checker_function_type
Browse files Browse the repository at this point in the history
updates the Validators.Base.CheckerFunction typing to be more strict,…
  • Loading branch information
icebob authored Nov 14, 2024
2 parents 525c582 + 30644b9 commit 98e1ed6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/validators/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ declare namespace BaseValidator {
paramName?: string;
}

export type CheckerFunction = Function & { async: boolean };
type CheckerFunctionBase = (params: Record<string, unknown>, opts?: { meta: { ctx: Context } }) => boolean | Promise<boolean>
export type CheckerFunction = CheckerFunctionBase & { async?: boolean };
}

declare abstract class BaseValidator {
Expand Down

0 comments on commit 98e1ed6

Please sign in to comment.