Can anyone help me figure out how to instantiate a generic Map
using TypeScript?
Map<string, IDoSomethingWith<Something>>
I attempted the following:
const test: ReadonlyArray<string> = ['somekey'];
new Map<string, IDoSomethingWith<Something>>(test)
However, I am unsure of how to properly pass the instance of
IDoSomethingWith<Something>
.
Encountering this error message:
Type 'string' is not assignable to type 'ReadonlyArray<[string, IDoSomethingWith<Something>]>'.'.