@types/bser

  • Version 2.0.4
  • Published
  • 6.84 kB
  • 2 dependencies
  • MIT license

Install

npm i @types/bser
yarn add @types/bser
pnpm add @types/bser

Overview

TypeScript definitions for bser

Index

Functions

function dumpToBuffer

dumpToBuffer: (val: any) => Buffer;

    function loadFromBuffer

    loadFromBuffer: (input: InputWrapper) => AnyWrapper | AnyWrapper[];

      Classes

      class Accumulator

      class Accumulator {}

        constructor

        constructor(initsize?: number);

          property buf

          buf: Buffer;

            property readOffset

            readOffset: number;

              property writeOffset

              writeOffset: number;

                method append

                append: (buf: InputWrapper) => void;

                  method assertReadableSize

                  assertReadableSize: (size: number) => void;

                    method peekDouble

                    peekDouble: () => number;

                      method peekInt

                      peekInt: (size: number) => IntWrapper;

                        method peekString

                        peekString: (size: number) => string;

                          method readAdvance

                          readAdvance: (size: number) => void;

                            method readAvail

                            readAvail: () => number;

                              method readDouble

                              readDouble: () => number;

                                method readInt

                                readInt: (bytes: number) => IntWrapper;

                                  method readString

                                  readString: (size: number) => string;

                                    method reserve

                                    reserve: (size: number) => void;

                                      method writeAvail

                                      writeAvail: () => number;

                                        method writeByte

                                        writeByte: (value: number) => void;

                                          method writeDouble

                                          writeDouble: (value: number) => void;

                                            method writeInt

                                            writeInt: (value: number, size: number) => void;

                                              class BunserBuf

                                              class BunserBuf extends EventEmitter {}

                                                constructor

                                                constructor();

                                                  property buf

                                                  buf: Accumulator;

                                                    property pduLen

                                                    pduLen?: any;

                                                      property state

                                                      state: 0 | 1;

                                                        method append

                                                        append: {
                                                        (buf: InputWrapper, synchronous?: false):
                                                        | AnyWrapper
                                                        | AnyWrapper[]
                                                        | undefined;
                                                        (buf: any, synchronous: true): void;
                                                        };

                                                          method decodeAny

                                                          decodeAny: () => AnyWrapper | AnyWrapper[];

                                                            method decodeArray

                                                            decodeArray: () => AnyWrapper[];

                                                              method decodeInt

                                                              decodeInt: (relaxSizeAsserts?: boolean) => false | IntWrapper;

                                                                method decodeObject

                                                                decodeObject: () => object;

                                                                  method decodeString

                                                                  decodeString: () => string;

                                                                    method decodeTemplate

                                                                    decodeTemplate: () => AnyWrapper[];

                                                                      method expectCode

                                                                      expectCode: (expected: number) => void;

                                                                        method process

                                                                        process: {
                                                                        (synchronous?: false): AnyWrapper | AnyWrapper[] | undefined;
                                                                        (synchronous: true): void;
                                                                        };

                                                                          method processLater

                                                                          processLater: () => void;

                                                                            method raise

                                                                            raise: (reason: string) => void;

                                                                              Type Aliases

                                                                              type AnyWrapper

                                                                              type AnyWrapper = boolean | IntWrapper | null | string | object;

                                                                                type InputWrapper

                                                                                type InputWrapper =
                                                                                | Buffer
                                                                                | string
                                                                                | NodeJS.TypedArray
                                                                                | DataView
                                                                                | ArrayBuffer
                                                                                | SharedArrayBuffer;

                                                                                  type IntWrapper

                                                                                  type IntWrapper = number | Int64;

                                                                                    Package Files (1)

                                                                                    Dependencies (2)

                                                                                    Dev Dependencies (0)

                                                                                    No dev dependencies.

                                                                                    Peer Dependencies (0)

                                                                                    No peer dependencies.

                                                                                    Badge

                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/bser.

                                                                                    • Markdown
                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/bser)
                                                                                    • HTML
                                                                                      <a href="https://www.jsdocs.io/package/@types/bser"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>