Skip to content

Commit

Permalink
Fixed issues with typing reported by publint
Browse files Browse the repository at this point in the history
  • Loading branch information
aiusepsi committed Oct 26, 2023
1 parent 01ac36f commit 1948dc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
"version": "1.6.0",
"description": "A small library to detect which features of WebAssembly are supported in your current browser.",
"exports": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.cjs"
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
},
"types": "dist/index.d.ts",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions render-dts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ writeFileSync(
.map(({ name }) => `${name}: () => Promise<boolean>`)
.join(",\n")};`,
);

writeFileSync(
"./dist/index.d.cts",
`export const\n${plugins
.map(({ name }) => `${name}: () => Promise<boolean>`)
.join(",\n")};`,
);

0 comments on commit 1948dc9

Please sign in to comment.