Is there a way to create a Map
in TypeScript where each member contains an array of strings, all in a single statement?
I attempted the following:
private gridOptions: Map<string, Array<string>> = {"1": ["test"]};
However, I encountered this error:
Module build failed: Error: /Users/*****/Work/dashboard/src/app/core/pg.service.ts (8,5): Type '{ "1": string[]; }' is not assignable to type 'Map<string, string[]>'.