import { withType } from "https://deno.land/x/rimbu@0.13.5/deep/deep.ts";
Returns a curried API with a known target type. This can be useful for using the methods in contexts where the target type can be inferred from the usage.
Examples
Example 1
Example 1
const s = { a: 1, b: { c: 'a', d: true }}
const upd = Deep.withType<typeof s>().patchWith([{ d: (v) => !v }])
upd(s)
// => { a: 1, b: { c: 'a', d: false }}