]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update index.esm.d.ts (#8472)
authorJacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
Sun, 21 Feb 2021 14:16:11 +0000 (15:16 +0100)
committerGitHub <noreply@github.com>
Sun, 21 Feb 2021 14:16:11 +0000 (09:16 -0500)
* Update index.esm.d.ts

tickValue is to my knowledge always a number or a string so this will make it so people wont have to parse it themselfs

* Update core.scale.js

Update typedef according to types update

src/core/core.scale.js
types/index.esm.d.ts

index fe468b9adb4a40ecdb41fb44e42595b3fb06467d..10b4140216728134525f41f034fda97d274cb3f8 100644 (file)
@@ -8,7 +8,7 @@ import Ticks from './core.ticks';
 
 /**
  * @typedef { import("./core.controller").default } Chart
- * @typedef {{value:any, label?:string, major?:boolean, $context?:any}} Tick
+ * @typedef {{value:number | string, label?:string, major?:boolean, $context?:any}} Tick
  */
 
 defaults.set('scale', {
index 9cc8e562421c353324cab0677d2e925a7cc872ea..5a4802179c304f80736eb61fe1063c5f4edcc521 100644 (file)
@@ -2599,7 +2599,7 @@ export interface TickOptions {
        /**
         * Returns the string representation of the tick value as it should be displayed on the chart. See callback.
         */
-       callback: (tickValue: unknown, index: number, ticks: Tick[]) => string;
+       callback: (tickValue: number | string, index: number, ticks: Tick[]) => string;
        /**
         * If true, show tick labels.
         * @default true