Skip to content

Commit

Permalink
chore: update LocalePresetType
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed Jul 20, 2020
1 parent f9f4de7 commit 73813ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -105,7 +105,7 @@ declare namespace dayjs {

export function extend<T = unknown>(plugin: PluginFunc<T>, option?: T): Dayjs

export function locale(preset?: string | ILocale, object?: Partial<ILocale>, isLocal?: boolean): string
export function locale(preset?: LocalePresetType | ILocale, object?: Partial<ILocale>, isLocal?: boolean): string

export function isDayjs(d: any): d is Dayjs

Expand Down

0 comments on commit 73813ab

Please sign in to comment.