cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

moment.d.ts (23820B)


      1/**
      2 * @param strict Strict parsing disables the deprecated fallback to the native Date constructor when
      3 * parsing a string.
      4 */
      5declare function moment(inp?: moment.MomentInput, strict?: boolean): moment.Moment;
      6/**
      7 * @param strict Strict parsing requires that the format and input match exactly, including delimiters.
      8 * Strict parsing is frequently the best parsing option. For more information about choosing strict vs
      9 * forgiving parsing, see the [parsing guide](https://momentjs.com/guides/#/parsing/).
     10 */
     11declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, strict?: boolean): moment.Moment;
     12/**
     13 * @param strict Strict parsing requires that the format and input match exactly, including delimiters.
     14 * Strict parsing is frequently the best parsing option. For more information about choosing strict vs
     15 * forgiving parsing, see the [parsing guide](https://momentjs.com/guides/#/parsing/).
     16 */
     17declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, language?: string, strict?: boolean): moment.Moment;
     18
     19declare namespace moment {
     20  type RelativeTimeKey = 's' | 'ss' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'w' | 'ww' | 'M' | 'MM' | 'y' | 'yy';
     21  type CalendarKey = 'sameDay' | 'nextDay' | 'lastDay' | 'nextWeek' | 'lastWeek' | 'sameElse' | string;
     22  type LongDateFormatKey = 'LTS' | 'LT' | 'L' | 'LL' | 'LLL' | 'LLLL' | 'lts' | 'lt' | 'l' | 'll' | 'lll' | 'llll';
     23
     24  interface Locale {
     25    calendar(key?: CalendarKey, m?: Moment, now?: Moment): string;
     26
     27    longDateFormat(key: LongDateFormatKey): string;
     28    invalidDate(): string;
     29    ordinal(n: number): string;
     30
     31    preparse(inp: string): string;
     32    postformat(inp: string): string;
     33    relativeTime(n: number, withoutSuffix: boolean,
     34                 key: RelativeTimeKey, isFuture: boolean): string;
     35    pastFuture(diff: number, absRelTime: string): string;
     36    set(config: Object): void;
     37
     38    months(): string[];
     39    months(m: Moment, format?: string): string;
     40    monthsShort(): string[];
     41    monthsShort(m: Moment, format?: string): string;
     42    monthsParse(monthName: string, format: string, strict: boolean): number;
     43    monthsRegex(strict: boolean): RegExp;
     44    monthsShortRegex(strict: boolean): RegExp;
     45
     46    week(m: Moment): number;
     47    firstDayOfYear(): number;
     48    firstDayOfWeek(): number;
     49
     50    weekdays(): string[];
     51    weekdays(m: Moment, format?: string): string;
     52    weekdaysMin(): string[];
     53    weekdaysMin(m: Moment): string;
     54    weekdaysShort(): string[];
     55    weekdaysShort(m: Moment): string;
     56    weekdaysParse(weekdayName: string, format: string, strict: boolean): number;
     57    weekdaysRegex(strict: boolean): RegExp;
     58    weekdaysShortRegex(strict: boolean): RegExp;
     59    weekdaysMinRegex(strict: boolean): RegExp;
     60
     61    isPM(input: string): boolean;
     62    meridiem(hour: number, minute: number, isLower: boolean): string;
     63  }
     64
     65  interface StandaloneFormatSpec {
     66    format: string[];
     67    standalone: string[];
     68    isFormat?: RegExp;
     69  }
     70
     71  interface WeekSpec {
     72    dow: number;
     73    doy?: number;
     74  }
     75
     76  type CalendarSpecVal = string | ((m?: MomentInput, now?: Moment) => string);
     77  interface CalendarSpec {
     78    sameDay?: CalendarSpecVal;
     79    nextDay?: CalendarSpecVal;
     80    lastDay?: CalendarSpecVal;
     81    nextWeek?: CalendarSpecVal;
     82    lastWeek?: CalendarSpecVal;
     83    sameElse?: CalendarSpecVal;
     84
     85    // any additional properties might be used with moment.calendarFormat
     86    [x: string]: CalendarSpecVal | void; // undefined
     87  }
     88
     89  type RelativeTimeSpecVal = (
     90    string |
     91    ((n: number, withoutSuffix: boolean,
     92      key: RelativeTimeKey, isFuture: boolean) => string)
     93  );
     94  type RelativeTimeFuturePastVal = string | ((relTime: string) => string);
     95
     96  interface RelativeTimeSpec {
     97    future?: RelativeTimeFuturePastVal;
     98    past?: RelativeTimeFuturePastVal;
     99    s?: RelativeTimeSpecVal;
    100    ss?: RelativeTimeSpecVal;
    101    m?: RelativeTimeSpecVal;
    102    mm?: RelativeTimeSpecVal;
    103    h?: RelativeTimeSpecVal;
    104    hh?: RelativeTimeSpecVal;
    105    d?: RelativeTimeSpecVal;
    106    dd?: RelativeTimeSpecVal;
    107    w?: RelativeTimeSpecVal
    108    ww?: RelativeTimeSpecVal;
    109    M?: RelativeTimeSpecVal;
    110    MM?: RelativeTimeSpecVal;
    111    y?: RelativeTimeSpecVal;
    112    yy?: RelativeTimeSpecVal;
    113  }
    114
    115  interface LongDateFormatSpec {
    116    LTS: string;
    117    LT: string;
    118    L: string;
    119    LL: string;
    120    LLL: string;
    121    LLLL: string;
    122
    123    // lets forget for a sec that any upper/lower permutation will also work
    124    lts?: string;
    125    lt?: string;
    126    l?: string;
    127    ll?: string;
    128    lll?: string;
    129    llll?: string;
    130  }
    131
    132  type MonthWeekdayFn = (momentToFormat: Moment, format?: string) => string;
    133  type WeekdaySimpleFn = (momentToFormat: Moment) => string;
    134  interface EraSpec {
    135    since: string | number;
    136    until: string | number;
    137    offset: number;
    138    name: string;
    139    narrow: string;
    140    abbr: string;
    141  }
    142
    143  interface LocaleSpecification {
    144    months?: string[] | StandaloneFormatSpec | MonthWeekdayFn;
    145    monthsShort?: string[] | StandaloneFormatSpec | MonthWeekdayFn;
    146
    147    weekdays?: string[] | StandaloneFormatSpec | MonthWeekdayFn;
    148    weekdaysShort?: string[] | StandaloneFormatSpec | WeekdaySimpleFn;
    149    weekdaysMin?: string[] | StandaloneFormatSpec | WeekdaySimpleFn;
    150
    151    meridiemParse?: RegExp;
    152    meridiem?: (hour: number, minute:number, isLower: boolean) => string;
    153
    154    isPM?: (input: string) => boolean;
    155
    156    longDateFormat?: LongDateFormatSpec;
    157    calendar?: CalendarSpec;
    158    relativeTime?: RelativeTimeSpec;
    159    invalidDate?: string;
    160    ordinal?: (n: number) => string;
    161    ordinalParse?: RegExp;
    162
    163    week?: WeekSpec;
    164    eras?: EraSpec[];
    165
    166    // Allow anything: in general any property that is passed as locale spec is
    167    // put in the locale object so it can be used by locale functions
    168    [x: string]: any;
    169  }
    170
    171  interface MomentObjectOutput {
    172    years: number;
    173    /* One digit */
    174    months: number;
    175    /* Day of the month */
    176    date: number;
    177    hours: number;
    178    minutes: number;
    179    seconds: number;
    180    milliseconds: number;
    181  }
    182
    183  interface argThresholdOpts {
    184    ss?: number;
    185    s?: number;
    186    m?: number;
    187    h?: number;
    188    d?: number;
    189    w?: number | void;
    190    M?: number;
    191  }
    192
    193  interface Duration {
    194    clone(): Duration;
    195
    196    humanize(argWithSuffix?: boolean, argThresholds?: argThresholdOpts): string;
    197    
    198    humanize(argThresholds?: argThresholdOpts): string;
    199
    200    abs(): Duration;
    201
    202    as(units: unitOfTime.Base): number;
    203    get(units: unitOfTime.Base): number;
    204
    205    milliseconds(): number;
    206    asMilliseconds(): number;
    207
    208    seconds(): number;
    209    asSeconds(): number;
    210
    211    minutes(): number;
    212    asMinutes(): number;
    213
    214    hours(): number;
    215    asHours(): number;
    216
    217    days(): number;
    218    asDays(): number;
    219
    220    weeks(): number;
    221    asWeeks(): number;
    222
    223    months(): number;
    224    asMonths(): number;
    225
    226    years(): number;
    227    asYears(): number;
    228
    229    add(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration;
    230    subtract(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration;
    231
    232    locale(): string;
    233    locale(locale: LocaleSpecifier): Duration;
    234    localeData(): Locale;
    235
    236    toISOString(): string;
    237    toJSON(): string;
    238
    239    isValid(): boolean;
    240
    241    /**
    242     * @deprecated since version 2.8.0
    243     */
    244    lang(locale: LocaleSpecifier): Moment;
    245    /**
    246     * @deprecated since version 2.8.0
    247     */
    248    lang(): Locale;
    249    /**
    250     * @deprecated
    251     */
    252    toIsoString(): string;
    253  }
    254
    255  interface MomentRelativeTime {
    256    future: any;
    257    past: any;
    258    s: any;
    259    ss: any;
    260    m: any;
    261    mm: any;
    262    h: any;
    263    hh: any;
    264    d: any;
    265    dd: any;
    266    M: any;
    267    MM: any;
    268    y: any;
    269    yy: any;
    270  }
    271
    272  interface MomentLongDateFormat {
    273    L: string;
    274    LL: string;
    275    LLL: string;
    276    LLLL: string;
    277    LT: string;
    278    LTS: string;
    279
    280    l?: string;
    281    ll?: string;
    282    lll?: string;
    283    llll?: string;
    284    lt?: string;
    285    lts?: string;
    286  }
    287
    288  interface MomentParsingFlags {
    289    empty: boolean;
    290    unusedTokens: string[];
    291    unusedInput: string[];
    292    overflow: number;
    293    charsLeftOver: number;
    294    nullInput: boolean;
    295    invalidMonth: string | void; // null
    296    invalidFormat: boolean;
    297    userInvalidated: boolean;
    298    iso: boolean;
    299    parsedDateParts: any[];
    300    meridiem: string | void; // null
    301  }
    302
    303  interface MomentParsingFlagsOpt {
    304    empty?: boolean;
    305    unusedTokens?: string[];
    306    unusedInput?: string[];
    307    overflow?: number;
    308    charsLeftOver?: number;
    309    nullInput?: boolean;
    310    invalidMonth?: string;
    311    invalidFormat?: boolean;
    312    userInvalidated?: boolean;
    313    iso?: boolean;
    314    parsedDateParts?: any[];
    315    meridiem?: string;
    316  }
    317
    318  interface MomentBuiltinFormat {
    319    __momentBuiltinFormatBrand: any;
    320  }
    321
    322  type MomentFormatSpecification = string | MomentBuiltinFormat | (string | MomentBuiltinFormat)[];
    323
    324  export namespace unitOfTime {
    325    type Base = (
    326      "year" | "years" | "y" |
    327      "month" | "months" | "M" |
    328      "week" | "weeks" | "w" |
    329      "day" | "days" | "d" |
    330      "hour" | "hours" | "h" |
    331      "minute" | "minutes" | "m" |
    332      "second" | "seconds" | "s" |
    333      "millisecond" | "milliseconds" | "ms"
    334    );
    335
    336    type _quarter = "quarter" | "quarters" | "Q";
    337    type _isoWeek = "isoWeek" | "isoWeeks" | "W";
    338    type _date = "date" | "dates" | "D";
    339    type DurationConstructor = Base | _quarter | _isoWeek;
    340
    341    export type DurationAs = Base;
    342
    343    export type StartOf = Base | _quarter | _isoWeek | _date | void; // null
    344
    345    export type Diff = Base | _quarter;
    346
    347    export type MomentConstructor = Base | _date;
    348
    349    export type All = Base | _quarter | _isoWeek | _date |
    350      "weekYear" | "weekYears" | "gg" |
    351      "isoWeekYear" | "isoWeekYears" | "GG" |
    352      "dayOfYear" | "dayOfYears" | "DDD" |
    353      "weekday" | "weekdays" | "e" |
    354      "isoWeekday" | "isoWeekdays" | "E";
    355  }
    356
    357  type numberlike = number | string;
    358  interface MomentInputObject {
    359    years?: numberlike;
    360    year?: numberlike;
    361    y?: numberlike;
    362
    363    months?: numberlike;
    364    month?: numberlike;
    365    M?: numberlike;
    366
    367    days?: numberlike;
    368    day?: numberlike;
    369    d?: numberlike;
    370
    371    dates?: numberlike;
    372    date?: numberlike;
    373    D?: numberlike;
    374
    375    hours?: numberlike;
    376    hour?: numberlike;
    377    h?: numberlike;
    378
    379    minutes?: numberlike;
    380    minute?: numberlike;
    381    m?: numberlike;
    382
    383    seconds?: numberlike;
    384    second?: numberlike;
    385    s?: numberlike;
    386
    387    milliseconds?: numberlike;
    388    millisecond?: numberlike;
    389    ms?: numberlike;
    390  }
    391
    392  interface DurationInputObject extends MomentInputObject {
    393    quarters?: numberlike;
    394    quarter?: numberlike;
    395    Q?: numberlike;
    396
    397    weeks?: numberlike;
    398    week?: numberlike;
    399    w?: numberlike;
    400  }
    401
    402  interface MomentSetObject extends MomentInputObject {
    403    weekYears?: numberlike;
    404    weekYear?: numberlike;
    405    gg?: numberlike;
    406
    407    isoWeekYears?: numberlike;
    408    isoWeekYear?: numberlike;
    409    GG?: numberlike;
    410
    411    quarters?: numberlike;
    412    quarter?: numberlike;
    413    Q?: numberlike;
    414
    415    weeks?: numberlike;
    416    week?: numberlike;
    417    w?: numberlike;
    418
    419    isoWeeks?: numberlike;
    420    isoWeek?: numberlike;
    421    W?: numberlike;
    422
    423    dayOfYears?: numberlike;
    424    dayOfYear?: numberlike;
    425    DDD?: numberlike;
    426
    427    weekdays?: numberlike;
    428    weekday?: numberlike;
    429    e?: numberlike;
    430
    431    isoWeekdays?: numberlike;
    432    isoWeekday?: numberlike;
    433    E?: numberlike;
    434  }
    435
    436  interface FromTo {
    437    from: MomentInput;
    438    to: MomentInput;
    439  }
    440
    441  type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
    442  type DurationInputArg1 = Duration | number | string | FromTo | DurationInputObject | void; // null | undefined
    443  type DurationInputArg2 = unitOfTime.DurationConstructor;
    444  type LocaleSpecifier = string | Moment | Duration | string[] | boolean;
    445
    446  interface MomentCreationData {
    447    input: MomentInput;
    448    format?: MomentFormatSpecification;
    449    locale: Locale;
    450    isUTC: boolean;
    451    strict?: boolean;
    452  }
    453
    454  interface Moment extends Object {
    455    format(format?: string): string;
    456
    457    startOf(unitOfTime: unitOfTime.StartOf): Moment;
    458    endOf(unitOfTime: unitOfTime.StartOf): Moment;
    459
    460    add(amount?: DurationInputArg1, unit?: DurationInputArg2): Moment;
    461    /**
    462     * @deprecated reverse syntax
    463     */
    464    add(unit: unitOfTime.DurationConstructor, amount: number|string): Moment;
    465
    466    subtract(amount?: DurationInputArg1, unit?: DurationInputArg2): Moment;
    467    /**
    468     * @deprecated reverse syntax
    469     */
    470    subtract(unit: unitOfTime.DurationConstructor, amount: number|string): Moment;
    471
    472    calendar(): string;
    473    calendar(formats: CalendarSpec): string;
    474    calendar(time: MomentInput, formats?: CalendarSpec): string;
    475
    476    clone(): Moment;
    477
    478    /**
    479     * @return Unix timestamp in milliseconds
    480     */
    481    valueOf(): number;
    482
    483    // current date/time in local mode
    484    local(keepLocalTime?: boolean): Moment;
    485    isLocal(): boolean;
    486
    487    // current date/time in UTC mode
    488    utc(keepLocalTime?: boolean): Moment;
    489    isUTC(): boolean;
    490    /**
    491     * @deprecated use isUTC
    492     */
    493    isUtc(): boolean;
    494
    495    parseZone(): Moment;
    496    isValid(): boolean;
    497    invalidAt(): number;
    498
    499    hasAlignedHourOffset(other?: MomentInput): boolean;
    500
    501    creationData(): MomentCreationData;
    502    parsingFlags(): MomentParsingFlags;
    503
    504    year(y: number): Moment;
    505    year(): number;
    506    /**
    507     * @deprecated use year(y)
    508     */
    509    years(y: number): Moment;
    510    /**
    511     * @deprecated use year()
    512     */
    513    years(): number;
    514    quarter(): number;
    515    quarter(q: number): Moment;
    516    quarters(): number;
    517    quarters(q: number): Moment;
    518    month(M: number|string): Moment;
    519    month(): number;
    520    /**
    521     * @deprecated use month(M)
    522     */
    523    months(M: number|string): Moment;
    524    /**
    525     * @deprecated use month()
    526     */
    527    months(): number;
    528    day(d: number|string): Moment;
    529    day(): number;
    530    days(d: number|string): Moment;
    531    days(): number;
    532    date(d: number): Moment;
    533    date(): number;
    534    /**
    535     * @deprecated use date(d)
    536     */
    537    dates(d: number): Moment;
    538    /**
    539     * @deprecated use date()
    540     */
    541    dates(): number;
    542    hour(h: number): Moment;
    543    hour(): number;
    544    hours(h: number): Moment;
    545    hours(): number;
    546    minute(m: number): Moment;
    547    minute(): number;
    548    minutes(m: number): Moment;
    549    minutes(): number;
    550    second(s: number): Moment;
    551    second(): number;
    552    seconds(s: number): Moment;
    553    seconds(): number;
    554    millisecond(ms: number): Moment;
    555    millisecond(): number;
    556    milliseconds(ms: number): Moment;
    557    milliseconds(): number;
    558    weekday(): number;
    559    weekday(d: number): Moment;
    560    isoWeekday(): number;
    561    isoWeekday(d: number|string): Moment;
    562    weekYear(): number;
    563    weekYear(d: number): Moment;
    564    isoWeekYear(): number;
    565    isoWeekYear(d: number): Moment;
    566    week(): number;
    567    week(d: number): Moment;
    568    weeks(): number;
    569    weeks(d: number): Moment;
    570    isoWeek(): number;
    571    isoWeek(d: number): Moment;
    572    isoWeeks(): number;
    573    isoWeeks(d: number): Moment;
    574    weeksInYear(): number;
    575    weeksInWeekYear(): number;
    576    isoWeeksInYear(): number;
    577    isoWeeksInISOWeekYear(): number;
    578    dayOfYear(): number;
    579    dayOfYear(d: number): Moment;
    580
    581    from(inp: MomentInput, suffix?: boolean): string;
    582    to(inp: MomentInput, suffix?: boolean): string;
    583    fromNow(withoutSuffix?: boolean): string;
    584    toNow(withoutPrefix?: boolean): string;
    585
    586    diff(b: MomentInput, unitOfTime?: unitOfTime.Diff, precise?: boolean): number;
    587
    588    toArray(): number[];
    589    toDate(): Date;
    590    toISOString(keepOffset?: boolean): string;
    591    inspect(): string;
    592    toJSON(): string;
    593    unix(): number;
    594
    595    isLeapYear(): boolean;
    596    /**
    597     * @deprecated in favor of utcOffset
    598     */
    599    zone(): number;
    600    zone(b: number|string): Moment;
    601    utcOffset(): number;
    602    utcOffset(b: number|string, keepLocalTime?: boolean): Moment;
    603    isUtcOffset(): boolean;
    604    daysInMonth(): number;
    605    isDST(): boolean;
    606
    607    zoneAbbr(): string;
    608    zoneName(): string;
    609
    610    isBefore(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
    611    isAfter(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
    612    isSame(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
    613    isSameOrAfter(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
    614    isSameOrBefore(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
    615    isBetween(a: MomentInput, b: MomentInput, granularity?: unitOfTime.StartOf, inclusivity?: "()" | "[)" | "(]" | "[]"): boolean;
    616
    617    /**
    618     * @deprecated as of 2.8.0, use locale
    619     */
    620    lang(language: LocaleSpecifier): Moment;
    621    /**
    622     * @deprecated as of 2.8.0, use locale
    623     */
    624    lang(): Locale;
    625
    626    locale(): string;
    627    locale(locale: LocaleSpecifier): Moment;
    628
    629    localeData(): Locale;
    630
    631    /**
    632     * @deprecated no reliable implementation
    633     */
    634    isDSTShifted(): boolean;
    635
    636    // NOTE(constructor): Same as moment constructor
    637    /**
    638     * @deprecated as of 2.7.0, use moment.min/max
    639     */
    640    max(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
    641    /**
    642     * @deprecated as of 2.7.0, use moment.min/max
    643     */
    644    max(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
    645
    646    // NOTE(constructor): Same as moment constructor
    647    /**
    648     * @deprecated as of 2.7.0, use moment.min/max
    649     */
    650    min(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
    651    /**
    652     * @deprecated as of 2.7.0, use moment.min/max
    653     */
    654    min(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
    655
    656    get(unit: unitOfTime.All): number;
    657    set(unit: unitOfTime.All, value: number): Moment;
    658    set(objectLiteral: MomentSetObject): Moment;
    659
    660    toObject(): MomentObjectOutput;
    661  }
    662
    663  export var version: string;
    664  export var fn: Moment;
    665
    666  // NOTE(constructor): Same as moment constructor
    667  /**
    668   * @param strict Strict parsing disables the deprecated fallback to the native Date constructor when
    669   * parsing a string.
    670   */
    671  export function utc(inp?: MomentInput, strict?: boolean): Moment;
    672  /**
    673   * @param strict Strict parsing requires that the format and input match exactly, including delimiters.
    674   * Strict parsing is frequently the best parsing option. For more information about choosing strict vs
    675   * forgiving parsing, see the [parsing guide](https://momentjs.com/guides/#/parsing/).
    676   */
    677  export function utc(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
    678  /**
    679   * @param strict Strict parsing requires that the format and input match exactly, including delimiters.
    680   * Strict parsing is frequently the best parsing option. For more information about choosing strict vs
    681   * forgiving parsing, see the [parsing guide](https://momentjs.com/guides/#/parsing/).
    682   */
    683  export function utc(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
    684
    685  export function unix(timestamp: number): Moment;
    686
    687  export function invalid(flags?: MomentParsingFlagsOpt): Moment;
    688  export function isMoment(m: any): m is Moment;
    689  export function isDate(m: any): m is Date;
    690  export function isDuration(d: any): d is Duration;
    691
    692  /**
    693   * @deprecated in 2.8.0
    694   */
    695  export function lang(language?: string): string;
    696  /**
    697   * @deprecated in 2.8.0
    698   */
    699  export function lang(language?: string, definition?: Locale): string;
    700
    701  export function locale(language?: string): string;
    702  export function locale(language?: string[]): string;
    703  export function locale(language?: string, definition?: LocaleSpecification | void): string; // null | undefined
    704
    705  export function localeData(key?: string | string[]): Locale;
    706
    707  export function duration(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration;
    708
    709  // NOTE(constructor): Same as moment constructor
    710  export function parseZone(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
    711  export function parseZone(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
    712
    713  export function months(): string[];
    714  export function months(index: number): string;
    715  export function months(format: string): string[];
    716  export function months(format: string, index: number): string;
    717  export function monthsShort(): string[];
    718  export function monthsShort(index: number): string;
    719  export function monthsShort(format: string): string[];
    720  export function monthsShort(format: string, index: number): string;
    721
    722  export function weekdays(): string[];
    723  export function weekdays(index: number): string;
    724  export function weekdays(format: string): string[];
    725  export function weekdays(format: string, index: number): string;
    726  export function weekdays(localeSorted: boolean): string[];
    727  export function weekdays(localeSorted: boolean, index: number): string;
    728  export function weekdays(localeSorted: boolean, format: string): string[];
    729  export function weekdays(localeSorted: boolean, format: string, index: number): string;
    730  export function weekdaysShort(): string[];
    731  export function weekdaysShort(index: number): string;
    732  export function weekdaysShort(format: string): string[];
    733  export function weekdaysShort(format: string, index: number): string;
    734  export function weekdaysShort(localeSorted: boolean): string[];
    735  export function weekdaysShort(localeSorted: boolean, index: number): string;
    736  export function weekdaysShort(localeSorted: boolean, format: string): string[];
    737  export function weekdaysShort(localeSorted: boolean, format: string, index: number): string;
    738  export function weekdaysMin(): string[];
    739  export function weekdaysMin(index: number): string;
    740  export function weekdaysMin(format: string): string[];
    741  export function weekdaysMin(format: string, index: number): string;
    742  export function weekdaysMin(localeSorted: boolean): string[];
    743  export function weekdaysMin(localeSorted: boolean, index: number): string;
    744  export function weekdaysMin(localeSorted: boolean, format: string): string[];
    745  export function weekdaysMin(localeSorted: boolean, format: string, index: number): string;
    746
    747  export function min(moments: Moment[]): Moment;
    748  export function min(...moments: Moment[]): Moment;
    749  export function max(moments: Moment[]): Moment;
    750  export function max(...moments: Moment[]): Moment;
    751
    752  /**
    753   * Returns unix time in milliseconds. Overwrite for profit.
    754   */
    755  export function now(): number;
    756
    757  export function defineLocale(language: string, localeSpec: LocaleSpecification | void): Locale; // null
    758  export function updateLocale(language: string, localeSpec: LocaleSpecification | void): Locale; // null
    759
    760  export function locales(): string[];
    761
    762  export function normalizeUnits(unit: unitOfTime.All): string;
    763  export function relativeTimeThreshold(threshold: string): number | boolean;
    764  export function relativeTimeThreshold(threshold: string, limit: number): boolean;
    765  export function relativeTimeRounding(fn: (num: number) => number): boolean;
    766  export function relativeTimeRounding(): (num: number) => number;
    767  export function calendarFormat(m: Moment, now: Moment): string;
    768
    769  export function parseTwoDigitYear(input: string): number;
    770
    771  /**
    772   * Constant used to enable explicit ISO_8601 format parsing.
    773   */
    774  export var ISO_8601: MomentBuiltinFormat;
    775  export var RFC_2822: MomentBuiltinFormat;
    776
    777  export var defaultFormat: string;
    778  export var defaultFormatUtc: string;
    779  export var suppressDeprecationWarnings: boolean;
    780  export var deprecationHandler: ((name: string | void, msg: string) => void) | void;
    781
    782  export var HTML5_FMT: {
    783    DATETIME_LOCAL: string,
    784    DATETIME_LOCAL_SECONDS: string,
    785    DATETIME_LOCAL_MS: string,
    786    DATE: string,
    787    TIME: string,
    788    TIME_SECONDS: string,
    789    TIME_MS: string,
    790    WEEK: string,
    791    MONTH: string
    792  };
    793
    794}
    795
    796export = moment;