mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
712231c963
Instead of importing _all_ other modules referenced from a module, only import those that are actually referenced from the generated code. First, this produces less noise within each generated file. Second and probably more important, this allows for not generating files without any actual definition at all. https://github.com/digital-asset/davl/pull/81 demonstrates the effect of this change on DAVL. |
||
---|---|---|
.. | ||
src | ||
tests | ||
BUILD.bazel | ||
README.md |
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.