three-stdlib
three-stdlib copied to clipboard
Building produces broken typescript
Using almost anything this package causes crazy type/resolution errors. Building from master it produces type definitions that import random stuff that doesn't exist. For instance from one of those above errors, src/nodes/utils/TimerNode.d.ts
imports from "../inputs/FloatNode"
which doesn't exist at all. Using the latest from npm has the same issue
sorry for how low quality this issue i am away from my computer right now
Hello, I think I created this issue related to the same kind of problem : https://github.com/pmndrs/three-stdlib/issues/148 I hope it will be fixed soon... Have a good day !
same. thank you
@drcmda @joshuaellis This seems quite problematic since it fails type-checking when skipLibCheck
is set to false
. I would like to help resolve this issue, but I'm not sure of the best path forward. It seems like the current solution of copying the types from @types/three
will not be maintainable long-term as they keep diverging. What would you think of removing the attempt to copy types from @types/three
and instead trying to enable allowJs
and fixing any errors with that?
Or if the goal is to keep them mostly aligned with the three examples, is there a way to know which examples have intentionally diverged and which ones haven't? Just browsing through the files, it seems like a lot of them have not diverged, but don't have the latest changes from the three examples in various ways (for example, ShadowMapViewier
is now a class using const
and let
in the three.js examples, but is still a function with a prototype using var
in this repo.
@drcmda After looking into it some more, it appears that many of the examples have not been modified since they were copied from three, so it seems to make sense to continue using the types from @types/three
where needed. Here is a PR to resolve this issue while still sticking with the current strategy: https://github.com/pmndrs/three-stdlib/pull/176.
:tada: This issue has been resolved in version 2.15.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: