ObjectType <Shape>
Hierarchy
- NodeTrait
- ObjectType
Index
Constructors
Properties
Accessors
Methods
Constructors
publicconstructor
Type parameters
Parameters
shape: ObjectShape<Shape>
options: SchemaOptions<ObjectOptions, { [ KeyType in string | number | symbol ]: Omit<{ [ K in string | number | symbol ]: Shape[K][infer] }, keyof UndefinedToOptional<{ [ K in string | number | symbol ]: Shape[K][infer] }>> & UndefinedToOptional<{ [ K in string | number | symbol ]: Shape[K][infer] }>[KeyType] }>
Returns ObjectType<Shape>
Properties
public_attributes
Type declaration
generic: GenericAttributes
typescript: TypescriptAttributes
publicoptional_canReference
public_children
publicoptional_connections
public_definition
publicoptional_hooks
public_id
public_isCommutative
publicoptional_name
public_options
publicoptional_sourcePath
publicoptional_transform
Type declaration
optionalaliasName?: (name: string) => string
Parameters
name: string
Returns string
optionalreferenceName?: (name: string) => string
Parameters
name: string
Returns string
optionalsymbolName?: (name: string) => string
Parameters
name: string
Returns string
public_type
publicinfer
publicinput
publicshape
Accessors
public_output
Returns (TypescriptOutput | GenericOutput)[]
Methods
public_from
Parameters
__namedParameters: { patternProperties?: Record<string, ThereforeExpr>; recordType?: ThereforeExpr; shape?: ObjectShape<Shape> }
optionalpatternProperties: Record<string, ThereforeExpr> = ...
optionalrecordType: ThereforeExpr = ...
optionalshape: ObjectShape<Shape> = ...
Returns void
publicarray
Parameters
options: SchemaOptions<ArrayOptions> = {}
Returns ArrayType<ObjectType<Shape>>
publiccompile
Parameters
__namedParameters: { formats?: boolean } = {}
optionalformats: boolean = true
Returns Schema<{ [ KeyType in string | number | symbol ]: Omit<{ [ K in string | number | symbol ]: Shape[K][infer] }, keyof UndefinedToOptional<{ [ K in string | number | symbol ]: Shape[K][infer] }>> & UndefinedToOptional<{ [ K in string | number | symbol ]: Shape[K][infer] }>[KeyType] }>
publicdefault
Parameters
value: { [ KeyType in string | number | symbol ]: Omit<{ [ K in string | number | symbol ]: Shape[K][input] }, keyof UndefinedToOptional<{ [ K in string | number | symbol ]: Shape[K][input] }>> & UndefinedToOptional<{ [ K in string | number | symbol ]: Shape[K][input] }>[KeyType] }
Returns DefaultType<ObjectType<Shape>>
publicdescribe
Parameters
description: string
Returns this
publicextend
Type parameters
- Extra: Record<string, Node>
Parameters
extra: ObjectShape<Extra>
Returns ObjectType<{ [ KeyType in string | number | symbol ]: Shape & Extra[KeyType] }>
publicjsonschema
Parameters
schema: JsonSchema<{ [ KeyType in string | number | symbol ]: Omit<{ [ K in string | number | symbol ]: Shape[K][infer] }, keyof UndefinedToOptional<{ [ K in string | number | symbol ]: Shape[K][infer] }>> & UndefinedToOptional<{ [ K in string | number | symbol ]: Shape[K][infer] }>[KeyType] }>
Returns this
publickeyof
Returns EnumType<keyof Shape[]>
publicmerge
Type parameters
- Other: ObjectType<Record<string, Node>>
Parameters
other: Other
Returns ObjectType<{ [ KeyType in string | number | symbol ]: Shape & Other[shape][KeyType] }>
publicnullable
Returns NullableType<ObjectType<Shape>>
publicomit
Type parameters
- Key: string | number | symbol
Parameters
rest...properties: Key[]
Returns ObjectType<{ [ KeyType in string | number | symbol ]: Omit<Shape, Key>[KeyType] }>
publicoptional
Returns OptionalType<ObjectType<Shape>>
publicpartial
Type parameters
- Keys: keyof Shape[]
Parameters
rest...properties: Keys
Returns ObjectType<ShapeToPartial<Shape, Keys>>
publicpick
Type parameters
- Key: string | number | symbol
Parameters
rest...properties: Key[]
Returns ObjectType<{ [ KeyType in string | number | symbol ]: Pick<Shape, Key>[KeyType] }>
publicreference
Parameters
options: SchemaOptions<object> = {}
Returns RefType<ObjectType<Shape>>
publicrequired
Type parameters
- Keys: keyof Shape[]
Parameters
rest...properties: Keys
Returns ObjectType<ShapeToRequired<Shape, Keys>>
publicstrict
Parameters
strict: boolean = true
Returns this
publicvalidator
Parameters
validator: Partial<ValidatorOptions> = {}
Returns this