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: Correct return type for useGLTF composable #327

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

dotmot
Copy link
Contributor

@dotmot dotmot commented Jan 9, 2024

Added conditional return type to infer the actual return type when passing strings or arrays as currently it always return GTLFResult and that is not always correct.
image
With proposed changes
image
image

The type is correctly set and allows me to do this
image

Copy link

stackblitz bot commented Jan 9, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Jan 9, 2024

Deploy Preview for cientos-tresjs ready!

Name Link
🔨 Latest commit ad46ff3
🔍 Latest deploy log https://app.netlify.com/sites/cientos-tresjs/deploys/659dc01811bcff00086f1e67
😎 Deploy Preview https://deploy-preview-327--cientos-tresjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dotmot dotmot changed the title Update index.ts Correct return type for useGLTF composable Jan 9, 2024
@dotmot dotmot changed the title Correct return type for useGLTF composable fix: Correct return type for useGLTF composable Jan 9, 2024
Copy link
Member

@JaimeTorrealba JaimeTorrealba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it,
And thanks for fix this

@JaimeTorrealba JaimeTorrealba merged commit 8fac5fa into Tresjs:main Jan 10, 2024
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants