From: stockiNail Date: Tue, 20 Jun 2023 16:16:37 +0000 (+0200) Subject: Add events property to Plugin defined type (#11350) X-Git-Tag: v4.3.1~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b42f9d127ddd2dd4e7e29be99c883222256cf1d7;p=thirdparty%2FChart.js.git Add events property to Plugin defined type (#11350) --- diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 274ee56ff..a3ef7bbd8 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.