daml/language-support/ts/codegen
Martin Huschenbett 0211e1337d Move the bazel aliases for yarn and java to the root BUILD file (#3786)
Replicating the yarn alias in multiple places doesn't make sense.
2019-12-09 13:22:21 +00:00
..
src daml2ts: Add E2E tests (#3776) 2019-12-07 18:34:40 +01:00
tests Move the bazel aliases for yarn and java to the root BUILD file (#3786) 2019-12-09 13:22:21 +00:00
BUILD.bazel daml2ts: Don't produce unused imports (#3689) 2019-12-01 11:38:56 +00:00
README.md Improve wording of daml2ts readme (#3652) 2019-11-27 16:16:10 +00:00

daml2ts

This is a very early version of a code generator for a TypeScript interface to a DAML package. Its shortcomings are documented in this Github issue. It is not yet shipped with the SDK. To run it, you must execute

$ bazel run //:daml2ts
Usage: daml2ts DAR-FILE -o DIR
  Generate TypeScript bindings from a DAR

somehere in this resository. The DAR-FILE is the DAR for which you want to generate the TypeScript interface. daml2ts will generate interfaces for all DALFs in that DAR. The output will be written into the directory DIR you specify via the -o option.

The @digitalasset/daml-json-types package referenced by the generated code has not yet been published. You can find it in the tests/ts/daml-json-types directory.

Currently, the generated interfaces are tailored towards the ledger.ts module of DAVL.