I am working with the 3D.js library and trying to create a graph:
d3.select(`#myGraph`)
.append('svg')
const svg = d3.select(`#myGraph svg`).append('g')
const nodeEnter = svg.selectAll("g.node")
.data(nodes)
.enter()
.append("g")
.attr("class", "node")
.call(force.drag())
svg.selectAll(".node")
.each(function (d: any) {
d3.select(this)
.attr("data-source", d.id)
})
However, I encountered an error stating: 'this' implicitly has type 'any' because it does not have a type annotation
Is there a way to resolve this issue without using @ts-ignore?