diff --git a/joi/joi-tests.ts b/joi/joi-tests.ts index bfb039eced..f12552ead1 100644 --- a/joi/joi-tests.ts +++ b/joi/joi-tests.ts @@ -734,6 +734,7 @@ namespace common { schema = Joi.alternatives(); schema = Joi.alternatives().try(schemaArr); +schema = Joi.alternatives().try(schema, schema); schema = Joi.alternatives(schemaArr); schema = Joi.alternatives(schema, anySchema, boolSchema); diff --git a/joi/joi.d.ts b/joi/joi.d.ts index 6b9d1dbefa..8f9fa6db95 100644 --- a/joi/joi.d.ts +++ b/joi/joi.d.ts @@ -691,6 +691,7 @@ declare module 'joi' { export interface AlternativesSchema extends AnySchema { try(schemas: Schema[]): AlternativesSchema; + try(type1: Schema, type2: Schema, ...types: Schema[]): AlternativesSchema; when(ref: string, options: WhenOptions): AlternativesSchema; when(ref: Reference, options: WhenOptions): AlternativesSchema; }