Hierarchical Bar Chart Not Working

Hi Team,
Hierarchical bar chart not working in angular application.

root = d3Hierarchy.hierarchy(MBOSTOCK)
.sum(d => d.value)
.sort((a, b) => b.value - a.value)
.eachAfter(d => d.index = d.parent ? d.parent.index = d.parent.index + 1 || 0 : 0)
Error :
[ts] Property ‘value’ does not exist on type ‘{ “name”: string; “children”: { “name”: string; “children”: ({ “name”: string; “children”: ({ "na…’.

Hi Team,
Angular D3 NPM installed successfully but Observable sample code not working.

  1. Installed NPM D3.
  2. Following code from Hierarchical Bar Chart / D3 / Observable

Error :
root = d3Hierarchy.hierarchy(MBOSTOCK[0])
.sum(d => d.value)
.sort((a, b) => b.value - a.value)
.eachAfter(d => d.index = d.parent ? d.parent.index = d.parent.index + 1 || 0 : 0)

Error :
[ts] Property ‘value’ does not exist on type ‘{ “name”: string; “children”: { “name”: string; “children”: ({ “name”: string; “children”: ({ "na…’.