MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isKeybindingBlock

Function isKeybindingBlock

source code/keybindings/validate.ts:41–49  ·  view source on GitHub ↗

* Type guard to check if an object is a valid KeybindingBlock.

(obj: unknown)

Source from the content-addressed store, hash-verified

39 * Type guard to check if an object is a valid KeybindingBlock.
40 */
41function isKeybindingBlock(obj: unknown): obj is KeybindingBlock {
42 if (typeof obj !== 'object' || obj === null) return false
43 const b = obj as Record<string, unknown>
44 return (
45 typeof b.context === 'string' &&
46 typeof b.bindings === 'object' &&
47 b.bindings !== null
48 )
49}
50
51/**
52 * Type guard to check if an array contains only valid KeybindingBlocks.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected