mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-13 07:28:03 -05:00
18 lines
326 B
TypeScript
18 lines
326 B
TypeScript
export type RenderInfo = {
|
|
screenWidth: number;
|
|
screenHeight: number;
|
|
};
|
|
|
|
type ConsoleApp<Db, View> = {
|
|
createView(): View;
|
|
|
|
render: (
|
|
this: { db: Db; view: View },
|
|
info: RenderInfo,
|
|
) => string[] | undefined;
|
|
|
|
onKeyDown: (this: { db: Db; view: View }, key: string) => void;
|
|
};
|
|
|
|
export default ConsoleApp;
|