UNPKG

909 BTypeScriptView Raw
1import type { Dayjs, extend, isDayjs, locale, unix } from './dayjs';
2export declare type DateInput = Dayjs | Date | string | number | number[] | null | undefined | object;
3export declare type FormatOption = string | string[];
4export interface ParseOptions {
5 format?: FormatOption;
6 locale?: string;
7 strict?: boolean;
8}
9export interface DayjsFn {
10 (date?: DateInput, format?: FormatOption, locale?: boolean, strict?: boolean): Dayjs;
11 (date?: DateInput, format?: FormatOption, strict?: boolean): Dayjs;
12 isDayjs: typeof isDayjs;
13 unix: typeof unix;
14 extend: typeof extend;
15 locale: typeof locale;
16}
17export declare type Plugin<T = never> = ((cls: typeof Dayjs, fn: DayjsFn, option?: T) => void) & {
18 /** installed */
19 _i?: boolean;
20};
21export declare type PluginOption<T extends Plugin<any>> = T extends Plugin<infer O> ? O : T;
22export interface Extend {
23 new (): Extend;
24}
25
\No newline at end of file