UNPKG

@yoroi/common

Version:

The Common package of Yoroi SDK

28 lines (25 loc) 810 B
/** * Flowtype definitions for parse-decimal * Generated by Flowgen from a Typescript Definition * Flowgen v1.21.0 */ import { Numbers } from "@yoroi/types"; import { BigNumber } from "bignumber.js"; /** * Parses a decimal number from a string and returns the parsed value as a BigNumber. * @param value - The string to parse, negative sign is ignored. * @param decimalPlaces - The number of decimal places to round (BigNumber.ROUND_DOWN). * @param format - The locale format to use for formatting the parsed value. * @returns An object containing the string and the parsed value as a BigNumber. */ declare export function parseDecimal(x: { value: string | number | BigNumber, decimalPlaces: number, format: Numbers.Locale, ... }): { text: string, bn: BigNumber, bi: bigint, ... };