Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

declare retroactive interface implementations in TypeScript #14892

Merged
merged 4 commits into from
Sep 2, 2022

Conversation

S11001001
Copy link
Contributor

@S11001001 S11001001 commented Aug 31, 2022

Fixes #14082.

CHANGELOG_BEGIN
- [TypeScript codegen] Support for retroactive interface implementations
  included.  Choice inheritance is deprecated and `will be removed
  <https://github.com/digital-asset/daml/issues/14893>`__; to invoke an
  interface choice on a template-typed contract ID, convert it to an
  interface-typed ID with *TemplateName*``.toInterface``.
CHANGELOG_END
  • test intersection, and separate file reference
  • add changelog

@S11001001 S11001001 added component/js-ecosystem TypeScript and React.js bindings team/ledger-clients Related to the Ledger Clients team's components. labels Aug 31, 2022
@S11001001 S11001001 self-assigned this Aug 31, 2022
CHANGELOG_BEGIN
- [TypeScript codegen] Support for retroactive interface implementations
  included.  Choice inheritance is deprecated and `will be removed
  <https://github.com/digital-asset/daml/issues/14893>`__; to invoke an
  interface choice on a template-typed contract ID, convert it to an
  interface-typed ID with *TemplateName*``.toInterface``.
CHANGELOG_END
@S11001001 S11001001 marked this pull request as ready for review August 31, 2022 20:45
@S11001001 S11001001 requested a review from a team August 31, 2022 20:45
@@ -639,69 +639,87 @@ describe("interface definition", () => {
expect(c).not.toEqual(theChoice(if2[k]));
expect(c.template()).toBe(tpl);
});

test("retroactive interfaces permit contract ID conversion", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason we're not testing exercises somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests further down test interface exercise; there is absolutely no difference for retros from the perspective of codegen.

@S11001001 S11001001 merged commit 3902380 into main Sep 2, 2022
@S11001001 S11001001 deleted the 14082-js-codegen-retroImplements branch September 2, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/js-ecosystem TypeScript and React.js bindings team/ledger-clients Related to the Ledger Clients team's components.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resolve retroactive interfaces in js codegen
3 participants