Map constructor argument not working in gojs v1.0

var nodeTemplateMap = new go.Map(“string”, go.Node);
var groupTemplateMap = new go.Map(“string”, go.Group);
var palNodeTemplateMap = new go.Map(“string”, go.Node);
var linkTemplateMap = new go.Map(“string”, go.Link);
Here is how I am working with GoJS version 1.0.

Warning which i get – List/Map/Set constructors no longer take an argument that enforces type. Instead they take an optional collection of Values to add to the collection. See 2.0 changelog for details.

please help in find How can I utilize this feature in GoJS 2.0?

From the changelog:

Incompatible 2.0 changes and removals

Many of the minor changes were made to order to increase the modularity of the implementation. Nevertheless we have tried to maintain API compatibility with version 1.*.

  • List, Set, and Map constructors no longer take type arguments, but are generic in TypeScript The GoJS List, Set, and Map constructors no longer take type arguments and no longer do type checking in JavaScript. However, when using TypeScript these classes are now generic and will do type checking at compile time. In JavaScript, instead of new go.List(go.Point), write new go.List(). For compatibility, you can still provide an element type argument, but it is not used and not checked. In TypeScript, instead of new go.List(go.Point), write new go.List<go.Point>(), and the TypeScript compiler will enforce the List element typing. All three constructors now take an optional Iterable or Array argument that provides the initial elements for the new collection. In a future major version, we may replace go.Map and go.Set with enhanced ES6 Map and Set classes.
  • List.add, Set.add, and Map.add now all return the collection itself instead of a boolean. This is for increased compatibility with ES6 Map and Set collections.

. . .