Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix: cast ArrayBufferLike to ArrayBuffer for Blob constructor (TS 5.9)

esengine0475c23cc6e0
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index ce168481d..39294f70a 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -190,7 +190,7 @@ async function init(): Promise<void> {
let esbuildWasmURL = '/esbuild.wasm';
try {
const wasmData = await nativeFS.getEsbuildWasm();
- const blob = new Blob([wasmData.buffer], { type: 'application/wasm' });
+ const blob = new Blob([wasmData.buffer as ArrayBuffer], { type: 'application/wasm' });
esbuildWasmURL = URL.createObjectURL(blob);
console.log('[init] Using embedded esbuild.wasm');
} catch (e) {