Skip to content

Add TypeScript definition file to package.json - #187

Open
ecstrema wants to merge 1 commit into
OpenBeta:developfrom
ecstrema:patch-1
Open

Add TypeScript definition file to package.json#187
ecstrema wants to merge 1 commit into
OpenBeta:developfrom
ecstrema:patch-1

Conversation

@ecstrema

@ecstrema ecstrema commented Aug 3, 2026

Copy link
Copy Markdown

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.

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.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Coverage report

Caution

Multiple errors occurred

 1 | Error: The process '/usr/local/bin/npm' failed with exit code 1
 2 | Error: The process '/usr/local/bin/npx' failed with exit code 1
 3 | Coverage output file not found. (file "report.json" not found)
 4 | Getting code coverage data failed.
St.
Category Percentage Covered / Total
🟢 Statements 87.87% 630/717
🟡 Branches 67.54% 129/191
🟢 Functions 81.25% 130/160
🟢 Lines 86.91% 571/657

Report generated by 🧪jest coverage report action from a228238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant