Add defaults to plugin interface (#10712)

This commit is contained in:
Jacco van den Berg 2022-09-27 13:39:48 +02:00 committed by GitHub
parent b6322f3ab5
commit dea889b980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
types/index.d.ts vendored
View File

@ -1093,6 +1093,11 @@ export interface Plugin<TType extends ChartType = ChartType, O = AnyObject> exte
* @since 3.0.0
*/
uninstall?(chart: Chart, args: EmptyObject, options: O): void;
/**
* Default options used in the plugin
*/
defaults?: Partial<O>;
}
export declare type ChartComponentLike = ChartComponent | ChartComponent[] | { [key: string]: ChartComponent } | Plugin | Plugin[];