Skip to content

AdapterHotkeyInput

ts
type AdapterHotkeyInput = 
  | RegisterableHotkey
  | {
  ~appHotkey: true;
};

Defined in: adapter.ts:246

The constraint for a function that takes a hotkey or an app hotkey in one signature. One signature puts a type error on the hotkey that caused it; with an overload per kind, TypeScript reports the error on the call. The app hotkey is named by its brand alone, so editors don't suggest its fields inside a hotkey object. Pair it with IfTypeParameter, so a wrapper whose hotkey is a type parameter still compiles.