UNPKG

@toreda/strong-types

Version:

Better TypeScript code in fewer lines.

13 lines (12 loc) 503 B
import Big from 'big.js'; /** * Convert a Big, string, or number to standard float (`number`). Returns `null` when * input value is `undefined`, `null`, or a `Big` value which cannot be safely converted * to `number`. Useful for working with `Big` values but small types, such as a small exponent, * which must be in number form to use with a `Big`. * @param value * @returns * * @category Strong Helpers */ export declare function toFloat(value?: number | string | Big | null): number | null;