three-stdlib
three-stdlib copied to clipboard
Question: How to manage discrepancies with three types?
I'm noticing that these modules pull from @types/three, currently maintained parallel with three.
My concern is managing discrepancies between this repository and three's and keeping the shared types in sync.
To circumvent this, I see two options, although exhaustive:
- track and mirror changes in three, likely via bot magic (or vice versa)
- add self-contained types/doc to the repository
What are your thoughts on this? Is there something internal going on that makes this a non-issue?
From what I understand, the repo won't work with @types/three when people import this, three and the type library into their project, because @types/three maps to three.
So ideally this library needs to be brought over to TS or have it's own .d.ts files (which @giulioz is working on currently ⭐), in the meantime depending on the urgency these could be imported & then exported from @types/three? As I can see the fixes we do in this library causing divergence from three.
right, translating the js files to ts is probably best. simple annotation-like types hopefully as this isn't an interlinked library but simple little interfaces, so it should be quite minimal.
I've vendored types and manually fixed and upgraded modules for r128 to latest just now.