MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / commitTree

Function commitTree

packages/core/src/runtime/__tests__/focus.traps.test.ts:17–24  ·  view source on GitHub ↗
(vnode: VNode)

Source from the content-addressed store, hash-verified

15import type { CollectedTrap, CollectedZone } from "../widgetMeta.js";
16
17function commitTree(vnode: VNode) {
18 const allocator = createInstanceIdAllocator(1);
19 const res = commitVNodeTree(null, vnode, { allocator });
20 if (!res.ok) {
21 assert.fail(`commit failed: ${res.fatal.code}: ${res.fatal.detail}`);
22 }
23 return res.value.root;
24}
25
26function keyEvent(key: number, mods = 0) {
27 return { kind: "key" as const, action: "down" as const, key, mods, timeMs: 0 };

Callers 1

Calls 3

commitVNodeTreeFunction · 0.85
failMethod · 0.80

Tested by

no test coverage detected