Function object

  • A struct to check if the given value is a valid object, with support for exactOptional types.

    Deprecated

    Use exactOptional and object from @metamask/superstruct@>=3.2.0 instead.

    Returns

    A struct to check if the given value is an object.

    Type Parameters

    • Schema extends ObjectSchema

    Parameters

    • schema: Schema

      The schema of the object.

    Returns Struct<Simplify<ObjectOptional<Optionalize<{ [ Key in string | number | symbol]: Infer<Schema[Key]> }>>>, unknown>