daml/language-support
Stephen Compall 85f93f54a0
make exercise by interface contract ID safe (#14134)
* declare Interface, ToInterface, FromInterface in @daml/types library

* generate ToInterface and FromTemplate companion declarations

* add toInterface and unsafeFromInterface to template companion implementations

* declare marker types for every interface

* remove type parameter from interface companions' types

* add the union for forward implements

CHANGELOG_BEGIN
- [TypeScript codegen] To exercise an interface choice on a
  template-typed contract ID, you must now explicitly convert the
  contract ID to an interface-typed ID.  For example, where ``cid:
  ContractId<TemplateName>``, you can use
  ``TemplateName.toInterface(InterfaceName, cid)`` to produce a
  ``ContractId<InterfaceName>``.

  Interface contract IDs are also now typed as shown above; for example,
  the former type ``ContractId<InterfaceNameInterface<TemplateName>>``
  would now simply be ``ContractId<InterfaceName>``.
CHANGELOG_END
2022-08-31 09:25:53 -04:00
..
codegen-common deprecate interface library names; use new names downstream (#14856) 2022-08-29 20:43:47 +00:00
codegen-main update copyright headers (#12240) 2022-01-03 16:36:51 +00:00
hs/bindings Add metering_report_json to GetMeteringReportResponse [DPP-1104] (#14496) 2022-07-25 14:21:49 +01:00
java Test retro implements in java codegen (#14875) 2022-08-31 09:19:08 +01:00
scala add test case (#14882) 2022-08-31 11:28:59 +01:00
ts make exercise by interface contract ID safe (#14134) 2022-08-31 09:25:53 -04:00