RefinedSchemasModule
PackageReified.Schema
Ready-made schemas for the built-in refined values.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| nonBlankString | RefinedSchemas.nonBlankString | No description available. |
| finiteFloat | RefinedSchemas.finiteFloat | No description available. |
| unitInterval | RefinedSchemas.unitInterval | No description available. |
| nonEmptyList | RefinedSchemas.nonEmptyList itemSchema | No description available. |
| nonEmptyArray | RefinedSchemas.nonEmptyArray itemSchema | No description available. |
| distinctList | RefinedSchemas.distinctList itemSchema | No description available. |
| interval | RefinedSchemas.interval itemSchema | Builds a schema for an inclusive range, replacing the former per-type range schemas. |
| bounded | RefinedSchemas.bounded bounds itemSchema | Builds a schema for a value confined to the supplied bounds. |
| dateRange | RefinedSchemas.dateRange | Builds a schema for a range of instants using start and end field names. |
Parameters
| Name | Type | Description |
|---|---|---|
| itemSchema | Schema<'value> |
Returns
Schema<NonEmptyList<'value>>
Parameters
| Name | Type | Description |
|---|---|---|
| itemSchema | Schema<'value> |
Returns
Schema<NonEmptyArray<'value>>
Parameters
| Name | Type | Description |
|---|---|---|
| itemSchema | Schema<'value> |
Returns
Schema<DistinctList<'value>>
Builds a schema for an inclusive range, replacing the former per-type range
schemas. Generic over any ordered value, so one definition covers what
dateTimeOffsetRange and dateOnlyRange each needed separately.
Parameters
| Name | Type | Description |
|---|---|---|
| itemSchema | Schema<'value> |
Returns
Schema<Interval<'value>>
Builds a schema for a value confined to the supplied bounds. The bounds belong to
the schema rather than to each value, so they are supplied once here.
Parameters
| Name | Type | Description |
|---|---|---|
| bounds | Interval<'value> | |
| itemSchema | Schema<'value> |
Returns
Schema<Bounded<'value>>
Builds a schema for a range of instants using
start and end field
names. The same Interval type as interval above — only the wire
vocabulary differs, which is why no second type is needed. An inverted pair is
reported rather than silently reordered, since at a boundary that is a caller error.
Returns
Schema<DateRange>