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 types #29

Merged
merged 13 commits into from
Jan 21, 2023
Merged

fix types #29

merged 13 commits into from
Jan 21, 2023

Conversation

Xuleos
Copy link
Contributor

@Xuleos Xuleos commented Jun 16, 2022

puts the types for useSprings, useTrail, and useSpring all in a usable state.

also makes it so that configs and easings are exported from index.d.ts so that the imports get compiled correctly

Copy link
Owner

@chriscerie chriscerie left a comment

Choose a reason for hiding this comment

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

Thanks! It looks like for imperative api, styles doesn't include spring keys that are in to and falsely includes reserved props. Can we try to fix this? We can also merge this for now and open an issue to revisit later.

// Expected - styles: { x: Roact.Binding<number> }
// Actual - styles: { to: Roact.Binding<{ x: number }> }
const [styles, api] = useSpring(hooks, () => {
  return { 
    to: { x: 3 },
  };
});

Copy link
Owner

@chriscerie chriscerie left a comment

Choose a reason for hiding this comment

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

Finally got around to reviewing this longer than I should have. Validated compatibility with recent changes, will open an issue to track comment above. Thanks! 🎉

@chriscerie chriscerie merged commit f586c99 into chriscerie:main Jan 21, 2023
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.

2 participants