* Type guard to check if an object is a valid KeybindingBlock.
(obj: unknown)
| 93 | * Type guard to check if an object is a valid KeybindingBlock. |
| 94 | */ |
| 95 | function isKeybindingBlock(obj: unknown): obj is KeybindingBlock { |
| 96 | if (typeof obj !== 'object' || obj === null) return false |
| 97 | const b = obj as Record<string, unknown> |
| 98 | return ( |
| 99 | typeof b.context === 'string' && |
| 100 | typeof b.bindings === 'object' && |
| 101 | b.bindings !== null |
| 102 | ) |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Type guard to check if an array contains only valid KeybindingBlocks. |
nothing calls this directly
no outgoing calls
no test coverage detected