UNPKG

container.ts

Version:
14 lines (13 loc) 571 B
import { DateTimeOptions, Interval } from "luxon"; import { Field } from "../field"; /** Validate.isInterval options. */ export interface IIsInterval extends DateTimeOptions { } /** Validate that value is a valid date time interval parsed by 'luxon' library. */ export declare function isInterval(value?: string, options?: IIsInterval): Interval; export declare class IntervalField extends Field<Interval> { protected readonly options: IIsInterval; constructor(options?: IIsInterval); validate(value: string): Interval; format(value: Interval): string; }