okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221apps/host: the owner's UI and the Node App Host0b3299a01

main
348 B6 linesraw
1/** A slower mutation response must not replace a newer request-completion event. */
2export function newestServingState<T extends { revision?: number }>(current: T | null, incoming: T): T {
3  return current && current.revision !== undefined && incoming.revision !== undefined && current.revision > incoming.revision
4    ? current
5    : incoming;
6}