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

Add dynamic keys on useMotion directives when calling apply() and other methods #126

Merged
merged 4 commits into from
Jun 2, 2023

Conversation

alex-eliot
Copy link
Collaborator

@alex-eliot alex-eliot commented Jun 1, 2023

@Tahul
Adding support for strict typing of the directive keys when creating a motion instance using useMotion and other methods.
image

I've also added a few other // @ts-expect-error that seemed to be missing and caused tsc to throw errors. I believe it is cleaner to do it this way rather than do keyof typeof obj in every place, since it's something that TypeScript don't intend to change (microsoft/TypeScript#12253 (comment)).

@alex-eliot alex-eliot requested a review from Tahul June 1, 2023 18:52
@Tahul
Copy link
Member

Tahul commented Jun 2, 2023

Nice work :)

I think we can get rid of these @ts-expect-error in another PR.

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