495 lines
16 KiB
Plaintext
495 lines
16 KiB
Plaintext
// @flow
|
|
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
|
|
|
|
export type Interval = {
|
|
start: Date | number,
|
|
end: Date | number
|
|
}
|
|
|
|
export type Locale = {
|
|
formatDistance: (...args: Array<any>) => any,
|
|
formatRelative: (...args: Array<any>) => any,
|
|
localize: {
|
|
ordinalNumber: (...args: Array<any>) => any,
|
|
era: (...args: Array<any>) => any,
|
|
quarter: (...args: Array<any>) => any,
|
|
month: (...args: Array<any>) => any,
|
|
day: (...args: Array<any>) => any,
|
|
dayPeriod: (...args: Array<any>) => any
|
|
},
|
|
formatLong: Object,
|
|
date: (...args: Array<any>) => any,
|
|
time: (...args: Array<any>) => any,
|
|
dateTime: (...args: Array<any>) => any,
|
|
match: {
|
|
ordinalNumber: (...args: Array<any>) => any,
|
|
era: (...args: Array<any>) => any,
|
|
quarter: (...args: Array<any>) => any,
|
|
month: (...args: Array<any>) => any,
|
|
day: (...args: Array<any>) => any,
|
|
dayPeriod: (...args: Array<any>) => any
|
|
},
|
|
options?: {
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7
|
|
}
|
|
}
|
|
|
|
type CurriedFn1<A, R> = <A>(a: A) => R
|
|
|
|
type CurriedFn2<A, B, R> = <A>(
|
|
a: A
|
|
) => CurriedFn1<B, R> | (<A, B>(a: A, b: B) => R)
|
|
|
|
type CurriedFn3<A, B, C, R> = <A>(
|
|
a: A
|
|
) =>
|
|
| CurriedFn2<B, C, R>
|
|
| (<A, B>(
|
|
a: A,
|
|
b: B
|
|
) => CurriedFn1<C, R> | (<A, B, C>(a: A, b: B, c: C) => R))
|
|
|
|
type CurriedFn4<A, B, C, D, R> = <A>(
|
|
a: A
|
|
) =>
|
|
| CurriedFn3<B, C, D, R>
|
|
| (<A, B>(
|
|
a: A,
|
|
b: B
|
|
) =>
|
|
| CurriedFn2<C, D, R>
|
|
| (<A, B, C>(
|
|
a: A,
|
|
b: B,
|
|
c: C
|
|
) => CurriedFn1<D, R> | (<A, B, C, D>(a: A, b: B, c: C, d: D) => R)))
|
|
|
|
declare module.exports: {
|
|
addBusinessDays: CurriedFn2<number, Date | number, Date>,
|
|
addDays: CurriedFn2<number, Date | number, Date>,
|
|
addHours: CurriedFn2<number, Date | number, Date>,
|
|
addISOWeekYears: CurriedFn2<number, Date | number, Date>,
|
|
addMilliseconds: CurriedFn2<number, Date | number, Date>,
|
|
addMinutes: CurriedFn2<number, Date | number, Date>,
|
|
addMonths: CurriedFn2<number, Date | number, Date>,
|
|
addQuarters: CurriedFn2<number, Date | number, Date>,
|
|
addSeconds: CurriedFn2<number, Date | number, Date>,
|
|
addWeeks: CurriedFn2<number, Date | number, Date>,
|
|
addYears: CurriedFn2<number, Date | number, Date>,
|
|
areIntervalsOverlapping: CurriedFn2<Interval, Interval, boolean>,
|
|
closestIndexTo: CurriedFn2<(Date | number)[], Date | number, number>,
|
|
closestTo: CurriedFn2<(Date | number)[], Date | number, Date>,
|
|
compareAsc: CurriedFn2<Date | number, Date | number, number>,
|
|
compareDesc: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInBusinessDays: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInCalendarDays: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInCalendarISOWeeks: CurriedFn2<
|
|
Date | number,
|
|
Date | number,
|
|
number
|
|
>,
|
|
differenceInCalendarISOWeekYears: CurriedFn2<
|
|
Date | number,
|
|
Date | number,
|
|
number
|
|
>,
|
|
differenceInCalendarMonths: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInCalendarQuarters: CurriedFn2<
|
|
Date | number,
|
|
Date | number,
|
|
number
|
|
>,
|
|
differenceInCalendarWeeks: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInCalendarWeeksWithOptions: CurriedFn3<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
Date | number,
|
|
number
|
|
>,
|
|
differenceInCalendarYears: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInDays: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInHours: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInISOWeekYears: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInMilliseconds: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInMinutes: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInMonths: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInQuarters: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInSeconds: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInWeeks: CurriedFn2<Date | number, Date | number, number>,
|
|
differenceInYears: CurriedFn2<Date | number, Date | number, number>,
|
|
eachDayOfInterval: CurriedFn1<Interval, Date[]>,
|
|
eachDayOfIntervalWithOptions: CurriedFn2<
|
|
{
|
|
step?: number
|
|
},
|
|
Interval,
|
|
Date[]
|
|
>,
|
|
eachWeekendOfInterval: CurriedFn1<Interval, Date[]>,
|
|
eachWeekendOfMonth: CurriedFn1<Date | number, Date[]>,
|
|
eachWeekendOfYear: CurriedFn1<Date | number, Date[]>,
|
|
eachWeekOfInterval: CurriedFn1<Interval, Date[]>,
|
|
eachWeekOfIntervalWithOptions: CurriedFn2<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Interval,
|
|
Date[]
|
|
>,
|
|
endOfDay: CurriedFn1<Date | number, Date>,
|
|
endOfDecade: CurriedFn1<Date | number, Date>,
|
|
endOfDecadeWithOptions: CurriedFn2<
|
|
{
|
|
additionalDigits?: 0 | 1 | 2
|
|
},
|
|
Date | number,
|
|
Date
|
|
>,
|
|
endOfHour: CurriedFn1<Date | number, Date>,
|
|
endOfISOWeek: CurriedFn1<Date | number, Date>,
|
|
endOfISOWeekYear: CurriedFn1<Date | number, Date>,
|
|
endOfMinute: CurriedFn1<Date | number, Date>,
|
|
endOfMonth: CurriedFn1<Date | number, Date>,
|
|
endOfQuarter: CurriedFn1<Date | number, Date>,
|
|
endOfSecond: CurriedFn1<Date | number, Date>,
|
|
endOfWeek: CurriedFn1<Date | number, Date>,
|
|
endOfWeekWithOptions: CurriedFn2<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
Date
|
|
>,
|
|
endOfYear: CurriedFn1<Date | number, Date>,
|
|
format: CurriedFn2<string, Date | number, string>,
|
|
formatDistance: CurriedFn2<Date | number, Date | number, string>,
|
|
formatDistanceStrict: CurriedFn2<Date | number, Date | number, string>,
|
|
formatDistanceStrictWithOptions: CurriedFn3<
|
|
{
|
|
locale?: Locale,
|
|
roundingMethod?: 'floor' | 'ceil' | 'round',
|
|
unit?: 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year',
|
|
addSuffix?: boolean
|
|
},
|
|
Date | number,
|
|
Date | number,
|
|
string
|
|
>,
|
|
formatDistanceWithOptions: CurriedFn3<
|
|
{
|
|
locale?: Locale,
|
|
addSuffix?: boolean,
|
|
includeSeconds?: boolean
|
|
},
|
|
Date | number,
|
|
Date | number,
|
|
string
|
|
>,
|
|
formatISO: CurriedFn1<Date | number, string>,
|
|
formatISO9075: CurriedFn1<Date | number, string>,
|
|
formatISO9075WithOptions: CurriedFn2<
|
|
{
|
|
representation?: 'complete' | 'date' | 'time',
|
|
format?: 'extended' | 'basic'
|
|
},
|
|
Date | number,
|
|
string
|
|
>,
|
|
formatISOWithOptions: CurriedFn2<
|
|
{
|
|
representation?: 'complete' | 'date' | 'time',
|
|
format?: 'extended' | 'basic'
|
|
},
|
|
Date | number,
|
|
string
|
|
>,
|
|
formatRelative: CurriedFn2<Date | number, Date | number, string>,
|
|
formatRelativeWithOptions: CurriedFn3<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
Date | number,
|
|
string
|
|
>,
|
|
formatRFC3339: CurriedFn1<Date | number, string>,
|
|
formatRFC3339WithOptions: CurriedFn2<
|
|
{
|
|
fractionDigits?: 0 | 1 | 2 | 3
|
|
},
|
|
Date | number,
|
|
string
|
|
>,
|
|
formatRFC7231: CurriedFn1<Date | number, string>,
|
|
formatWithOptions: CurriedFn3<
|
|
{
|
|
useAdditionalDayOfYearTokens?: boolean,
|
|
useAdditionalWeekYearTokens?: boolean,
|
|
firstWeekContainsDate?: number,
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
string,
|
|
Date | number,
|
|
string
|
|
>,
|
|
fromUnixTime: CurriedFn1<number, Date>,
|
|
getDate: CurriedFn1<Date | number, number>,
|
|
getDay: CurriedFn1<Date | number, number>,
|
|
getDayOfYear: CurriedFn1<Date | number, number>,
|
|
getDaysInMonth: CurriedFn1<Date | number, number>,
|
|
getDaysInYear: CurriedFn1<Date | number, number>,
|
|
getDecade: CurriedFn1<Date | number, number>,
|
|
getHours: CurriedFn1<Date | number, number>,
|
|
getISODay: CurriedFn1<Date | number, number>,
|
|
getISOWeek: CurriedFn1<Date | number, number>,
|
|
getISOWeeksInYear: CurriedFn1<Date | number, number>,
|
|
getISOWeekYear: CurriedFn1<Date | number, number>,
|
|
getMilliseconds: CurriedFn1<Date | number, number>,
|
|
getMinutes: CurriedFn1<Date | number, number>,
|
|
getMonth: CurriedFn1<Date | number, number>,
|
|
getOverlappingDaysInIntervals: CurriedFn2<Interval, Interval, number>,
|
|
getQuarter: CurriedFn1<Date | number, number>,
|
|
getSeconds: CurriedFn1<Date | number, number>,
|
|
getTime: CurriedFn1<Date | number, number>,
|
|
getUnixTime: CurriedFn1<Date | number, number>,
|
|
getWeek: CurriedFn1<Date | number, number>,
|
|
getWeekOfMonth: CurriedFn1<Date | number, number>,
|
|
getWeekOfMonthWithOptions: CurriedFn2<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
number
|
|
>,
|
|
getWeeksInMonth: CurriedFn1<Date | number, number>,
|
|
getWeeksInMonthWithOptions: CurriedFn2<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
number
|
|
>,
|
|
getWeekWithOptions: CurriedFn2<
|
|
{
|
|
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
number
|
|
>,
|
|
getWeekYear: CurriedFn1<Date | number, number>,
|
|
getWeekYearWithOptions: CurriedFn2<
|
|
{
|
|
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
number
|
|
>,
|
|
getYear: CurriedFn1<Date | number, number>,
|
|
isAfter: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isBefore: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isDate: CurriedFn1<any, boolean>,
|
|
isEqual: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isFirstDayOfMonth: CurriedFn1<Date | number, boolean>,
|
|
isFriday: CurriedFn1<Date | number, boolean>,
|
|
isLastDayOfMonth: CurriedFn1<Date | number, boolean>,
|
|
isLeapYear: CurriedFn1<Date | number, boolean>,
|
|
isMonday: CurriedFn1<Date | number, boolean>,
|
|
isSameDay: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameHour: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameISOWeek: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameISOWeekYear: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameMinute: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameMonth: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameQuarter: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameSecond: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameWeek: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSameWeekWithOptions: CurriedFn3<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
Date | number,
|
|
boolean
|
|
>,
|
|
isSameYear: CurriedFn2<Date | number, Date | number, boolean>,
|
|
isSaturday: CurriedFn1<Date | number, boolean>,
|
|
isSunday: CurriedFn1<Date | number, boolean>,
|
|
isThursday: CurriedFn1<Date | number, boolean>,
|
|
isTuesday: CurriedFn1<Date | number, boolean>,
|
|
isValid: CurriedFn1<any, boolean>,
|
|
isWednesday: CurriedFn1<Date | number, boolean>,
|
|
isWeekend: CurriedFn1<Date | number, boolean>,
|
|
isWithinInterval: CurriedFn2<Interval, Date | number, boolean>,
|
|
lastDayOfDecade: CurriedFn1<Date | number, Date>,
|
|
lastDayOfISOWeek: CurriedFn1<Date | number, Date>,
|
|
lastDayOfISOWeekYear: CurriedFn1<Date | number, Date>,
|
|
lastDayOfMonth: CurriedFn1<Date | number, Date>,
|
|
lastDayOfQuarter: CurriedFn1<Date | number, Date>,
|
|
lastDayOfQuarterWithOptions: CurriedFn2<
|
|
{
|
|
additionalDigits?: 0 | 1 | 2
|
|
},
|
|
Date | number,
|
|
Date
|
|
>,
|
|
lastDayOfWeek: CurriedFn1<Date | number, Date>,
|
|
lastDayOfWeekWithOptions: CurriedFn2<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
Date
|
|
>,
|
|
lastDayOfYear: CurriedFn1<Date | number, Date>,
|
|
lightFormat: CurriedFn2<string, Date | number, string>,
|
|
max: CurriedFn1<(Date | number)[], Date>,
|
|
min: CurriedFn1<(Date | number)[], Date>,
|
|
parse: CurriedFn3<Date | number, string, string, Date>,
|
|
parseISO: CurriedFn1<string, Date>,
|
|
parseISOWithOptions: CurriedFn2<
|
|
{
|
|
additionalDigits?: 0 | 1 | 2
|
|
},
|
|
string,
|
|
Date
|
|
>,
|
|
parseJSON: CurriedFn1<string | number | Date, Date>,
|
|
parseWithOptions: CurriedFn4<
|
|
{
|
|
useAdditionalDayOfYearTokens?: boolean,
|
|
useAdditionalWeekYearTokens?: boolean,
|
|
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
string,
|
|
string,
|
|
Date
|
|
>,
|
|
roundToNearestMinutes: CurriedFn1<Date | number, Date>,
|
|
roundToNearestMinutesWithOptions: CurriedFn2<
|
|
{
|
|
nearestTo?: number
|
|
},
|
|
Date | number,
|
|
Date
|
|
>,
|
|
set: CurriedFn2<
|
|
{
|
|
milliseconds?: number,
|
|
seconds?: number,
|
|
minutes?: number,
|
|
hours?: number,
|
|
date?: number,
|
|
month?: number,
|
|
year?: number
|
|
},
|
|
Date | number,
|
|
Date
|
|
>,
|
|
setDate: CurriedFn2<number, Date | number, Date>,
|
|
setDay: CurriedFn2<number, Date | number, Date>,
|
|
setDayOfYear: CurriedFn2<number, Date | number, Date>,
|
|
setDayWithOptions: CurriedFn3<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
number,
|
|
Date | number,
|
|
Date
|
|
>,
|
|
setHours: CurriedFn2<number, Date | number, Date>,
|
|
setISODay: CurriedFn2<number, Date | number, Date>,
|
|
setISOWeek: CurriedFn2<number, Date | number, Date>,
|
|
setISOWeekYear: CurriedFn2<number, Date | number, Date>,
|
|
setMilliseconds: CurriedFn2<number, Date | number, Date>,
|
|
setMinutes: CurriedFn2<number, Date | number, Date>,
|
|
setMonth: CurriedFn2<number, Date | number, Date>,
|
|
setQuarter: CurriedFn2<number, Date | number, Date>,
|
|
setSeconds: CurriedFn2<number, Date | number, Date>,
|
|
setWeek: CurriedFn2<number, Date | number, Date>,
|
|
setWeekWithOptions: CurriedFn3<
|
|
{
|
|
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
number,
|
|
Date | number,
|
|
Date
|
|
>,
|
|
setWeekYear: CurriedFn2<number, Date | number, Date>,
|
|
setWeekYearWithOptions: CurriedFn3<
|
|
{
|
|
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
number,
|
|
Date | number,
|
|
Date
|
|
>,
|
|
setYear: CurriedFn2<number, Date | number, Date>,
|
|
startOfDay: CurriedFn1<Date | number, Date>,
|
|
startOfDecade: CurriedFn1<Date | number, Date>,
|
|
startOfHour: CurriedFn1<Date | number, Date>,
|
|
startOfISOWeek: CurriedFn1<Date | number, Date>,
|
|
startOfISOWeekYear: CurriedFn1<Date | number, Date>,
|
|
startOfMinute: CurriedFn1<Date | number, Date>,
|
|
startOfMonth: CurriedFn1<Date | number, Date>,
|
|
startOfQuarter: CurriedFn1<Date | number, Date>,
|
|
startOfSecond: CurriedFn1<Date | number, Date>,
|
|
startOfWeek: CurriedFn1<Date | number, Date>,
|
|
startOfWeekWithOptions: CurriedFn2<
|
|
{
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
Date
|
|
>,
|
|
startOfWeekYear: CurriedFn1<Date | number, Date>,
|
|
startOfWeekYearWithOptions: CurriedFn2<
|
|
{
|
|
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
|
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
|
locale?: Locale
|
|
},
|
|
Date | number,
|
|
Date
|
|
>,
|
|
startOfYear: CurriedFn1<Date | number, Date>,
|
|
subBusinessDays: CurriedFn2<number, Date | number, Date>,
|
|
subDays: CurriedFn2<number, Date | number, Date>,
|
|
subHours: CurriedFn2<number, Date | number, Date>,
|
|
subISOWeekYears: CurriedFn2<number, Date | number, Date>,
|
|
subMilliseconds: CurriedFn2<number, Date | number, Date>,
|
|
subMinutes: CurriedFn2<number, Date | number, Date>,
|
|
subMonths: CurriedFn2<number, Date | number, Date>,
|
|
subQuarters: CurriedFn2<number, Date | number, Date>,
|
|
subSeconds: CurriedFn2<number, Date | number, Date>,
|
|
subWeeks: CurriedFn2<number, Date | number, Date>,
|
|
subYears: CurriedFn2<number, Date | number, Date>,
|
|
toDate: CurriedFn1<Date | number, Date>,
|
|
maxTime: number,
|
|
minTime: number
|
|
}
|