chartjs / chartjs/chartjs-plugin-annotation
TypeScript: `xMin`, `xMax`, `yMin`, `yMax` should accept undefined value as Scriptable options return value
Open
types
- Dominant language
- JavaScript
- Stars
- 623
- Forks
- 377
- PR merge metrics
- No merged PRs in 30d
Description
The four options `xMin`, `xMax`, `yMin`, and `yMax` can accept an `undefined` value to indicate "growth to the chart boundary." Scriptable options for these four options also support an `undefined` value. However, TypeScript has incorrectly defined the types for these four options:
```ts
xMax?: Scriptable,
xMin?: Scriptable,
yMax?: Scriptable,
yMin?: Scriptable,
```
Using `(_, __) => undefined` should be a valid assignment, but currently, TypeScript raises a type error.
Contributor guide
Assessment
This issue has not been assessed yet.