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

Function checkHotkey

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

Source from the content-addressed store, hash-verified

157 * ```
158 */
159export function checkHotkey(hotkey: Hotkey | (string & {})): boolean {
160 const result = validateHotkey(hotkey)
161
162 if (result.errors.length > 0) {
163 console.error(`Hotkey '${hotkey}' errors:`, result.errors.join('; '))
164 }
165
166 if (result.warnings.length > 0) {
167 console.warn(`Hotkey '${hotkey}' warnings:`, result.warnings.join('; '))
168 }
169
170 return result.valid
171}

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…