julianna-langston / chart2music

Turns charts into music so the blind can hear data
MIT License
29 stars 7 forks source link

TS errors thrown when specifying type #462

Closed julianna-langston closed 6 months ago

julianna-langston commented 6 months ago

I have code that looks like this:

import c2mChart from "chart2music";

// ...

c2mChart({
  type: "line",
  ...
})

Current behavior

I get a typescript error on the type: "line" line, which looks like this:

Type '"line"' is not assignable to type 'SUPPORTED_CHART_TYPES | SUPPORTED_CHART_TYPES[]'.ts(2322) index.d.ts(57, 5): The expected type comes from property 'type' which is declared here on type 'SonifyTypes' (property) type: SUPPORTED_CHART_TYPES | SUPPORTED_CHART_TYPES[]

Expected behavior No error

julianna-langston commented 6 months ago

Fixed in 1.17.0, which is now live.