-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Open
Description
π Search Terms
typescript 6, package.json exports
π Version & Regression Information
- This changed between versions 5.9.3 and 6.0.2
β― Playground Link
https://github.com/darkship/ts6-bug
π» Code
import type { GLTF } from "three/examples/jsm/loaders/GLTFLoader"π Actual behavior
$ tsc --noEmit
src/index.ts:1:28 - error TS2307: Cannot find module 'three/examples/jsm/loaders/GLTFLoader' or its corresponding type declarations.
1 import type { GLTF } from "three/addons/loaders/GLTFLoader"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/index.ts:3:40 - error TS7006: Parameter 'c' implicitly has an 'any' type.
3 const a = (b: GLTF)=> b.scene.traverse(c=>{
~
Found 2 errors in the same file, starting at: src/index.ts:1
π Expected behavior
no error
Additional information about the issue
Export in three:0.153.0 and in @types/three:0.153.0 are defined as
"exports": {
//...
"./addons/*": "./examples/jsm/*",
//...
}
which should allow to import anything from ./examples/jsm/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels