observablehq / plot

A concise API for exploratory data visualization implementing a layered grammar of graphics
https://observablehq.com/plot/
ISC License
4.47k stars 182 forks source link

Incorrect usage of `Exclude` in type declarations #2257

Open ethereon opened 2 hours ago

ethereon commented 2 hours ago

I believe these two should be using Omit<DotOptions, "symbol"> rather than Exclude<DotOptions, "symbol">:

https://github.com/observablehq/plot/blob/7d18179ef5c46db1dc0f463b9e4d0888766cc80d/src/marks/dot.d.ts#L141

https://github.com/observablehq/plot/blob/7d18179ef5c46db1dc0f463b9e4d0888766cc80d/src/marks/dot.d.ts#L144

(Exclude filters out members from unions, whereas Omit filters out properties)

mbostock commented 2 hours ago

Thanks for the report. Agreed.