Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Number/Format"

Index

Type aliases

Type aliases

Format

Format<N, fmt>: { 'b': { 0: 1; 1: 0; }[{ '-': 0; '+': 0; '0': 1; }[IterationOf<N>[4]]]; 'n': IterationOf<N>[3]; 's': N; }[fmt]

Change the format of a Number

Type parameters

param

to transform

returns

string | number | boolean

example

import {N} from 'ts-toolbelt'

type test0 = N.Format<'30', 'b'> // True
type test1 = N.Format<'30', 'n'> // 30

Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.