refineMap()
refineMap<
KeySchema,ValueSchema>(schema,refinement):MapSchema<KeySchema,ValueSchema>
Adds a refinement to a map schema. Returns a base MapSchema - the caller is responsible for adding constraints.
Type Parametersβ
KeySchema: KeySchema extends GenericSchemaβ
ValueSchema: ValueSchema extends GenericSchemaβ
Parametersβ
schema: MapSchema<KeySchema, ValueSchema> | MapConstraint<KeySchema, ValueSchema>β
refinement: (value) => string | trueβ
Returns: MapSchema<KeySchema, ValueSchema>β
Sinceβ
2.0.0