Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace RuleType

Index

Type aliases

BasicType

0.0.46 provide
BasicType: boolean | number | string | any[] | object | null

CoerceFunction

0.0.46 provide
CoerceFunction: (value: any, helpers: CustomHelpers) => CoerceResult

Type declaration

ComparatorFunction

0.0.46 provide
ComparatorFunction: (a: any, b: any) => boolean

Type declaration

    • (a: any, b: any): boolean
    • Parameters

      • a: any
      • b: any

      Returns boolean

CustomValidator

0.0.46 provide
CustomValidator<V>: (value: V, helpers: CustomHelpers) => V | ErrorReport

Type parameters

  • V = any

Type declaration

ExtensionBoundSchema

0.0.46 provide
ExtensionBoundSchema: Schema & SchemaInternals

ExtensionFactory

0.0.46 provide
ExtensionFactory: (joi: Root) => Extension

Type declaration

ExternalValidationFunction

0.0.46 provide
ExternalValidationFunction: (value: any) => any

Type declaration

    • (value: any): any
    • Parameters

      • value: any

      Returns any

GuidVersions

0.0.46 provide
GuidVersions: "uuidv1" | "uuidv2" | "uuidv3" | "uuidv4" | "uuidv5"

LanguageMessages

0.0.46 provide
LanguageMessages: Record<string, string>

NullableType

0.0.46 provide
NullableType<T>: undefined | null | T

Type parameters

  • T

ObjectPropertiesSchema

0.0.46 provide
ObjectPropertiesSchema<T>: T extends NullableType<string> ? StringSchema : T extends NullableType<number> ? NumberSchema : T extends NullableType<bigint> ? NumberSchema : T extends NullableType<boolean> ? BooleanSchema : T extends NullableType<any[]> ? ArraySchema : T extends NullableType<object> ? ObjectSchema<StrictSchemaMap<T>> : never

Type parameters

  • T = any

PartialSchemaMap

0.0.46 provide
PartialSchemaMap<TSchema>: {[ key in keyof TSchema]: SchemaLike | SchemaLike[] }

Type parameters

  • TSchema = any

PresenceMode

0.0.46 provide
PresenceMode: "optional" | "required" | "forbidden"

RuleMethod

0.0.46 provide
RuleMethod: (...args: any[]) => any

Type declaration

    • (...args: any[]): any
    • Parameters

      • Rest ...args: any[]

      Returns any

Schema

0.0.46 provide

Type parameters

  • P = any

SchemaFunction

0.0.46 provide
SchemaFunction: (schema: Schema) => Schema

Type declaration

SchemaLike

0.0.46 provide
SchemaLike: SchemaLikeWithoutArray | object

SchemaLikeWithoutArray

0.0.46 provide
SchemaLikeWithoutArray: string | number | boolean | null | Schema | SchemaMap

SchemaMap

0.0.46 provide
SchemaMap<TSchema, isStrict>: isStrict extends true ? StrictSchemaMap<TSchema> : PartialSchemaMap<TSchema>

Type parameters

  • TSchema = any

  • isStrict = false

StrictSchemaMap

0.0.46 provide
StrictSchemaMap<TSchema>: {[ key in keyof TSchema]: ObjectPropertiesSchema<TSchema[key]> }

Type parameters

  • TSchema = any

Types

0.0.46 provide
Types: "any" | "alternatives" | "array" | "boolean" | "binary" | "date" | "function" | "link" | "number" | "object" | "string" | "symbol"

ValidationErrorFunction

0.0.46 provide
ValidationErrorFunction: (errors: ErrorReport[]) => string | ValidationErrorItem | Error

Type declaration