From be7eab209c60c45e140f7bcb4bab1037d62d4c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kohn?= Date: Mon, 22 Apr 2024 16:18:00 +0200 Subject: [PATCH] fix(api): add type definitions to package.json exports (#9486) --- .changes/api-type-definitions.md | 5 +++++ tooling/api/package.json | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changes/api-type-definitions.md diff --git a/.changes/api-type-definitions.md b/.changes/api-type-definitions.md new file mode 100644 index 000000000..1ce3b3872 --- /dev/null +++ b/.changes/api-type-definitions.md @@ -0,0 +1,5 @@ +--- +"@tauri-apps/api": patch:bug +--- + +Set the `exports > types` package.json field. diff --git a/tooling/api/package.json b/tooling/api/package.json index 99148b1f8..00bee29b7 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -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" },