score:13

Accepted answer

exactly where your problem is i do not see. this is possible:

let myselection : d3.selection<svgelement, {}, htmlelement, any> = d3.selectall<svgelement, {}>('#line');
function foo() : d3.selection<svgelement, {}, htmlelement, any> {
  return myselection.append<svgelement>('g')
}
alert(foo().node().tagname)

Related Query

More Query from same tag