diff --git a/types/index.d.ts b/types/index.d.ts index 313f95752..d5ce14a2f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -15,7 +15,9 @@ declare namespace dayjs { export type ConfigType = ConfigTypeMap[keyof ConfigTypeMap] - export type OptionType = { locale?: string, format?: string, utc?: boolean } | string | string[] + export interface FormatObject { locale?: string, format?: string, utc?: boolean } + + export type OptionType = FormatObject | string | string[] export type UnitTypeShort = 'd' | 'M' | 'y' | 'h' | 'm' | 's' | 'ms'