score:1

Accepted answer

Make sure you pass the actual function and not the return value of the function, by eliminating the ():

 this.dragger = d3.drag()
     .on("drag", this.handleDrag)
     .on("end", this.endDrag); 

For your other issue, use (this as any).parentNode to allow this to be treated as any object to avoid typescript issues.


Related Query

More Query from same tag