constrain contract ID types when invoking interface-member choices #14132
Labels
component/js-ecosystem
TypeScript and React.js bindings
discussion
Things to be discussed and decided
ledger clients facade
enriching the ledger API by bindings/codegen, JSON API, custom view
roadmap/interfaces
https://digitalasset.atlassian.net/browse/DAML-56
team/ledger-clients
Related to the Ledger Clients team's components.
As of #14092, these are well-typed with respect to
atContractId
andchoicePayload
, regardless of whether the choicesMine
,Another
,Split
were defined withActualTemplate
or inherited from an interface:However, this is not well-typed with respect to
atContractId
, though it still is with respect tochoicePayload
:We currently recommend that users invoke the inherited choice (a la
Another
above) where that is possible in order to preserve type-checking, but adding overloads causes them to be removed from inheritance.The task here is to find a way in TypeScript to allow only
atContractId
either typed bySomeInterface
or a template known to implementSomeInterface
. Then we should consider removing inheritance.See #14092 (comment) for context.
The text was updated successfully, but these errors were encountered: