diff options
Diffstat (limited to 'node_modules/moment/moment.d.ts')
-rw-r--r-- | node_modules/moment/moment.d.ts | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/node_modules/moment/moment.d.ts b/node_modules/moment/moment.d.ts index 24667a3f5..3256e2b85 100644 --- a/node_modules/moment/moment.d.ts +++ b/node_modules/moment/moment.d.ts @@ -2,7 +2,7 @@ declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSp declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, language?: string, strict?: boolean): moment.Moment; declare namespace moment { - type RelativeTimeKey = 's' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'M' | 'MM' | 'y' | 'yy'; + type RelativeTimeKey = 's' | 'ss' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'M' | 'MM' | 'y' | 'yy'; type CalendarKey = 'sameDay' | 'nextDay' | 'lastDay' | 'nextWeek' | 'lastWeek' | 'sameElse' | string; type LongDateFormatKey = 'LTS' | 'LT' | 'L' | 'LL' | 'LLL' | 'LLLL' | 'lts' | 'lt' | 'l' | 'll' | 'lll' | 'llll'; @@ -82,6 +82,7 @@ declare namespace moment { future: RelativeTimeFuturePastVal; past: RelativeTimeFuturePastVal; s: RelativeTimeSpecVal; + ss: RelativeTimeSpecVal; m: RelativeTimeSpecVal; mm: RelativeTimeSpecVal; h: RelativeTimeSpecVal; @@ -215,6 +216,7 @@ declare namespace moment { future: any; past: any; s: any; + ss: any; m: any; mm: any; h: any; @@ -408,7 +410,7 @@ declare namespace moment { strict?: boolean; } - interface Moment extends Object{ + interface Moment extends Object { format(format?: string): string; startOf(unitOfTime: unitOfTime.StartOf): Moment; @@ -540,7 +542,7 @@ declare namespace moment { toArray(): number[]; toDate(): Date; - toISOString(): string; + toISOString(keepOffset?: boolean): string; inspect(): string; toJSON(): string; unix(): number; @@ -682,8 +684,10 @@ declare namespace moment { export function weekdaysMin(localeSorted: boolean, format: string): string[]; export function weekdaysMin(localeSorted: boolean, format: string, index: number): string; - export function min(...moments: MomentInput[]): Moment; - export function max(...moments: MomentInput[]): Moment; + export function min(moments: Moment[]): Moment; + export function min(...moments: Moment[]): Moment; + export function max(moments: Moment[]): Moment; + export function max(...moments: Moment[]): Moment; /** * Returns unix time in milliseconds. Overwrite for profit. @@ -702,6 +706,8 @@ declare namespace moment { export function relativeTimeRounding(): (num: number) => number; export function calendarFormat(m: Moment, now: Moment): string; + export function parseTwoDigitYear(input: string): number; + /** * Constant used to enable explicit ISO_8601 format parsing. */ @@ -710,6 +716,19 @@ declare namespace moment { export var defaultFormat: string; export var defaultFormatUtc: string; + + export var HTML5_FMT: { + DATETIME_LOCAL: string, + DATETIME_LOCAL_SECONDS: string, + DATETIME_LOCAL_MS: string, + DATE: string, + TIME: string, + TIME_SECONDS: string, + TIME_MS: string, + WEEK: string, + MONTH: string + }; + } export = moment; |