fleetbase / fleetbase/fleetbase-js

sdk not exporting type declarations

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11
Forks
8
Avg merge
1d 22h
Merged PRs (30d)
4

Description

VS Code is not inferring the correct typings. I tested the following configuration by
manually changing the installed package inside node_modules.

It works now.

package.json

```
"exports": {
".": {
"types"./types/fleetbase.d.ts", // <-- THIS IS THE MISSING PIECE!
"import": "./dist/esm/fleetbase.js",
"require": "./dist/cjs/fleetbase.js"
}
},
// And possibly keep the top-level for older TS versions/tooling:
"types": "./dist/types/fleetbase.d.ts",
```

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.