Skip to content

Commit 6227c8b

Browse files
committed
fix: add isDayjs => boolean API
1 parent c2a487c commit 6227c8b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,6 @@ declare namespace dayjs {
9090
export function extend(plugin: PluginFunc, option?: ConfigType): Dayjs
9191

9292
export function locale(arg1: any, arg2?: any): void
93+
94+
export function isDayjs(d: any): d is Dayjs
9395
}

src/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ dayjs.extend = (plugin, option) => {
445445

446446
dayjs.locale = parseLocale
447447

448+
dayjs.isDayjs = isDayjs
449+
448450
dayjs.en = Ls[L]
449451

450452
export default dayjs

0 commit comments

Comments
 (0)