JsonDecoder.d.ts 695 B

1234567891011121314151617181920
  1. import { Reader } from '@jsonjoy.com/util/lib/buffers/Reader';
  2. import type { BinaryJsonDecoder, PackValue } from '../types';
  3. export declare const readKey: (reader: Reader) => string;
  4. export declare class JsonDecoder implements BinaryJsonDecoder {
  5. reader: Reader;
  6. read(uint8: Uint8Array): unknown;
  7. decode(uint8: Uint8Array): unknown;
  8. readAny(): unknown;
  9. skipWhitespace(): void;
  10. readNull(): null;
  11. readTrue(): true;
  12. readFalse(): false;
  13. readBool(): unknown;
  14. readNum(): number;
  15. readStr(): string;
  16. tryReadBin(): Uint8Array | undefined;
  17. readBin(): Uint8Array;
  18. readArr(): unknown[];
  19. readObj(): PackValue | Record<string, unknown> | unknown;
  20. }