dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.83k stars 589 forks source link

Argument of type 'Selection<BaseType, unknown, HTMLElement, any>' is not assignable to parameter of type 'Selection<any, any, any, any>' #418

Open sagar08 opened 3 years ago

sagar08 commented 3 years ago

Package Installed

npm install d3 --save npm install dagre-d3 --save npm install --save @types/dagre-d3 npm install @types/d3 --save

Angular framework: 11

Error: src/app/D3/D3-Dynamic/D3-Dynamic.component.ts:113:12 - error TS2345: Argument of type 'Selection<BaseType, unknown, HTMLElement, any>' is not assignable to parameter of type 'Selection<any, any, any, any>'.
  The types of 'select(...).select' are incompatible between these types.
    Type '{ <DescElement extends BaseType>(selector: string): Selection<DescElement, unknown, HTMLElement, any>; <DescElement extends BaseType>(selector: null): Selection<null, undefined, HTMLElement, any>; <DescElement extends BaseType>(selector: ValueFn<...>): Selection<...>; }' is not assignable to type '{ <DescElement extends BaseType>(selector: string): Selection<DescElement, any, any, any>; <DescElement extends BaseType>(selector: null): Selection<null, undefined, any, any>; <DescElement extends BaseType>(selector: ValueFn<...>): Selection<...>; }'.
      Types of parameters 'selector' and 'selector' are incompatible.
        Type 'null' is not assignable to type 'string'.

113     render(container, g);
               ~~~~~~~~~
src/app/D3/D3-Static/D3-Static.component.ts:90:12 - error TS2345: Argument of type 'Selection<BaseType, unknown, HTMLElement, any>' is not assignable to parameter of type 'Selection<any, any, any, any>'.

90     render(container, g);
              ~~~~~~~~~
src/app/D3/D3-Static/D3-Static.component.ts:127:12 - error TS2345: Argument of type 'Selection<BaseType, unknown, HTMLElement, any>' is not assignable to parameter of type 'Selection<any, any, any, any>'.

127     render(container, g);
               ~~~~~~~~~