However, Object.assign mutates the target. That means that if I have two templates that both implement the same interface they will both share the object and thereby things like the template id which is clearly very wrong. We cannot mutate the interface here.
Affected Daml version
2.1.0-snapshot.20220325.9626.0.4a483381
Bug description
The JS codegen generates code of the form
However,
Object.assign
mutates the target. That means that if I have two templates that both implement the same interface they will both share the object and thereby things like the template id which is clearly very wrong. We cannot mutate the interface here.To reproduce
daml start
cd ui && npm install
npm start
Expected behavior
I can work with two templates implementing the same interface correctly.