format
Callable
Type parameters
- DataType: unknown
- ReturnType: DataFormat
Parameters
schema: ValidationSchemaInput | Schema
how to interpret the data
data: DataType
data to be formatted
returnFormat: ReturnType = ...
how to format the data
Returns FormatType<DataType, ReturnType>
- formatted data
Given data that can be interpreted according to the provided schema, returns equivalent data that has been formatted according to the provided return format.