wrappers.d.ts 612 B

123456789101112131415161718192021
  1. /// <reference types="node" />
  2. export interface NumberValue {
  3. value: number | object;
  4. }
  5. export interface StringValue {
  6. value: string;
  7. }
  8. export interface BoolValue {
  9. value: boolean;
  10. }
  11. export interface BytesValue {
  12. value: Buffer | Uint8Array;
  13. }
  14. export declare function wrapperToProto3JSON(obj: protobuf.Message & (NumberValue | StringValue | BoolValue | BytesValue)): string | number | boolean | null;
  15. export declare function wrapperFromProto3JSON(typeName: string, json: number | string | boolean | null): {
  16. value: null;
  17. } | {
  18. value: Buffer;
  19. } | {
  20. value: string | number | boolean;
  21. };