vueuse / motion

🤹 Vue Composables putting your components in motion
https://motion.vueuse.org
MIT License
2.37k stars 82 forks source link

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

Closed alex-eliot closed 1 year ago

alex-eliot commented 1 year ago

@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 (https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208).

Tahul commented 1 year ago

Nice work :)

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