Skip to content

Commit be7eab2

Browse files
authored
fix(api): add type definitions to package.json exports (#9486)
1 parent aaa332c commit be7eab2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.changes/api-type-definitions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tauri-apps/api": patch:bug
3+
---
4+
5+
Set the `exports > types` package.json field.

tooling/api/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@
2121
"type": "module",
2222
"main": "./index.cjs",
2323
"module": "./index.js",
24+
"types": "./index.d.ts",
2425
"exports": {
2526
".": {
2627
"import": "./index.js",
27-
"require": "./index.cjs"
28+
"require": "./index.cjs",
29+
"types": "./index.d.ts"
2830
},
2931
"./*": {
3032
"import": "./*.js",
31-
"require": "./*.cjs"
33+
"require": "./*.cjs",
34+
"types": "./*.d.ts"
3235
},
3336
"./package.json": "./package.json"
3437
},

0 commit comments

Comments
 (0)