Skip to content
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

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

Closed
Archimagus opened this issue Feb 28, 2024 · 1 comment · Fixed by #350
Closed

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

Archimagus opened this issue Feb 28, 2024 · 1 comment · Fixed by #350
Labels
bug Something isn't working released typescript All things TS

Comments

@Archimagus
Copy link
Contributor

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.

@CodyJasonBennett CodyJasonBennett added bug Something isn't working typescript All things TS labels Feb 28, 2024
Archimagus added a commit to Archimagus/three-stdlib that referenced this issue Mar 19, 2024
Copy link

🎉 This issue has been resolved in version 2.29.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released typescript All things TS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants