I\'m not able to get this example of using the aforementioned combo going in TypeScript.
I have and <
The solution is from this issue.
Just install three-full and @types/three and add the types definitions to "compilerOptions" in tsconfig.json
.
"compilerOptions": {
/* ... */
"baseUrl": ".", // needed to use path aliases!
"paths": {
"three-full": ["node_modules/@types/three"]
}
}
Then import THREE like
import * as THREE from 'three-full';
Afterwards everything works fine including intellisense.
Without @types/three,` it still works, but you do not get intellisense.