From 3931d59df5e6e74d9a954f2610acb66c7ca61694 Mon Sep 17 00:00:00 2001 From: sssajjad007 Date: Mon, 12 Aug 2024 17:37:43 +0330 Subject: [PATCH] fix: typescript issue --- index.d.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/index.d.ts b/index.d.ts index 0591ac7..f260ed2 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,14 +1,20 @@ -import { PluginFunc, ConfigType } from 'dayjs'; +import { PluginFunc } from 'dayjs'; declare const plugin: PluginFunc; export = plugin; -type calendarType = 'jalali' | 'gregory'; +type CalendarType = 'jalali' | 'gregory'; declare module 'dayjs' { - interface Dayjs { - calendar(calendarType: calendarType): Dayjs; + export function calendar(calendarType: CalendarType): Dayjs; + + export function isJalali(): boolean; - isJalali(): boolean; + export interface FormatObject { + jalali?: boolean; + } + + interface Dayjs { + calendar(calendarType: CalendarType): Dayjs; } -} +} \ No newline at end of file