UNPKG

react-tetris2

Version:

Classic Tetris game as a reusable React 18+ component, fully typed with TypeScript and controllable via ref.

10 lines 431 B
import { default as React } from 'react'; import { Action } from '../models/Game'; export type KeyboardMap = Record<string, Action>; /** * Binds a map of key names → Action to: * • non-Shift keys via keymaster * • the “shift” key via our useShift hook */ export declare function useKeyboardControls(keyboardMap: KeyboardMap, dispatch: React.Dispatch<Action>): void; //# sourceMappingURL=useKeyboardControls.d.ts.map