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

Type errors #1203

Closed
crystalfp opened this issue Jun 17, 2021 · 4 comments
Closed

Type errors #1203

crystalfp opened this issue Jun 17, 2021 · 4 comments

Comments

@crystalfp
Copy link

Bug report

Typescript, inside Visual Studio Core, complains for two errors inside svg.js.d.ts (3.1.0 version):

node_modules/@svgdotjs/svg.js/svg.js.d.ts(824,28): error TS7051: Parameter has a name but no type. Did you mean 'arg0: any'?
node_modules/@svgdotjs/svg.js/svg.js.d.ts(1107,9): error TS7010: 'zoom', which lacks return-type annotation, implicitly has an 'any' return type.

Fiddle

It is a typescript compilation error and the error is clearly explained in the above error messages.

Explanation

I expect no compilation errors. Well, there are many other error messages from my code, seems from disruptive changes from the previous svgjs version, but I have to investigate them.

@Fuzzyma
Copy link
Member

Fuzzyma commented Jun 17, 2021

Feel free to create a PR that we can merge. You can even edit the files directly in your browser :)

@crystalfp
Copy link
Author

In file svg.js.d.ts line 824 add parameter name:

type EasingCallback = (...args: any) => number

In file svg.js.d.ts line 1107 add return type:

zoom(level: NumberAlias, point?: Point): this

@Fuzzyma
Copy link
Member

Fuzzyma commented Jun 18, 2021

Thanks to @maximedupre who helped out with this. Its merged!

@Fuzzyma Fuzzyma closed this as completed Jun 18, 2021
@crystalfp
Copy link
Author

Everything solved with the last update! 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

2 participants