Skip to main content
Module

x/rimbu/mod.ts>Patch.Obj

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias Patch.Obj
import { type Patch } from "https://deno.land/x/rimbu@0.11.6/mod.ts";
const { Obj } = Patch;

The object patch type, allows the user to specify keys in T that should be patched, and each given key contains either a new value or a nested patch, or a function receiving the current value, the parent object, and the root object, and returning a new value or a nested patch.

definition: [K in keyof T]?: (T[K] extends AnyFunc ? never : ObjItem<T[K], R>) | ((
cur: Protected<T[K]>,
parent: Protected<T>,
root: Protected<R>,
) => ObjItem<T[K], R>)