Returns a new instance of this Record type with all values set to their default values.
Returns a new instance of this Record type with the value for the specific key set to its default value.
Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.
If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.
Get a field in a blueprint by key. The key can be complex to get deep values (eg. a[0].b.c
).
A field key.
Merges blueprints' root fields into this one and returns a new blueprint. Blueprints' root fields are merged left-to-right, with the right-most blueprint replacing data in those left of it. The blueprints' schemas are left untouched, and the schema of the blueprint that join is called on is used to perform the join.
Normalize the blueprint's root field
Convert this blueprint into an object that can be stringified or passed back to Blueprint.create().
Internally, this is calling the blueprint's schema's serialize() on the blueprint's root field.
Deeply converts this Record to equivalent native JavaScript Object.
Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.
Shallowly converts this Record to equivalent native JavaScript Object.
Shallowly converts this Record to equivalent JavaScript Object.
Transforms a value according to the blueprint and schema rules. Value does not need to be provided, in which case default values are returned.
A value to transform.
Create a new Blueprint from a field and a schema.
Object with a root field and a schema.
Generated using TypeDoc
The name provided to
Record(values, name)
can be accessed withdisplayName
.