Skip to content

Commit 0219090

Browse files
Export types in package.json (#544)
* Export types in package.json Types are not exported in package.json file. When using new "bundler" option for moduleResolution field included in TypeScript V5, you will receive the following error: error TS7016: Could not find a declaration file for module 'goober'. '.../node_modules/goober/dist/goober.modern.js' implicitly has an 'any' type. There are types at '.../node_modules/goober/goober.d.ts', but this result could not be resolved when respecting package.json "exports". The 'goober' library may need to update its package.json or typings. * Update package.json Co-authored-by: rodrigo <falsepopsky@protonmail.com> --------- Co-authored-by: rodrigo <falsepopsky@protonmail.com>
1 parent 2b2d422 commit 0219090

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
".": {
3838
"require": "./dist/goober.cjs",
3939
"import": "./dist/goober.modern.js",
40-
"umd": "./dist/goober.umd.js"
40+
"umd": "./dist/goober.umd.js",
41+
"types": "./goober.d.ts"
4142
},
4243
"./macro": "./macro/index.js",
4344
"./global": {

0 commit comments

Comments
 (0)