Svg.js: ForeignObject missing in Typescript definitions

Created on 7 Jul 2020  路  3Comments  路  Source: svgdotjs/svg.js

Bug report

The definition for typescript of foreignObject() is missing from svg.js.d.ts
Adding the line:

foreignObject(width: number, height: number): Svg

inside class Container extends Element {
solves the problem.

Thanks for considering!
mario

Most helpful comment

Yes this problem is solved in the current master which you can pull and build if you are in need of the fixes. I am waiting for a devdependency to be released before I release the new version

All 3 comments

I should add that I haven't found a way to add it, so I edited node_modules\@svgdotjs\svg.js\svg.js.d.ts
It is an ugly workaround, but I don't know other ways.
Any suggestion?

I'm speaking of the last version available on npm (3.0.16). In the git the the problem seems solved.

Yes this problem is solved in the current master which you can pull and build if you are in need of the fixes. I am waiting for a devdependency to be released before I release the new version

Was this page helpful?
0 / 5 - 0 ratings