Skip to content

Commit

Permalink
dedupe
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlexLichter committed Nov 12, 2023
1 parent d1a91ed commit 092fec5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/internal/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export type ValidateFunction<T> = (
/**
* Validates the given data using the provided validation function.
* @template T The expected type of the validated data.
* @param {unknown} data The data to validate.
* @param {ValidateFunction<T>} fn The validation function to use - can be async.
* @returns {Promise<T>} A Promise that resolves with the validated data if it passes validation, meaning the validation function does not throw and returns a value other than false.
* @param data The data to validate.
* @param fn The validation function to use - can be async.
* @returns A Promise that resolves with the validated data if it passes validation, meaning the validation function does not throw and returns a value other than false.
* @throws {ValidationError} If the validation function returns false or throws an error.
*/
export async function validateData<T>(
Expand Down

0 comments on commit 092fec5

Please sign in to comment.