RefinedSchemasModule

PackageReified.Schema
Ready-made schemas for the built-in refined values.

Summary

NameSignatureSynopsis
Operations
nonBlankStringRefinedSchemas.nonBlankString No description available.
finiteFloatRefinedSchemas.finiteFloat No description available.
unitIntervalRefinedSchemas.unitInterval No description available.
nonEmptyListRefinedSchemas.nonEmptyList itemSchemaNo description available.
nonEmptyArrayRefinedSchemas.nonEmptyArray itemSchemaNo description available.
distinctListRefinedSchemas.distinctList itemSchemaNo description available.
intervalRefinedSchemas.interval itemSchemaBuilds a schema for an inclusive range, replacing the former per-type range schemas.
boundedRefinedSchemas.bounded bounds itemSchemaBuilds a schema for a value confined to the supplied bounds.
dateRangeRefinedSchemas.dateRange Builds a schema for a range of instants using start and end field names.

Operations

kind:member

nonBlankString

RefinedSchemas.nonBlankString
Member

Returns

Schema<NonBlankString>
kind:member

finiteFloat

RefinedSchemas.finiteFloat
Member

Returns

Schema<FiniteFloat>
kind:member

unitInterval

RefinedSchemas.unitInterval
Member

Returns

Schema<UnitInterval>
kind:member

nonEmptyList

RefinedSchemas.nonEmptyList itemSchema
Member

Parameters

NameTypeDescription
itemSchemaSchema<'value>

Returns

Schema<NonEmptyList<'value>>
kind:member

nonEmptyArray

RefinedSchemas.nonEmptyArray itemSchema
Member

Parameters

NameTypeDescription
itemSchemaSchema<'value>

Returns

Schema<NonEmptyArray<'value>>
kind:member

distinctList

RefinedSchemas.distinctList itemSchema
Member

Parameters

NameTypeDescription
itemSchemaSchema<'value>

Returns

Schema<DistinctList<'value>>
kind:member

interval

RefinedSchemas.interval itemSchema
Member
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

NameTypeDescription
itemSchemaSchema<'value>

Returns

Schema<Interval<'value>>
kind:member

bounded

RefinedSchemas.bounded bounds itemSchema
Member
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

NameTypeDescription
boundsInterval<'value>
itemSchemaSchema<'value>

Returns

Schema<Bounded<'value>>
kind:member

dateRange

RefinedSchemas.dateRange
Member
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>