declare const GAME: string; async function main() { const { default: runGame }: { default: RunGame } = await import(`./games/${GAME}`); const canvas = document.getElementById('canvas'); if (canvas instanceof HTMLCanvasElement) { await runGame(canvas); } else { alert('Something wrong with your canvas!'); } } main().catch((e) => { console.error(e); // TODO display error page });