pmndrs / three-stdlib

📚 Stand-alone library of threejs examples designed to run without transpilation in node & browser
https://npmjs.com/three-stdlib
MIT License
676 stars 110 forks source link

KTX2Loader.js / KTX2Loader.d.ts type mismatch. #345

Closed Archimagus closed 3 months ago

Archimagus commented 4 months ago

https://github.com/pmndrs/three-stdlib/blob/da078635112c23be67a848fcb16e06f66f0271a9/src/loaders/KTX2Loader.d.ts#L11

KTX2Loader does not have a parse method. but the types says that it does.

This causes an issue when trying to use drei along side ThreeJS natively when using the KTX2 loader.

Argument of type 'import("/node_modules/@types/three/examples/jsm/loaders/KTX2Loader").
KTX2Loader' is not assignable to parameter of type 'import("//node_modules/three-stdlib/loaders/KTX2Loader").KTX2Loader'.

 Property 'parse' is missing in type 'import("/node_modules/@types/three/examples/jsm/loaders/KTX2Loader").KTX2Loader' 
                but required in type 'import("x/node_modules/three-stdlib/loaders/KTX2Loader").KTX2Loader'.ts(2345)

KTX2Loader.d.ts(11, 3): 'parse' is declared here.

It seems simply updating the type def to remove parse would be the correct course of action.

Unless I am missing something.

github-actions[bot] commented 3 months ago

:tada: This issue has been resolved in version 2.29.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: