Skip to content

Commit

Permalink
Merge pull request #2892 from krymen/support-null-in-falsy-truthy-types
Browse files Browse the repository at this point in the history
Allow null values in BooleanSchema methods
  • Loading branch information
Marsup committed Feb 4, 2023
2 parents b23659d + 5688913 commit c09a2e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ declare namespace Joi {
* see `boolean.sensitive()` to change this behavior.
* @param values - strings, numbers or arrays of them
*/
falsy(...values: Array<string | number>): this;
falsy(...values: Array<string | number | null>): this;

/**
* Allows the values provided to truthy and falsy as well as the "true" and "false" default conversion
Expand All @@ -1341,7 +1341,7 @@ declare namespace Joi {
* String comparisons are by default case insensitive, see `boolean.sensitive()` to change this behavior.
* @param values - strings, numbers or arrays of them
*/
truthy(...values: Array<string | number>): this;
truthy(...values: Array<string | number | null>): this;
}

interface NumberSchema<TSchema = number> extends AnySchema<TSchema> {
Expand Down

0 comments on commit c09a2e4

Please sign in to comment.