@@ -5,7 +5,7 @@ reads `plot-schema.json` and emits all the schema-derived TypeScript
55types into ` src/types/generated/schema.d.ts ` :
66
77- Common enum aliases (Calendar, Dash, AxisType, PatternShape, XRef, YRef,
8- TransitionEasing, PlotType)
8+ TransitionEasing, TraceType — plus a deprecated ` PlotType ` alias )
99- Shared sub-interfaces (Font, ColorBar, HoverLabel, etc.)
1010- Data interfaces for each trace type (BarData, ScatterData, IndicatorData, etc.)
1111- Layout component interfaces (LayoutAxis, Legend, Scene, Annotation, etc.)
@@ -43,8 +43,9 @@ const COMMON_TYPE_ANCHORS = [
4343When multiple sites match an anchor (e.g. 3D scene axes vs cartesian axes
4444both have ` xaxis.type ` enumerations), the generator picks the largest
4545value set — the superset — so the alias is always permissive enough.
46- ` PlotType ` is special-cased: derived from ` Object.keys(schema.traces) `
47- rather than from an attribute.
46+ ` TraceType ` is special-cased: derived from ` Object.keys(schema.traces) `
47+ rather than from an attribute. A deprecated ` PlotType = TraceType ` alias
48+ is also emitted for back-compat with prior versions of the type surface.
4849
4950Each discovered alias is emitted as ` export type Name = 'a' | 'b' | ... `
5051and registered in ` VALUES_TO_COMMON_TYPE ` so subsequent emission of any
@@ -184,7 +185,7 @@ descriptions are escaped to prevent prematurely closing the comment.
184185src/types/generated/schema.d.ts
185186├── import { Color, ColorScale, Datum, MarkerSymbol, TypedArray } from '../lib/common'
186187├── Common enum types (Calendar, Dash, AxisType, PatternShape, XRef, YRef,
187- │ TransitionEasing, PlotType)
188+ │ TransitionEasing, TraceType + deprecated PlotType alias )
188189├── Shared interfaces — public (Font, FontArray, ColorBar, HoverLabel, Domain,
189190│ Pattern, TickFormatStops, LegendGroupTitle, ...)
190191├── Internal shared interfaces in `namespace _internal` (Marker, Line,
@@ -242,9 +243,10 @@ you want a named alias for it:
242243 and rewrites matching enumerated attributes to reference the alias.
2432443 . Run ` npm run typecheck ` to verify.
244245
245- ` PlotType ` is a special case derived from ` Object.keys(schema.traces) `
246+ ` TraceType ` is a special case derived from ` Object.keys(schema.traces) `
246247rather than from an enumerated attribute; it doesn't follow the anchor
247- mechanism.
248+ mechanism. A deprecated ` PlotType = TraceType ` alias is emitted alongside it
249+ to keep older imports working.
248250
249251### Adding a new layout container
250252
0 commit comments