@backland/schema
Version:
TypeScript schema declaration and validation library with static type inference
13 lines (12 loc) • 410 B
TypeScript
import { FieldType, FieldTypeParser } from './FieldType';
export type DateFieldDef = {
autoCreate?: boolean;
max?: Date;
min?: Date;
};
export declare class DateField extends FieldType<Date, 'date', DateFieldDef | undefined> {
parse: FieldTypeParser<Date>;
constructor(def?: DateFieldDef);
static create: (def?: DateFieldDef) => DateField;
static serialize(value: unknown): Date;
}