From 3e7a1384848a11317d6ab10e7a32811d382ac946 Mon Sep 17 00:00:00 2001 From: Byron Batteson Date: Wed, 14 Jun 2023 09:57:11 +0200 Subject: [PATCH] Switch module resolution to node This was preventing the tsserver from detecting the types in the WASM module. --- www/src/main.ts | 2 +- www/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/src/main.ts b/www/src/main.ts index 9fe63ad..23fef0c 100644 --- a/www/src/main.ts +++ b/www/src/main.ts @@ -34,7 +34,7 @@ async function scanImageBuffer() { lastUpdate = Date.now(); - const result: TopCode[] = await new Promise(resolve => { + const result = await new Promise(resolve => { resolve(scan(buffer, WIDTH, HEIGHT)); }); deltaTime = Date.now() - lastUpdate; diff --git a/www/tsconfig.json b/www/tsconfig.json index 75abdef..5019a94 100644 --- a/www/tsconfig.json +++ b/www/tsconfig.json @@ -7,7 +7,7 @@ "skipLibCheck": true, /* Bundler mode */ - "moduleResolution": "bundler", + "moduleResolution": "node", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true,