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