Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some Typescript/build output issues #64

Merged
merged 7 commits into from
Aug 18, 2024
Merged

Fix some Typescript/build output issues #64

merged 7 commits into from
Aug 18, 2024

Conversation

emma-sg
Copy link
Member

@emma-sg emma-sg commented Nov 8, 2023

Specifically:

  • Errors from pako and stream-buffers when used in a project with Typescript where compilerOptions.skipLibCheck is false
  • Similar errors from hash-wasm, also when imported in node:
node_modules/warcio/dist/index.d.ts:2:25 - error TS2307: Cannot find module 'hash-wasm/dist/lib/WASMInterface' or its corresponding type declarations.

2 import { IHasher } from 'hash-wasm/dist/lib/WASMInterface';
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Not too sure how to fix this, I'll messing around with how the npm module is packaged maybe.

@ikreymer
Copy link
Member

The change suggested in #66 to add a .js to the import and change it to import { IHasher } from 'hash-wasm/dist/lib/WASMInterface.js'; seems to be the only thing that's working to address that, a bit puzzling, but seems to work!

@ikreymer ikreymer merged commit 7fa516a into main Aug 18, 2024
6 checks passed
@ikreymer ikreymer deleted the ts-fixes branch August 18, 2024 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants