]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add defaults to plugin interface (#10712)
authorJacco van den Berg <jaccoberg2281@gmail.com>
Tue, 27 Sep 2022 11:39:48 +0000 (13:39 +0200)
committerGitHub <noreply@github.com>
Tue, 27 Sep 2022 11:39:48 +0000 (13:39 +0200)
types/index.d.ts

index 4304319fdcdd2d13df1a00874511c6ed743c748c..83cc9c05483526269bbc6604cc812d05d9884a6a 100644 (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[];