frontend
frontend copied to clipboard
Use ChartIQ type declarations
Goal
As a developer, I want better type safety when using the ChartIQ charting library, so that my code is less bug-prone and I have improved DX (intellisense, etc.)
Background
Our previous distribution of ChartIQ licensed code did not include type declarations. As of the 9.0.0
distribution, types are now included. We can and should make use of these – both to avoid bugs and improve DX. Bug #605 would likely have been avoided if we were using ChartIQ types.
This is somewhat non-trivial since ChartIQ is an optional dependency (due to its licensing requirements).
Acceptance criteria
- When ChartIQ distro is included in local dev, type errors for ChartIQ types are highlighted in the IDE (e.g., VS Code)
- When ChartIQ distro is included in local dev, IDE shows appropriate hints/suggestions based on type declarations
- When ChartIQ distro is not included in local dev, nothing breaks (though ChartIQ-based charts will not be shown, as expected)