I am currently working on developing a custom visual using Power BI. Within my interfaces file, I have a TypeScript interface called BiHiSankey
.
declare module 'd3' {
interface BiHiSankey {
nodeSpacing: () => number;
nodeWidth: () => number;
collapsedNodes: () => d3.Selection<any>
}
export var biHiSankey: () => BiHiSankey
}
In my visual.ts file, I have implemented the following:
let BiHi = d3.biHiSankey();
BiHi.nodeWidth(20);
However, when trying to assign a value to the nodeWidth
using this method, I encounter an error stating, Expected 0 arguments, but got 1
.
I am unsure as to why this issue is occurring. As someone who is new to TypeScript, could anyone provide assistance?