Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Boolean/Format"

Index

Type aliases

Type aliases

Format

Format<B, fmt>: { 'b': [false, true][B]; 'n': B; 's': ["false", "true"][B]; }[fmt]

Change the format of a Boolean

Type parameters

returns

string | number | boolean

example

import {B} from 'ts-toolbelt'

type test0 = B.Format<B.True, 's'> // 'true'
type test1 = B.Format<B.True, 'b'> //  true

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