Skip to content

Commit 3026691

Browse files
fix: include types in export
When a package is being loaded via native ESM with TypeScript in `node16` mode, it looks up the types from the `export` property in package.json Defining a `types` property in `exports` allows for lookup of the typings see: https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing
1 parent 2a29fa8 commit 3026691

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"types": "index.d.ts",
88
"module": "index.mjs",
99
"exports": {
10+
"types": "./index.d.ts",
1011
"import": "./index.mjs",
1112
"require": "./index.js"
1213
},

0 commit comments

Comments
 (0)