From b42f9d127ddd2dd4e7e29be99c883222256cf1d7 Mon Sep 17 00:00:00 2001 From: stockiNail Date: Tue, 20 Jun 2023 18:16:37 +0200 Subject: [PATCH] Add events property to Plugin defined type (#11350) --- src/types/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 274ee56ff86..a3ef7bbd81c 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -816,6 +816,12 @@ export declare const layouts: { export interface Plugin extends ExtendedPlugin { id: string; + /** + * The events option defines the browser events that the plugin should listen. + * @default ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'] + */ + events?: (keyof HTMLElementEventMap)[] + /** * @desc Called when plugin is installed for this chart instance. This hook is also invoked for disabled plugins (options === false). * @param {Chart} chart - The chart instance.