Function
toValue
(
control: FeedControl<Mode> | undefined,
)
Source from the content-addressed store, hash-verified
| 72 | |
| 73 | // The control as it was, to undo to: its level or exact weight, or Auto. |
| 74 | const toValue = <Mode>( |
| 75 | control: FeedControl<Mode> | undefined, |
| 76 | ): ControlValue<Mode> => |
| 77 | control |
| 78 | ? { |
| 79 | mode: control.mode, |
| 80 | ...(control.weight !== null && { weight: control.weight }), |
| 81 | } |
| 82 | : { mode: null }; |
| 83 | |
| 84 | export interface AppliedWhatsOffChange { |
| 85 | /** Takes the change back to how things were, where that can be done. */ |
Tested by
no test coverage detected