-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Documentation for typescript #18158
Comments
Do you mean that you want to add a manual page like "How to use three.js with Typescript"? |
I agree it would be good to have a guide about Typescript usage with |
Is there a general “how to use typescript in a new project with some dependencies” tutorial we could point at? Is using threejs with TS different from any other library? |
There is still the issue with duplicated imports of E.g. https://discourse.threejs.org/t/jsm-modules-for-browser-double-import-with-typescript/8235 |
Can we also add recommend ways to import multiple modules? This doesn't work:
This does work:
This doesn't work:
But this does:
|
Sorry for abandoning this - this looks hopeful - i had a conflict between TS version and threejs TS version and package.json hell - managed to sort it out after some trial and error (mainly error!) |
Regarding the doc, I think we should just state that it's better to setup the I just tried right now and nothing more than that is really needed for the setup. Also, it could be good to note that using the Node algorithm, the typings are resolved in |
See i imagine even this thread is going to be helpful - that comment @DavidPeicho about the import makes so much sense to read. |
@DavidPeicho It is strange that TypeScript definition points to the src folder: But the javascript file points to the build folder: I believe it cant result in accidentally compiling two THREE.js versions into the same minified file? if you import a source Class and an example Loader?
or maybe it's closure compiler doing something funky on my end? closure resolves the correct location |
Description of the problem
Three.js doesn't currently have a typescript section to the docs (that i could see, certainly).
Describe the bug or feature request in detail:
We should look to add an MVP doc for typescript to the docs which can list common issues and some more detail about how it works.
At the moment the typescript documentation is spread across the web on SO and in closed issues here in this repo
Three.js version
r111 ^
Browser
OS
The text was updated successfully, but these errors were encountered: