Interface OptionalPropertiesSchema<O>

a schema for an object with only optional properties

interface OptionalPropertiesSchema<O> {
    additionalProperties?: boolean;
    metadata?: unknown;
    nullable?: boolean;
    optionalProperties: O;
    properties?: undefined;
}

Type Parameters

Properties

additionalProperties?: boolean

if non-listed properties are allowed

metadata?: unknown

optional metadata on a schema

nullable?: boolean

a key indicating if a type can be null

optionalProperties: O

a schema for every optional property

properties?: undefined

optional properties defines no properties