RefinedSchemasModule

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

Summary

NameSignatureSynopsis
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.

nonBlankString

RefinedSchemas.nonBlankString
Member

Returns

Schema<NonBlankString>

finiteFloat

RefinedSchemas.finiteFloat
Member

Returns

Schema<FiniteFloat>

unitInterval

RefinedSchemas.unitInterval
Member

Returns

Schema<UnitInterval>

nonEmptyList

RefinedSchemas.nonEmptyList itemSchema
Member

Parameters

NameTypeDescription
itemSchemaSchema<'value>

Returns

Schema<NonEmptyList<'value>>

nonEmptyArray

RefinedSchemas.nonEmptyArray itemSchema
Member

Parameters

NameTypeDescription
itemSchemaSchema<'value>

Returns

Schema<NonEmptyArray<'value>>

distinctList

RefinedSchemas.distinctList itemSchema
Member

Parameters

NameTypeDescription
itemSchemaSchema<'value>

Returns

Schema<DistinctList<'value>>

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>>

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>>

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>