Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Bool: boolean

The counterpart of Daml's Bool type.

ContractId<T>: string & { [ContractIdBrand]: T }

The counterpart of Daml's ContractId T type.

We represent ContractIds as strings. Their exact format of these strings depends on the ledger the Daml application is running on.

The purpose of the intersection with { [ContractIdBrand]: T } is to prevent accidental use of a ContractId<T> when a ContractId<U> is needed (unless T is a subtype of U). This technique is known as "branding" in the TypeScript community.

Type parameters

  • T

    The contract template.

Date: string

The counterpart of Daml's Date type.

We represent Dates as strings with format YYYY-MM-DD.

Decimal: Numeric

The counterpart of Daml's Decimal type.

In Daml, Decimal's are the same as Numeric with precision 10.

Int: string

The counterpart of Daml's Int type.

We represent Ints as string in order to avoid a loss of precision.

List<T>: T[]

The counterpart of Daml's [T] list type.

We represent lists using arrays.

Type parameters

  • T

    The type of the list values.

Numeric: string

The counterpart of Daml's Numeric type.

We represent Numerics as string in order to avoid a loss of precision. The string must match the regular expression -?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?.

Optional<T>: null | OptionalInner<T>

The counterpart of Daml's Optional T type.

Type parameters

  • T

    The type of the optionally present value.

Party: string

The counterpart of Daml's Party type.

We represent Partys as strings matching the regular expression [A-Za-z0-9:_\- ]+.

Text: string

The counterpart of Daml's Text type.

TextMap<T>: {}

The counterpart of Daml's TextMap T type.

We represent TextMaps as dictionaries.

Type parameters

  • T

    The type of the map values.

Type declaration

  • [key: string]: T
Time: string

The counterpart of Daml's Time type.

We represent Timess as strings with format YYYY-MM-DDThh:mm:ss[.ssssss]Z.

Variables

Bool: Serializable<boolean>

Companion object of the Bool type.

Date: Serializable<string>

Companion object of the Date type.

Decimal: Serializable<string>

Companion object of the Decimal type.

Int: Serializable<string>

Companion object of the Int type.

Party: Serializable<string>

Companion object of the Party type.

Text: Serializable<string>

Companion object of the Text type.

Time: Serializable<string>

Companion object of the Time type.

Companion object of the Unit type.

Functions

  • Companion function of the Numeric type.

    Parameters

    • _: number

    Returns Serializable<string>

  • assembleTemplate<T>(template: Template<T, unknown, string>, ...interfaces: Template<object, unknown, string>[]): Template<T>
  • internal

    Type parameters

    • T: object

    Parameters

    • template: Template<T, unknown, string>
    • Rest ...interfaces: Template<object, unknown, string>[]

    Returns Template<T>

  • emptyMap<K, V>(): Map<K, V>
  • Type parameters

    • K

    • V

    Returns Map<K, V>

  • lazyMemo<A>(mkDecoder: () => Decoder<A>): jtv.Decoder<A>
  • internal

    Variation of jtv.lazy which memoizes the computed decoder on its first invocation.

    Type parameters

    • A

    Parameters

    • mkDecoder: () => Decoder<A>
        • (): Decoder<A>
        • Returns Decoder<A>

    Returns jtv.Decoder<A>

  • lookupTemplate(templateId: string): Template<object, unknown, string>
  • internal

    Parameters

    • templateId: string

    Returns Template<object, unknown, string>

  • memo<A>(thunk: () => A): () => A
  • internal

    Turn a thunk into a memoized version of itself. The memoized thunk invokes the original thunk only on its first invocation and caches the result for later uses. We use this to implement a version of jtv.lazy with memoization.

    Type parameters

    • A

    Parameters

    • thunk: () => A
        • (): A
        • Returns A

    Returns () => A

      • (): A
      • internal

        Turn a thunk into a memoized version of itself. The memoized thunk invokes the original thunk only on its first invocation and caches the result for later uses. We use this to implement a version of jtv.lazy with memoization.

        Returns A

  • registerTemplate<T>(template: Template<T, unknown, string>): void
  • internal

    Type parameters

    • T: object

    Parameters

    Returns void

Generated using TypeDoc