threejs-math
threejs-math copied to clipboard
newer typescript version don't find typings
Error: Could not find a declaration file for module 'threejs-math'. './node_modules/threejs-math/build/threejs-math.module.js' implicitly has an 'any' type. There are types at './node_modules/threejs-math/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'threejs-math' library may need to update its package.json or typings.
Causes:
Newer typescript want a exports["."].types
Solution: in package json
{
...
"typings": "types/index.d.ts",
"exports": {
".": {
"import": "./build/threejs-math.module.js",
"require": "./build/threejs-math.cjs",
"types": "./types/index.d.ts"
}
},
...
}
solved by #2