-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[BUG] TS2370: A rest parameter must be of an array type. #972
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
Comments
Looking at your fix, it looks like it removes the ability to use the linear easing without any args? Also the fix needs to be applied to the JSDoc type definition directly, not the index.d.ts file. |
Hi, thanks for take a look. |
I have a similar issue in an Angular 19 with anime v4.0.2:
|
The issue could be related to the Typescript configuration flag skipLibCheck. I had a similar issue with other lib and adding This is a workaround, and anime should be compatible with the Typescript strict mode and the last Typescript spec. |
I agree, but does it means the linear easing function cannot have optional parameters? - export let linear: (...args?: (string | number)[]) => EasingFunction;
+ export let linear: (...args: (string | number)[]) => EasingFunction; This is not a proper solution since args should be optional. I'm open to suggestion here. Thanks! |
I agree with you. I'm not a expert of Typescript specification and I don't know why the Typescript team or spec changed it and what are the right implementation or alternative. Please don't take my last comment as a pushing or anger. I only try to explain the issue isn't solved skipping the strictness. |
Uh oh!
There was an error while loading. Please reload this page.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
I'm trying to use animejs v4.0.0 in my Angular project.
Has got this error:
tsconfig.json
tsconfig.app.json
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: