From 73813ab5851c118450f5d8fc15cae71d49d800ae Mon Sep 17 00:00:00 2001 From: iamkun Date: Mon, 20 Jul 2020 11:39:41 +0800 Subject: [PATCH] chore: update LocalePresetType --- types/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 0eec9447..4ce68350 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -6,12 +6,12 @@ declare function dayjs (date?: dayjs.ConfigType): dayjs.Dayjs declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, strict?: boolean): dayjs.Dayjs -declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, locale?: string, strict?: boolean): dayjs.Dayjs +declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, locale?: LocalePresetType, strict?: boolean): dayjs.Dayjs declare namespace dayjs { export type ConfigType = string | number | Date | Dayjs - export type OptionType = { locale?: string, format?: string, utc?: boolean } | string | string[] + export type OptionType = { locale?: LocalePresetType, format?: string, utc?: boolean } | string | string[] type UnitTypeShort = 'd' | 'M' | 'y' | 'h' | 'm' | 's' | 'ms' export type UnitType = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'date' | UnitTypeShort; @@ -105,7 +105,7 @@ declare namespace dayjs { export function extend(plugin: PluginFunc, option?: T): Dayjs - export function locale(preset?: string | ILocale, object?: Partial, isLocal?: boolean): string + export function locale(preset?: LocalePresetType | ILocale, object?: Partial, isLocal?: boolean): string export function isDayjs(d: any): d is Dayjs