From aee45c611ed43cd7040b1942b54a21088eb5c055 Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Fri, 16 Apr 2021 22:45:33 +0300 Subject: [PATCH] Fix tooltip positioners and scriptable signature (#8909) --- types/index.esm.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index b1e347215d4..f700c0738a3 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[];