The discriminated union over EVERY code — what a field or a wire frame is typed as when it
can carry any message. Switching on code narrows params to that code's shape, and a
mismatched literal pair ({ code: 'rt.budget', params: { scope: 'x' } }) fails to assign.
The discriminated union over EVERY code — what a field or a wire frame is typed as when it can carry any message. Switching on
codenarrowsparamsto that code's shape, and a mismatched literal pair ({ code: 'rt.budget', params: { scope: 'x' } }) fails to assign.