MCPcopy Create free account
hub / github.com/TanStack/hotkeys / assertValidHotkey

Function assertValidHotkey

packages/hotkeys/src/validate.ts:138–143  ·  view source on GitHub ↗
(hotkey: Hotkey | (string & {}))

Source from the content-addressed store, hash-verified

136 * ```
137 */
138export function assertValidHotkey(hotkey: Hotkey | (string & {})): void {
139 const result = validateHotkey(hotkey)
140 if (!result.valid) {
141 throw new Error(`Invalid hotkey '${hotkey}': ${result.errors.join(', ')}`)
142 }
143}
144
145/**
146 * Validates a hotkey and logs warnings to the console.

Callers 1

validate.test.tsFile · 0.90

Calls 1

validateHotkeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…