object
object<
T>(properties):ObjectSpec<{ [K in string | number | symbol]: T[K] extends FluentSpec<S> ? S : T[K] & Spec }> &object
Defined in: extract/spec.ts:622
Create an ObjectSpec from a record of specs.
Unlike extract(), this does not provide a SpecBuilder for navigation —
use it when composing already-constructed specs (e.g., inside forEach bodies).
Type Parameters
Section titled “Type Parameters”T extends Record<string, SpecLike>
Parameters
Section titled “Parameters”properties
Section titled “properties”T
Returns
Section titled “Returns”ObjectSpec<{ [K in string | number | symbol]: T[K] extends FluentSpec<S> ? S : T[K] & Spec }> & object
Example
Section titled “Example”object({ name: variableRef('name', { extract: 'string' }), items: tryExtract(someArraySpec, literal([])),})