Struggling to create a deeply nested (recursive) Map in Typescript generically. My attempt is to convert the provided Javascript example to Typescript:
const map1 = new Map([
['key1', 'value1']
])
const map2 = new Map([
['keyA', 'valueB'],
['keyB', map1]
])
const map3 = new Map([
['keyX', 'valueY'],
['keyZ', map2]
])
console.log('map3', map3)
Appreciate any guidance.