From: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com> Date: Sun, 21 Feb 2021 14:16:11 +0000 (+0100) Subject: Update index.esm.d.ts (#8472) X-Git-Tag: v3.0.0-beta.12~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f071b0f231e9d181ec51b8c3327858eb969e218;p=thirdparty%2FChart.js.git Update index.esm.d.ts (#8472) * 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 --- diff --git a/src/core/core.scale.js b/src/core/core.scale.js index fe468b9ad..10b414021 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -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', { diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 9cc8e5624..5a4802179 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -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