A SolidPaint with every optional field resolved — what a shape
stores and hands back, as opposed to what it accepts.
Two types for one paint, and deliberately: shape.fill = { kind: "solid", color } should be writable without naming an opacity, and
shape.fill.opacity should read 1 rather than undefined. Splitting the
accessor's two halves says that in the type system instead of in a sentence
nobody reads.
A SolidPaint with every optional field resolved — what a shape stores and hands back, as opposed to what it accepts.
Two types for one paint, and deliberately:
shape.fill = { kind: "solid", color }should be writable without naming an opacity, andshape.fill.opacityshould read1rather thanundefined. Splitting the accessor's two halves says that in the type system instead of in a sentence nobody reads.