Skip to content Skip to sidebar Skip to footer

Using Svg.select() Method With Class Selector Of The Svg.js Library Doesn't Work With Typescript

I'm testing svg.js library with typescript and having some problems with usage of CSS selectors. I would like to select SVG element using select() method with class selector. In th

Solution 1:

Seems like the type definitions are wrong. Thats not your fault, you should open a bug report. Until it gets fixed you could work around it:

SVG.select('rect.my-class', undefined as any)

Post a Comment for "Using Svg.select() Method With Class Selector Of The Svg.js Library Doesn't Work With Typescript"