Skip to content

Commit

Permalink
fix: typescript type of package (#161)
Browse files Browse the repository at this point in the history
- Added type declaration files to ensure they are shipped alongside the package.
- Adjusted the exports field in package.json to ensure TypeScript can properly resolve the types.
  • Loading branch information
moontai0724 authored Nov 21, 2024
1 parent 67e8d95 commit 608d89c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"homepage": "https://github.com/bytecodealliance/componentize-js#readme",
"description": "ESM -> WebAssembly Component creator, via a SpiderMonkey JS engine embedding",
"type": "module",
"exports": "./src/componentize.js",
"exports": {
"types": "./types.d.ts",
"import": "./src/componentize.js"
},
"devDependencies": {
"@bytecodealliance/preview2-shim": "^0.16.7",
"mocha": "^10.2.0"
Expand All @@ -30,7 +33,8 @@
"lib/starlingmonkey_embedding.wasm",
"lib/starlingmonkey_embedding_weval.wasm",
"lib/starlingmonkey_ics.wevalcache",
"src"
"src",
"types.d.ts"
],
"workspaces": [
"."
Expand Down

0 comments on commit 608d89c

Please sign in to comment.