From a2282383c40e651c8865b39861cf7786d1ece1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Marche?= <35939574+ecstrema@users.noreply.github.com> Date: Mon, 3 Aug 2026 17:06:30 -0400 Subject: [PATCH] Add TypeScript definition file to package.json Currently, when using the 0.0.55 with typescript 7, I get the following error: ``` Could not find a declaration file for module '@openbeta/sandbag'. 'C:/Users/remim/prog/climbhub/node_modules/.bun/@openbeta+sandbag@0.0.55/node_modules/@openbeta/sandbag/dist/sandbag.esm.js' implicitly has an 'any' type. There are types at 'C:/Users/remim/prog/climbhub/node_modules/.bun/@openbeta+sandbag@0.0.55/node_modules/@openbeta/sandbag/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@openbeta/sandbag' library may need to update its package.json or typings.ts(7016) ``` It seems that although referenced by the "types" field, they are not exported, so typescript 7 refuses to use them. Adding "types" to export fixes it. --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7572d8e..6e09fae 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "exports": { ".": { "import": "./dist/sandbag.esm.js", - "require": "./dist/index.js" + "require": "./dist/index.js", + "types": "./dist/index.d.ts", } }, "types": "dist/index.d.ts",