chartjs-chart-boxplot icon indicating copy to clipboard operation
chartjs-chart-boxplot copied to clipboard

Type improvements for `IBoxPlot` and other interfaces

Open fnimick opened this issue 1 year ago • 0 comments

Currently, IBoxPlot and the other data interfaces requires all members to be defined.

This results in e.g.

  let data = {
    min: 1,
    q1: 2,
    median: 3,
    q3: 4,
    max: 5,
  } satisfies IBoxPlot;

having a compile error due to the missing whiskerMax, whiskerMin, mean, items, outliers members - even though it works fine at runtime.

It would be great if there were well-defined object types that could be used to strongly type the data input, with members appropriately marked as optional.

fnimick avatar May 03 '24 19:05 fnimick