Skip to content

Commit

Permalink
Fix init option (initial animation) type (#942)
Browse files Browse the repository at this point in the history
* Update options.d.ts

Update "Initial animation" option (init) type.
- https://www.chartjs.org/chartjs-plugin-annotation/latest/guide/configuration.html#initial-animation

* Fix init option (initial animation) return type

AnnotationElement might be Partial<>
  • Loading branch information
fteamkr authored Sep 19, 2024
1 parent 5cf9da0 commit a8dc07b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface CoreAnnotationOptions extends AnnotationEvents, ShadowOptions,
display?: Scriptable<boolean, PartialEventContext>,
drawTime?: Scriptable<DrawTime, PartialEventContext>,
hitTolerance?: Scriptable<number, PartialEventContext>,
init?: boolean | ((chart: Chart, properties: AnnotationBoxModel, options: AnnotationOptions) => void | boolean | AnnotationElement),
init?: boolean | (({ chart: Chart, properties: AnnotationBoxModel, options: AnnotationOptions }) => void | boolean | Partial<AnnotationElement>),
id?: string,
xMax?: Scriptable<ScaleValue, PartialEventContext>,
xMin?: Scriptable<ScaleValue, PartialEventContext>,
Expand Down

0 comments on commit a8dc07b

Please sign in to comment.