Options
All
  • Public
  • Public/Protected
  • All
Menu

sirdez

Index

Type Aliases

ArrayFactory: (<T>(sd: Serdes<T>, headSd: Serdes<number>) => Serdes<T[]>)

Type declaration

BytesFactory: ((headSd: Serdes<number>) => Serdes<Uint8Array>)

Type declaration

ClazzFactory: (<T, C>(clazz: {}, sd: Serdes<T>) => ClazzSerdes<C>)

Type declaration

Des<T>: ((ctx: Context) => T)

Type Parameters

  • T

Type declaration

Encoding<T>: { decode: any; encode: any }

Type Parameters

  • T

Type declaration

GetType<T>: T extends Serdes<infer X> ? X : never

Type Parameters

  • T

MapFactory: (<T>(keySd: Serdes<string>, valueSd: Serdes<T>, headSd: Serdes<number>) => Serdes<Record<string, T>>)

Type declaration

OneOf<T>: ValueOf<OneOfMap<T>>

Type Parameters

  • T

OneOfFactory: (<T>(headSd: Serdes<number>, definition: StructDefinition<T>) => Serdes<OneOf<T>>)

Type declaration

OneOfMap<T>: { [ K in keyof T]: { type: K; value: T[K] } }

Type Parameters

  • T

OptionalFactory: (<T>(sd: Serdes<T>) => Serdes<T | void>)

Type declaration

RecFactory: (<T>(sd: (() => Serdes<T>)) => Serdes<T>)

Type declaration

Ser<T>: ((ctx: Context, data: T) => void)

Type Parameters

  • T

Type declaration

    • Parameters

      Returns void

StringFactory: ((encoding: Encoding<string>, headSd: Serdes<number>) => Serdes<string>)

Type declaration

Struct: Record<string | number, unknown> | unknown[]
StructDefinition<T>: { [ k in keyof T]: Serdes<T[k]> }

Type Parameters

StructFactory: (<T>(definition: StructDefinition<T>) => Serdes<T>)

Type declaration

TupleFactory: (<T>(...definition: StructDefinition<T>) => Serdes<T>)

Type declaration

ValueOf<T>: T[keyof T]

Type Parameters

  • T

Variables

bigInt64: Serdes<bigint> = ...
bigUint64: Serdes<bigint> = ...
boolean: Serdes<boolean> = ...
float32: Serdes<number> = ...
float64: Serdes<number> = ...
int16: Serdes<number> = ...
int32: Serdes<number> = ...
int8: Serdes<number> = ...
latin1: Encoding<string> = ...
size: Serdes<number> = ...
ucs2: Encoding<string> = ...
uint16: Serdes<number> = ...
uint32: Serdes<number> = ...
uint8: Serdes<number> = ...
usize: Serdes<number> = ...
utf8: Encoding<string> = ...
utf8js: Encoding<string> = ...

Functions

  • contextDes<T>(ctx: Context, des: Des<T>, bytes: Uint8Array): T
  • contextFromBytes(array: Uint8Array): Context
  • contextSer<T>(ctx: Context, ser: Ser<T>, data: T): Uint8Array
  • createContext(size?: number): Context
  • msgpack(encoding: Encoding<string>, single?: boolean): Serdes<unknown>
  • number(kind: IntKind, bitSize: IntSize): Serdes<number>
  • number(kind: "float", bitSize: FloatSize): Serdes<number>
  • number(kind: BigIntKind, bitSize: 64): Serdes<bigint>
  • number(kind: Kind, bitSize: Size): Serdes<never>

Generated using TypeDoc