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