Skip to content

Commit

Permalink
Switch module resolution to node
Browse files Browse the repository at this point in the history
This was preventing the tsserver from detecting the types in the WASM
module.
  • Loading branch information
battesonb committed Jun 14, 2023
1 parent 382d5db commit 3e7a138
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion www/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function scanImageBuffer() {

lastUpdate = Date.now();

const result: TopCode[] = await new Promise(resolve => {
const result = await new Promise<TopCode[]>(resolve => {
resolve(scan(buffer, WIDTH, HEIGHT));
});
deltaTime = Date.now() - lastUpdate;
Expand Down
2 changes: 1 addition & 1 deletion www/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "node",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
Expand Down

0 comments on commit 3e7a138

Please sign in to comment.