refineSet()
refineSet<
ItemSchema>(schema,refinement):SetSchema<ItemSchema>
Adds a refinement to a set schema. Returns a base SetSchema - the caller is responsible for adding constraints.
Type Parametersβ
ItemSchema: ItemSchema extends GenericSchemaβ
Parametersβ
schema: SetSchema<ItemSchema> | SetConstraint<ItemSchema>β
refinement: (value) => string | trueβ
Returns: SetSchema<ItemSchema>β
Sinceβ
2.0.0