Options
All
  • Public
  • Public/Protected
  • All
Menu

Module core/numeric

Index

Namespaces

Classes

Interfaces

Variables

Functions

Variables

Const DEC_PRECISION

DEC_PRECISION: 18 = 18

Functions

dec

  • dec(strings: TemplateStringsArray): Dec
  • Template tagged literal for creating new Dec objects out of literal string. This does not support literal string interpolation with ${}.

    Usage is:

    import { dec } from "@terra-money/terra.js";
    
    const dec1 = dec`234.12312`;
    const dec2 = new Dec("234.12312");
    
    dec1.equals(dec2);
    

    Parameters

    • strings: TemplateStringsArray

    Returns Dec

int

  • int(strings: TemplateStringsArray): Int
  • Template tagged literal for creating new Int objects out of literal string. This does not support literal string interpolation with ${}.

    Usage is:

    import { int } from "@terra-money/terra.js";
    
    const int1 = int`234`;
    const int2 = new Int("234");
    
    int1.equals(int2);
    

    Parameters

    • strings: TemplateStringsArray

    Returns Int