Skip to content

Conversation

@dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Jan 29, 2021

Up to Svelte version 3.32.0, the built-in animate/transition functions have optional parameters, but according to its typings they were mandatory. To not show unnecessary type errors to those users, {} should be added as a fallback parameter if the user did not provide one.
It may be the case that someone has a custom animation/transition with the same name that expects different parameters, or that someone did an import alias fly as foo, but those are very unlikely.
#785

Simon Holthausen added 2 commits January 29, 2021 17:04
Up to Svelte version 3.32.0, the built-in animate/transition functions have optional parameters, but according to its typings they were mandatory. To not show unnecessary type errors to those users, `{}` should be added as a fallback parameter if the user did not provide one.
It may be the case that someone has a custom animation with the same name that expects different parameters, but that possibility is far less likely.
sveltejs#785
@dummdidumm dummdidumm merged commit c9c6ea7 into sveltejs:master Jan 31, 2021
@dummdidumm dummdidumm deleted the fix-animate-transition-type-errors branch January 31, 2021 15:53
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.

1 participant