MCPcopy
hub / github.com/coder/mux / isRightSidebarLayoutState

Function isRightSidebarLayoutState

src/browser/utils/rightSidebarLayout.ts:44–52  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

42}
43
44export function isRightSidebarLayoutState(value: unknown): value is RightSidebarLayoutState {
45 if (!value || typeof value !== "object") return false;
46 const v = value as Record<string, unknown>;
47 if (v.version !== 1) return false;
48 if (typeof v.nextId !== "number") return false;
49 if (typeof v.focusedTabsetId !== "string") return false;
50 if (!isLayoutNode(v.root)) return false;
51 return findTabset(v.root, v.focusedTabsetId) !== null;
52}
53export interface RightSidebarLayoutState {
54 version: 1;
55 nextId: number;

Callers 1

Calls 2

isLayoutNodeFunction · 0.70
findTabsetFunction · 0.70

Tested by

no test coverage detected