diff --git a/wasm/demo_app/app.ts b/wasm/demo_app/app.ts index 35712c73..764314f8 100644 --- a/wasm/demo_app/app.ts +++ b/wasm/demo_app/app.ts @@ -16,8 +16,6 @@ import * as THREE from "three" import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js" import loadMujoco from "../dist/mujoco.js" -declare function loadMujoco(): Promise; - let mujoco: any; const modelXml = ` @@ -483,7 +481,7 @@ async function main() { } catch (error) { console.error('Initialization error: ', error); - app.dispose(); + app?.dispose(); } } main(); diff --git a/wasm/tests/sandbox/main.ts b/wasm/tests/sandbox/main.ts index ed312512..02278cb5 100644 --- a/wasm/tests/sandbox/main.ts +++ b/wasm/tests/sandbox/main.ts @@ -15,8 +15,6 @@ import { MainModule, MjData, MjModel } from "../../dist/mujoco" import loadMujoco from "../../dist/mujoco.js" -declare function loadMujoco(): Promise; - async function main() { const mujoco: MainModule = await loadMujoco();