diff --git a/index.d.ts b/index.d.ts index 091d5aa31..4a0d440f6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -90,4 +90,6 @@ declare namespace dayjs { export function extend(plugin: PluginFunc, option?: ConfigType): Dayjs export function locale(arg1: any, arg2?: any): void + + export function isDayjs(d: any): d is Dayjs } diff --git a/src/index.js b/src/index.js index 8671018ae..626be49a5 100644 --- a/src/index.js +++ b/src/index.js @@ -445,6 +445,8 @@ dayjs.extend = (plugin, option) => { dayjs.locale = parseLocale +dayjs.isDayjs = isDayjs + dayjs.en = Ls[L] export default dayjs