Skip to content

Commit

Permalink
Fix tooltip positioners and scriptable signature
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Apr 16, 2021
1 parent ef3a777 commit 40e98a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.esm.d.ts
Expand Up @@ -31,7 +31,7 @@ export interface ScriptableLineSegmentContext {
p1: PointElement
}

export type Scriptable<T, TContext> = T | ((ctx: TContext) => T);
export type Scriptable<T, TContext> = T | ((ctx: TContext, options: AnyObject) => T);
export type ScriptableOptions<T, TContext> = { [P in keyof T]: Scriptable<T[P], TContext> };
export type ScriptableAndArray<T, TContext> = readonly T[] | Scriptable<T, TContext>;
export type ScriptableAndArrayOptions<T, TContext> = { [P in keyof T]: ScriptableAndArray<T[P], TContext> };
Expand Down Expand Up @@ -2331,7 +2331,7 @@ export interface TooltipModel<TType extends ChartType> {

export const Tooltip: Plugin & {
readonly positioners: {
[key: string]: (items: readonly Element[], eventPosition: { x: number; y: number }) => { x: number; y: number };
[key: string]: (items: readonly ActiveElement[], eventPosition: { x: number; y: number }) => { x: number; y: number } | false;
};

getActiveElements(): ActiveElement[];
Expand Down

0 comments on commit 40e98a6

Please sign in to comment.