You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a project that has three-stdlib as a dependency I see these errors when running TypeScript:
node_modules/.pnpm/three-stdlib@2.28.0_three@0.139.2/node_modules/three-stdlib/objects/BatchedMesh.d.ts:37:5 - error TS2425: Class 'Mesh<BufferGeometry, Material>' defines instance member property 'onBeforeRender', but extended class 'BatchedMesh' defines it as instance member function.
37 onBeforeRender(): void;
~~~~~~~~~~~~~~
node_modules/.pnpm/three-stdlib@2.28.0_three@0.139.2/node_modules/three-stdlib/objects/BatchedMesh.d.ts:38:5 - error TS2425: Class 'Mesh<BufferGeometry, Material>' defines instance member property 'onAfterRender', but extended class 'BatchedMesh' defines it as instance member function.
38 onAfterRender(): void;
~~~~~~~~~~~~~
Relevant code:
I'm just importing the library, not using it yet. That is enough to trigger the tsc error.
Suggested solution:
I noticed you have @ts-ignore above onBeforeRender in BatchedMesh. In the generated BatchedMesh.d.ts these @ts-ignore comments get stripped:
Since the @ts-ignore comment isn't helping here, we have to actually fix the original type error. To fix it we could either make onBeforeRender a property in three-stdlib or make it a method in @types/three. It would be nice to know why @types/three defined onBeforeRender as a property in the first place though.
The text was updated successfully, but these errors were encountered:
three
version: 0.139.2@types/three
version: 0.139.0three-stdlib
version: 2.28.0Problem description:
In a project that has
three-stdlib
as a dependency I see these errors when running TypeScript:Relevant code:
I'm just importing the library, not using it yet. That is enough to trigger the
tsc
error.Suggested solution:
I noticed you have
@ts-ignore
aboveonBeforeRender
inBatchedMesh
. In the generatedBatchedMesh.d.ts
these@ts-ignore
comments get stripped:Since the
@ts-ignore
comment isn't helping here, we have to actually fix the original type error. To fix it we could either makeonBeforeRender
a property inthree-stdlib
or make it a method in@types/three
. It would be nice to know why@types/three
definedonBeforeRender
as a property in the first place though.The text was updated successfully, but these errors were encountered: