-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
using import { storageFactory } from "storage-factory";, Typescript gives me this error:
Could not find a declaration file for module 'storage-factory'. 'my-project/node_modules/storage-factory/lib/esm/index.js' implicitly has an 'any' type.
There are types at 'my-project/node_modules/storage-factory/lib/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'storage-factory' library may need to update its package.json or typings. ts(7016)
I think this is because package.json needs to include types explicitly on the ESM export, like this?
"exports": {
"require": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"import": {
"types": "./lib/index.d.ts",
"default": "./lib/esm/index.js"
}
}mcous
Metadata
Metadata
Assignees
Labels
No labels