svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.04k stars 1.08k forks source link

Fix types for List and ForeignObject (same line separators) #1129

Closed josepaiva94 closed 4 years ago

josepaiva94 commented 4 years ago

Fixes typescript errors List and ForeignObject introduced in #1123 and hopefully with same line separators.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 99.924% when pulling 7adda38c70690be1bfee71b8e8c9f13d72455141 on josepaiva94:types into ec1a37312f3f555033c377d9e7c52f2570f2ae27 on svgdotjs:master.

Fuzzyma commented 4 years ago

Yes! Far better! However, a list can contain anything, not only elements. E.g. you can call list.x() and will get back a list with all the x values of the elements in the old list. So that restriction (T extends ElementAlias) unfortunately needs to go

josepaiva94 commented 4 years ago

So, I guess the only change for now is that bit in ForeignObject :) . I'll keep sending pull requests as I need changes.

Fuzzyma commented 4 years ago

hehe jeah sorry :D