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

fix: modify nested ternary operators and any type in useTexture #1878

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

Gaic4o
Copy link
Contributor

@Gaic4o Gaic4o commented Mar 17, 2024

Why

Since there is a nested ternary operator and an any type, we refactored the nested ternary operator to make it easier to understand and maintain, and modified the any type.

What

  • Things that were of type any were changed to type unknown.
  • We refactored the ternary operator type nested in the MappedTextureType type to make it easier to understand and maintain.
  • Simplify texture processing logic in useEffect to handle various input types more uniformly.
  • Because the string type is not a subtype of any[], it always returns string. So I removed the extends any[] type and modified the code to make it easier to understand.

Checklist

  • Ready to be merged

Copy link

vercel bot commented Mar 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 17, 2024 7:43am

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@drcmda drcmda merged commit 65edca9 into pmndrs:master Apr 2, 2024
4 checks passed
@drcmda
Copy link
Member

drcmda commented Apr 2, 2024

thanks for all these fixes @Gaic4o really appreciate it! could you write us over at the discord to discuss administrative rights? i think fixes like these wouldn't have to site there for 2 weeks until somebody with time looks at it, it could go quicker. :)

Copy link

github-actions bot commented Apr 2, 2024

🎉 This PR is included in version 9.103.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Gaic4o
Copy link
Contributor Author

Gaic4o commented Apr 3, 2024

@drcmda
drei fix Thank you for your prompt response and the opportunity to further discuss the following issues.
Next time, I will contact you through Discord.
Thank you again for contacting us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants