UNPKG

@epicallan/money-ts

Version:

TypeScript library for type-safe and lossless encoding and manipulation of world currencies and precious metals

19 lines (18 loc) 917 B
import { Option } from 'fp-ts/Option'; import { BigInteger } from 'big-integer'; import * as R from 'fp-ts/Ring'; import * as EQ from 'fp-ts/Eq'; import * as ORD from 'fp-ts/Ord'; export declare function wrap(x: number | string): Option<BigInteger>; export declare const zero: BigInteger; export declare const one: BigInteger; export declare const two: BigInteger; export declare function add(x: BigInteger, y: BigInteger): BigInteger; export declare function mul(x: BigInteger, y: BigInteger): BigInteger; export declare function negate(x: BigInteger): BigInteger; export declare function sub(x: BigInteger, y: BigInteger): BigInteger; export declare function gcd(x: BigInteger, y: BigInteger): BigInteger; export declare function lcm(x: BigInteger, y: BigInteger): BigInteger; export declare const Eq: EQ.Eq<BigInteger>; export declare const Ord: ORD.Ord<BigInteger>; export declare const Ring: R.Ring<BigInteger>;