From 2b6f905030612c6fa1c9fd0e31da8cb9f5748e31 Mon Sep 17 00:00:00 2001 From: Minseok Choi Date: Fri, 29 Mar 2024 11:13:17 +0900 Subject: [PATCH] fix: timeline format labels funtion Date params to Moment type fix --- docs/timeline/index.html | 4 ++-- types/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/timeline/index.html b/docs/timeline/index.html index b777065786..9c843a67da 100644 --- a/docs/timeline/index.html +++ b/docs/timeline/index.html @@ -668,8 +668,8 @@

Configuration Options

You can also use a function format for each label. The function accepts as arguments the date, scale and step in that order, and expects to return a string for the label.
function format({
-  minorLabels: Function(date: Date, scale: Number, step: Number),
-  majorLabels: Function(date: Date, scale: Number, step: Number)
+  minorLabels: Function(date: Moment, scale: Number, step: Number),
+  majorLabels: Function(date: Moment, scale: Number, step: Number)
 }
diff --git a/types/index.d.ts b/types/index.d.ts index 77448d8387..a132e76100 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -144,7 +144,7 @@ export interface TimelineEditableOption { overrideItems?: boolean; } -export type TimelineFormatLabelsFunction = (date: Date, scale: string, step: number) => string; +export type TimelineFormatLabelsFunction = (date: Moment, scale: string, step: number) => string; export interface TimelineFormatLabelsOption { millisecond?: string;