Home > @skunkteam/types > object
Create a type-validator that validates (or parses) an object structure.
Signature:
declare function object<Props extends Properties>(
...args: [props: Props] | [name: string, props: Props] | [options: InterfaceTypeOptionsWithPartial, props: Props]
): FullType<Props>;
Parameter | Type | Description |
---|---|---|
args | [props: Props] | [name: string, props: Props] | [options: InterfaceTypeOptionsWithPartial, props: Props] | the options and properties of the new type |
Returns:
FullType<Props>
This is a basic building block for more complex structured types, can be nested.