S
SolidJS15mo ago
Ladvace

Property 'pathLength' does not exist on type 'CircleSVGAttributes<SVGCircleElement>'

I was trying setting the pathLength property but I get the TS error above, not sure if the property is missing in the types or what
<circle
cx="50"
cy="50"
r="30"
pathLength="1"
/>
<circle
cx="50"
cy="50"
r="30"
pathLength="1"
/>
2 Replies
Martnart
Martnart15mo ago
I recently had a similar issue with GrandientSVGAttributes. The interfaces are not complete. It seems like pathLength is missing on the interface ShapeElementSVGAttributes. You could open a PR adding it to the dom-expressions repo. https://github.com/ryansolid/dom-expressions You can also override it for now with something like this
declare module 'solid-js' {
namespace JSX {
interface ShapeElementSVGAttributes {
pathLength?: string | number
}
}
}
declare module 'solid-js' {
namespace JSX {
interface ShapeElementSVGAttributes {
pathLength?: string | number
}
}
}
Ladvace
Ladvace15mo ago
thanks!