react-tetris2
Version:
Classic Tetris game as a reusable React 18+ component, fully typed with TypeScript and controllable via ref.
19 lines • 608 B
TypeScript
import { default as React } from 'react';
export type Tetris2Handle = {
start: () => void;
restart: () => void;
};
interface Props {
credits?: number;
manageCredits?: boolean;
showModals?: boolean;
soundEnabled?: boolean;
showControlsLegend?: boolean;
onGameOver?: () => void;
onScoreChange?: (score: number) => void;
onLevelChange?: (level: number) => void;
}
export declare const Tetris2: React.ForwardRefExoticComponent<Props & React.RefAttributes<Tetris2Handle>>;
export type { Props as Tetris2Props };
export default Tetris2;
//# sourceMappingURL=Tetris2.d.ts.map