Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type improvements for IBoxPlot and other interfaces #120

Open
fnimick opened this issue May 3, 2024 · 0 comments
Open

Type improvements for IBoxPlot and other interfaces #120

fnimick opened this issue May 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@fnimick
Copy link

fnimick commented May 3, 2024

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 fnimick added the enhancement New feature or request label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant