Skip to content

TypeName

ts
type TypeName =
  | "Uint8"
  | "Uint16"
  | "Uint32"
  | "BigUint64"
  | "Int8"
  | "Int16"
  | "Int32"
  | "BigInt64"
  | "Float32"
  | "Float64";

A union type representing the supported numeric types for binary serialization.

Supported Types

  • Uint8: 8-bit unsigned integer (0 to 255)
  • Uint16: 16-bit unsigned integer (0 to 65,535)
  • Uint32: 32-bit unsigned integer (0 to 4,294,967,295)
  • BigUint64: 64-bit unsigned big integer
  • Int8: 8-bit signed integer (-128 to 127)
  • Int16: 16-bit signed integer (-32,768 to 32,767)
  • Int32: 32-bit signed integer (-2,147,483,648 to 2,147,483,647)
  • BigInt64: 64-bit signed big integer
  • Float32: 32-bit floating point number
  • Float64: 64-bit floating point number (double precision)

The type selection is automatically determined by the identifyBestType function based on the numeric value's range and precision requirements.