From: Jukka Kurkela Date: Fri, 16 Apr 2021 19:45:33 +0000 (+0300) Subject: Fix tooltip positioners and scriptable signature (#8909) X-Git-Tag: v3.1.1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aee45c611ed43cd7040b1942b54a21088eb5c055;p=thirdparty%2FChart.js.git Fix tooltip positioners and scriptable signature (#8909) --- diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index b1e347215..f700c0738 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -31,7 +31,7 @@ export interface ScriptableLineSegmentContext { p1: PointElement } -export type Scriptable = T | ((ctx: TContext) => T); +export type Scriptable = T | ((ctx: TContext, options: AnyObject) => T); export type ScriptableOptions = { [P in keyof T]: Scriptable }; export type ScriptableAndArray = readonly T[] | Scriptable; export type ScriptableAndArrayOptions = { [P in keyof T]: ScriptableAndArray }; @@ -2331,7 +2331,7 @@ export interface TooltipModel { export const Tooltip: Plugin & { readonly positioners: { - [key: string]: (items: readonly Element[], eventPosition: { x: number; y: number }) => { x: number; y: number } | false; + [key: string]: (items: readonly ActiveElement[], eventPosition: { x: number; y: number }) => { x: number; y: number } | false; }; getActiveElements(): ActiveElement[];