Skip to content

Commit

Permalink
fix(api): add type definitions to package.json exports (#9486)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankoh authored Apr 22, 2024
1 parent aaa332c commit be7eab2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/api-type-definitions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tauri-apps/api": patch:bug
---

Set the `exports > types` package.json field.
7 changes: 5 additions & 2 deletions tooling/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
"type": "module",
"main": "./index.cjs",
"module": "./index.js",
"types": "./index.d.ts",
"exports": {
".": {
"import": "./index.js",
"require": "./index.cjs"
"require": "./index.cjs",
"types": "./index.d.ts"
},
"./*": {
"import": "./*.js",
"require": "./*.cjs"
"require": "./*.cjs",
"types": "./*.d.ts"
},
"./package.json": "./package.json"
},
Expand Down

0 comments on commit be7eab2

Please sign in to comment.