( state: Record<string, any>, update: Record<string, any>, )
| 12 | |
| 13 | /** @internal Copies each property from `update` onto `state`, in place, for every key already on `state`. */ |
| 14 | export function updateState( |
| 15 | state: Record<string, any>, |
| 16 | update: Record<string, any>, |
| 17 | ): void { |
| 18 | Object.keys(state).forEach((key) => { |
| 19 | state[key] = update[key] |
| 20 | }) |
| 21 | } |
| 22 | |
| 23 | // Helper function for cloning deep objects where |
| 24 | // the level and key is provided to the callback function. |
no outgoing calls
no test coverage detected