motiondivision / motion

A modern animation library for React and JavaScript
https://motion.dev
MIT License
25.67k stars 843 forks source link

Fix TypeScript error in GroupPlaybackControls.ts #2835

Closed morganwalkup closed 3 weeks ago

morganwalkup commented 1 month ago

Makes the fallback argument optional to satisfy the AnimationPlaybackControls interface and resolve typescript errors for consumers of Framer Motion:

image

Context

I'm consuming framer-motion@v11.11.9 in a project running typescript@v5.6.3, and receiving the above TypeScript error from node_modules/framer-motion/dist/index.d.ts. There seems to be a mismatch in the types between GroupPlaybackControls and AnimationPlaybackControls