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

[TypeScript] easing should be optional in transition:fly #5150

Closed
opensas opened this issue Jul 16, 2020 · 2 comments
Closed

[TypeScript] easing should be optional in transition:fly #5150

opensas opened this issue Jul 16, 2020 · 2 comments

Comments

@opensas
Copy link
Contributor

opensas commented Jul 16, 2020

Describe the bug
A clear and concise description of what the bug is.

When working with typescript, the following typescript alert is displayed if no easing param is specified:

Argument of type '{ delay: number; duration: number; x: number; y: number; opacity: number; }' is not assignable to parameter of type 'FlyParams'.
  Property 'easing' is missing in type '{ delay: number; duration: number; x: number; y: number; opacity: number; }' but required in type 'FlyParams'.ts(2345)

Offending code:

<div transition:fly="{{delay: 250, duration: 300, x: 0, y: -100, opacity: 0.5}}"
[...]

To get rid of the alert, you have to specify a value for easing, like this:

<div transition:fly="{{delay: 250, duration: 300, x: 0, y: -100, opacity: 0.5, easing: sineInOut}}"
[...]

To match the svelte tutorial it should be optional

Information about your Svelte project:

  • Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10)
    any browser

  • Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc)

  • Svelte version (Please check you can reproduce the issue with the latest release!)

"svelte": "^3.0.0",

  • Whether your project uses Webpack or Rollup
    rollup

Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely?

barely annoying

@opensas opensas changed the title easing should be optional in transition:fly [TypeScript] easing should be optional in transition:fly Jul 16, 2020
@tanhauhau
Copy link
Member

I believe this is fixed in #5083, and the fixed types have been published in 3.24.0.

@opensas
Copy link
Contributor Author

opensas commented Aug 7, 2020

I believe this is fixed in #5083, and the fixed types have been published in 3.24.0.

Yes, I can confirm that it has been fixed a couple of days ago, forgot to update this issue, thanks!

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

No branches or pull requests

4 participants