fix: Update LegendType
typescript definition to support 3rd (discrete) type
#3954
Labels
bug
For bugs or other software errors
Motivation
The source code handles 3 types of legend at runtime
vega/packages/vega-parser/src/parsers/legend.js
Lines 35 to 36 in ddd2bbf
vega/packages/vega-parser/src/parsers/legend.js
Lines 80 to 81 in ddd2bbf
The types definitions only permit 2 types of legend at compile time.
vega/packages/vega-typings/types/spec/legend.d.ts
Line 43 in 8a7f2f2
This mismatch contributed to a bug like vega/vega-lite#9399
Proposal
LegendType
to support the third type of legend,discrete
(implicitly discrete gradient vs continuous gradient). Note this may also impact 1 or more docstrings .vega/packages/vega-parser/src/parsers/guides/constants.js
Line 27 in 8a7f2f2
The text was updated successfully, but these errors were encountered: