threejs, typescript and vite => everything threejs is any
Hi all,
I am coding a dead simple threejs experience where I hoped to be able to use typescript.
But all that's imported from the three import is considered as any and there is no way to navigate to the source definition :/
Here is the project config:
Deno 2.1.7
deno.json
vite.config.ts
What am I missing ?
I also have copilot but he wont autocomplete anything as well but that's another problem
6 Replies
What am I missing ?Maybe this part: Suppling "types" in deno.json I'm not 100% sure though, as i am still a noob with
deno
and typescript
😉Deno
Configuring TypeScript
In-depth documentation, guides, and reference materials for building secure, high-performance JavaScript and TypeScript applications with Deno
The example is for custom types, but the one i needed was from npm:@types/three :/
I don't see how your example would apply here
The fix i used was to move the dependencies in a package.json..
This is the same problem you might have seen that everyone has with
react
. Deno does not know to apply a @types
package to a non-typedpackage.Deno
TypeScript support
In-depth documentation, guides, and reference materials for building secure, high-performance JavaScript and TypeScript applications with Deno
Here's a hack I found that should also work for any other non-typed package.
GitHub
Deno-with-React-Pokedex-App/src/react.d.ts at main · Duenke/Deno-wi...
Contribute to Duenke/Deno-with-React-Pokedex-App development by creating an account on GitHub.