svgdotjs / svg.js

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

Missing second parameter of ```addTo()``` in d.ts #1279

Closed dhckdaks closed 1 year ago

dhckdaks commented 1 year ago

Bug report

addTo() function of SVG() has second parameter .js. But addTo() doesn't have second parameter in .d.ts.

Fiddle

svg.js.d.ts

class Dom extends EventTarget {
    ...
    addTo(parent: Dom | HTMLElement | string): this // no second parameter
    ...
}

src/elements/Dom.js

addTo (parent, i) { // there is second parameter
  return makeInstance(parent).put(this, i)
}
Fuzzyma commented 1 year ago

Feel free to create a pr to add it to the definition :)