Kit
Type aliases

BooleanCodecConfig

BooleanCodecConfig<TSize> = object

Defines the configuration options for boolean codecs.

A boolean codec encodes true as 1 and false as 0. The size option allows customizing the number codec used for storage.

See

Type Parameters

Type ParameterDescription
TSize extends NumberCodec | NumberDecoder | NumberEncoderA number codec, encoder, or decoder used for boolean representation.

Properties

size?

optional size: TSize

The number codec used to store boolean values.

  • By default, booleans are stored as a u8 (1 for true, 0 for false).
  • A custom number codec can be provided to change the storage size.

Default Value

u8

On this page