@tanstack/hotkeys
Version:
Type-safe, framework-agnostic keyboard hotkey management for the browser
14 lines • 601 B
TypeScript
import { Store as Store$1 } from "./vendor/@tanstack/store/dist/store.js";
//#region src/_store.d.ts
/**
* The part of TanStack Store's `Store` that TanStack Hotkeys uses. Its stores
* work with TanStack Store's framework adapters, such as `useSelector` from
* `@tanstack/react-store`.
*/
export type Store<T> = Pick<Store$1<T>, 'state' | 'get' | 'setState' | 'subscribe'>;
/**
* Creates a store. Listeners run synchronously after each change, and an
* update to an equal value (by `Object.is`) notifies no one.
*/
export declare function createStore<T>(initialState: T): Store<T>;
//#endregion