- object<Schema>(schema: Schema): Struct<Simplify<ObjectOptional<Optionalize<{ [ Key in string | number | symbol]: Infer<Schema[Key]> }>>>, unknown>
-
Type Parameters
-
Schema extends ObjectSchema
Returns Struct<Simplify<ObjectOptional<Optionalize<{ [ Key in string | number | symbol]: Infer<Schema[Key]> }>>>, unknown>
A struct to check if the given value is a valid object, with support for exactOptional types.
Deprecated
Use
exactOptional
andobject
from@metamask/superstruct@>=3.2.0
instead.Returns
A struct to check if the given value is an object.