Daml Set corresponding Javascript type?
Hi Guys,
I have a daml template that takes in an argument of type Set, the template looks like below. It’s the last field, observers
template Asset with
assetType : AssetType
-- The asset owner
owner : Party
-- The amount of the asset
amount : Decimal
observers : Set Party
When using the Daml/ react library, What javascript datastructure do I pass in?
I’ve tried passing in an an array of partyId, eg [party], Not quite sure what I need to pass in.
also tried to use the DA.set, but I get the second image’s error, not sure what to pass in here.


Hey guys. I’m struggling to create an instance of Map<Party, {}> in sdk 1.17.1 using typescript. Not sure if the type has changed since when this question was posted. Hopefully I’m missing something simple:
import { Map, Party } from "@daml/types";
const x: Map<Party, {}> = [['a', {}], ['b', {}]];
Getting this error:
Type '(string | {})[][]' is missing the following properties from type 'Map<string, {}>': get, has, set, delete, entriesArray
Sets and Maps in typescript have been bugging me for a while. Good to know this!