@types/google-protobuf
- Version 3.15.12
- Published
- 116 kB
- No dependencies
- MIT license
Install
npm i @types/google-protobuf
yarn add @types/google-protobuf
pnpm add @types/google-protobuf
Overview
TypeScript definitions for google-protobuf
Index
Classes
BinaryDecoder
- advance()
- alloc()
- atEnd()
- clear()
- clone()
- free()
- getBuffer()
- getCursor()
- getEnd()
- getError()
- pastEnd()
- readBool()
- readBytes()
- readDouble()
- readEnum()
- readFixedHash64()
- readFloat()
- readInt16()
- readInt32()
- readInt64()
- readInt64String()
- readInt8()
- readSignedVarint32()
- readSignedVarint32String()
- readSignedVarint64()
- readSignedVarint64String()
- readString()
- readStringWithLength()
- readUint16()
- readUint32()
- readUint64()
- readUint64String()
- readUint8()
- readUnsignedVarint32()
- readUnsignedVarint32String()
- readUnsignedVarint64()
- readUnsignedVarint64String()
- readVarintHash64()
- readZigzagVarint32()
- readZigzagVarint64()
- readZigzagVarint64String()
- reset()
- setBlock()
- setCursor()
- setEnd()
- skipVarint()
- unskipVarint()
BinaryEncoder
- end()
- length()
- writeBool()
- writeBytes()
- writeDouble()
- writeEnum()
- writeFixedHash64()
- writeFloat()
- writeInt16()
- writeInt32()
- writeInt64()
- writeInt64String()
- writeInt8()
- writeSignedVarint32()
- writeSignedVarint64()
- writeSplitFixed64()
- writeSplitVarint64()
- writeString()
- writeUint16()
- writeUint32()
- writeUint64()
- writeUint8()
- writeUnsignedVarint32()
- writeUnsignedVarint64()
- writeVarintHash64()
- writeZigzagVarint32()
- writeZigzagVarint64()
- writeZigzagVarint64String()
BinaryReader
- advance()
- alloc()
- free()
- getBuffer()
- getCursor()
- getError()
- getFieldCursor()
- getFieldDecoder()
- getFieldNumber()
- getWireType()
- isDelimited()
- isEndGroup()
- nextField()
- readAny()
- readBool()
- readBytes()
- readDouble()
- readEnum()
- readFixed32()
- readFixed64()
- readFixed64String()
- readFixedHash64()
- readFloat()
- readGroup()
- readInt32()
- readInt32String()
- readInt64()
- readInt64String()
- readMessage
- readPackedBool()
- readPackedDouble()
- readPackedEnum()
- readPackedFixed32()
- readPackedFixed64()
- readPackedFixed64String()
- readPackedFixedHash64()
- readPackedFloat()
- readPackedInt32()
- readPackedInt32String()
- readPackedInt64()
- readPackedInt64String()
- readPackedSfixed32()
- readPackedSfixed64()
- readPackedSfixed64String()
- readPackedSint32()
- readPackedSint64()
- readPackedSint64String()
- readPackedUint32()
- readPackedUint32String()
- readPackedUint64()
- readPackedUint64String()
- readPackedVarintHash64()
- readSfixed32()
- readSfixed32String()
- readSfixed64()
- readSfixed64String()
- readSint32()
- readSint64()
- readSint64String()
- readString()
- readUint32()
- readUint32String()
- readUint64()
- readUint64String()
- readVarintHash64()
- registerReadCallback()
- reset()
- runReadCallback()
- setBlock()
- skipDelimitedField()
- skipField()
- skipFixed32Field()
- skipFixed64Field()
- skipGroup()
- skipMatchingFields()
- skipVarintField()
- unskipHeader()
BinaryWriter
- beginSubMessage()
- endSubMessage()
- getResultBase64String()
- getResultBuffer()
- maybeWriteSerializedMessage()
- reset()
- writeAny()
- writeBool()
- writeBytes()
- writeDouble()
- writeEnum()
- writeFixed32()
- writeFixed64()
- writeFixed64String()
- writeFixedHash64()
- writeFloat()
- writeGroup()
- writeInt32()
- writeInt32String()
- writeInt64()
- writeInt64String()
- writeMessage
- writePackedBool()
- writePackedDouble()
- writePackedEnum()
- writePackedFixed32()
- writePackedFixed64()
- writePackedFixed64String()
- writePackedFixedHash64()
- writePackedFloat()
- writePackedInt32()
- writePackedInt32String()
- writePackedInt64()
- writePackedInt64String()
- writePackedSfixed32()
- writePackedSfixed64()
- writePackedSfixed64String()
- writePackedSint32()
- writePackedSint64()
- writePackedSint64String()
- writePackedUint32()
- writePackedUint32String()
- writePackedUint64()
- writePackedUint64String()
- writePackedVarintHash64()
- writeRepeatedBool()
- writeRepeatedBytes()
- writeRepeatedDouble()
- writeRepeatedEnum()
- writeRepeatedFixed32()
- writeRepeatedFixed64()
- writeRepeatedFixed64String()
- writeRepeatedFixedHash64()
- writeRepeatedFloat()
- writeRepeatedGroup()
- writeRepeatedInt32()
- writeRepeatedInt32String()
- writeRepeatedInt64()
- writeRepeatedInt64String()
- writeRepeatedMessage()
- writeRepeatedSfixed32()
- writeRepeatedSfixed64()
- writeRepeatedSfixed64String()
- writeRepeatedSint32()
- writeRepeatedSint64()
- writeRepeatedSint64String()
- writeRepeatedString()
- writeRepeatedUint32()
- writeRepeatedUint32String()
- writeRepeatedUint64()
- writeRepeatedUint64String()
- writeRepeatedVarintHash64()
- writeSerializedMessage()
- writeSfixed32()
- writeSfixed64()
- writeSfixed64String()
- writeSint32()
- writeSint64()
- writeSint64String()
- writeString()
- writeUint32()
- writeUint32String()
- writeUint64()
- writeUint64String()
- writeVarintHash64()
Message
- addToRepeatedField()
- addToRepeatedWrapperField()
- bytesAsB64()
- bytesAsU8()
- bytesListAsB64()
- bytesListAsU8()
- clone()
- cloneMessage()
- compareExtensions()
- compareFields()
- computeOneofCase()
- copyInto()
- deserializeBinary()
- deserializeBinaryFromReader()
- difference()
- equals()
- extensions
- extensionsBinary
- getExtension()
- getField()
- getFieldWithDefault()
- getJsPbMessageId()
- getMapField()
- getOptionalFloatingPointField()
- getRepeatedFloatingPointField()
- getRepeatedWrapperField()
- getWrapperField()
- initialize()
- readBinaryExtension()
- registerMessageType()
- serializeBinary()
- serializeBinaryExtensions()
- serializeBinaryToWriter()
- setExtension()
- setField()
- setOneofField()
- setOneofWrapperField()
- setRepeatedWrapperField()
- setWrapperField()
- toArray()
- toMap()
- toObject()
- toObjectExtension()
- toObjectList()
- toString()
Interfaces
Type Aliases
Namespaces
Classes
class BinaryDecoder
class BinaryDecoder {}
constructor
constructor(bytes?: ByteSource, start?: number, length?: number);
method advance
advance: (count: number) => void;
method alloc
static alloc: ( bytes?: ByteSource, start?: number, length?: number) => BinaryDecoder;
method atEnd
atEnd: () => boolean;
method clear
clear: () => void;
method clone
clone: () => BinaryDecoder;
method free
free: () => void;
method getBuffer
getBuffer: () => Uint8Array;
method getCursor
getCursor: () => number;
method getEnd
getEnd: () => number;
method getError
getError: () => boolean;
method pastEnd
pastEnd: () => boolean;
method readBool
readBool: () => boolean;
method readBytes
readBytes: (length: number) => Uint8Array;
method readDouble
readDouble: () => number;
method readEnum
readEnum: () => number;
method readFixedHash64
readFixedHash64: () => string;
method readFloat
readFloat: () => number;
method readInt16
readInt16: () => number;
method readInt32
readInt32: () => number;
method readInt64
readInt64: () => number;
method readInt64String
readInt64String: () => string;
method readInt8
readInt8: () => number;
method readSignedVarint32
readSignedVarint32: () => number;
method readSignedVarint32String
readSignedVarint32String: () => number;
method readSignedVarint64
readSignedVarint64: () => number;
method readSignedVarint64String
readSignedVarint64String: () => number;
method readString
readString: (length: number) => string;
method readStringWithLength
readStringWithLength: () => string;
method readUint16
readUint16: () => number;
method readUint32
readUint32: () => number;
method readUint64
readUint64: () => number;
method readUint64String
readUint64String: () => string;
method readUint8
readUint8: () => number;
method readUnsignedVarint32
readUnsignedVarint32: () => number;
method readUnsignedVarint32String
readUnsignedVarint32String: () => number;
method readUnsignedVarint64
readUnsignedVarint64: () => number;
method readUnsignedVarint64String
readUnsignedVarint64String: () => number;
method readVarintHash64
readVarintHash64: () => string;
method readZigzagVarint32
readZigzagVarint32: () => number;
method readZigzagVarint64
readZigzagVarint64: () => number;
method readZigzagVarint64String
readZigzagVarint64String: () => number;
method reset
reset: () => void;
method setBlock
setBlock: (data: ByteSource, start?: number, length?: number) => void;
method setCursor
setCursor: (cursor: number) => void;
method setEnd
setEnd: (end: number) => void;
method skipVarint
skipVarint: () => void;
method unskipVarint
unskipVarint: (value: number) => void;
class BinaryEncoder
class BinaryEncoder {}
constructor
constructor();
method end
end: () => number[];
method length
length: () => number;
method writeBool
writeBool: (value: boolean) => void;
method writeBytes
writeBytes: (bytes: Uint8Array) => void;
method writeDouble
writeDouble: (value: number) => void;
method writeEnum
writeEnum: (value: number) => void;
method writeFixedHash64
writeFixedHash64: (hash: string) => void;
method writeFloat
writeFloat: (value: number) => void;
method writeInt16
writeInt16: (value: number) => void;
method writeInt32
writeInt32: (value: number) => void;
method writeInt64
writeInt64: (value: number) => void;
method writeInt64String
writeInt64String: (value: string) => void;
method writeInt8
writeInt8: (value: number) => void;
method writeSignedVarint32
writeSignedVarint32: (value: number) => void;
method writeSignedVarint64
writeSignedVarint64: (value: number) => void;
method writeSplitFixed64
writeSplitFixed64: (lowBits: number, highBits: number) => void;
method writeSplitVarint64
writeSplitVarint64: (lowBits: number, highBits: number) => void;
method writeString
writeString: (value: string) => number;
method writeUint16
writeUint16: (value: number) => void;
method writeUint32
writeUint32: (value: number) => void;
method writeUint64
writeUint64: (value: number) => void;
method writeUint8
writeUint8: (value: number) => void;
method writeUnsignedVarint32
writeUnsignedVarint32: (value: number) => void;
method writeUnsignedVarint64
writeUnsignedVarint64: (value: number) => void;
method writeVarintHash64
writeVarintHash64: (hash: string) => void;
method writeZigzagVarint32
writeZigzagVarint32: (value: number) => void;
method writeZigzagVarint64
writeZigzagVarint64: (value: number) => void;
method writeZigzagVarint64String
writeZigzagVarint64String: (value: string) => void;
class BinaryIterator
class BinaryIterator {}
constructor
constructor( decoder?: BinaryDecoder, next?: () => number | boolean | string | null, elements?: (string | number | boolean)[]);
method alloc
static alloc: ( decoder?: BinaryDecoder, next?: () => number | boolean | string | null, elements?: Array<number | boolean | string>) => BinaryIterator;
method atEnd
atEnd: () => boolean;
method clear
clear: () => void;
method free
free: () => void;
method get
get: () => ScalarFieldType | null;
method next
next: () => ScalarFieldType | null;
class BinaryReader
class BinaryReader {}
constructor
constructor(bytes?: ByteSource, start?: number, length?: number);
property readMessage
readMessage: BinaryRead;
method advance
advance: (count: number) => void;
method alloc
static alloc: ( bytes?: ByteSource, start?: number, length?: number) => BinaryReader;
method free
free: () => void;
method getBuffer
getBuffer: () => Uint8Array;
method getCursor
getCursor: () => number;
method getError
getError: () => boolean;
method getFieldCursor
getFieldCursor: () => number;
method getFieldDecoder
getFieldDecoder: () => BinaryDecoder;
method getFieldNumber
getFieldNumber: () => number;
method getWireType
getWireType: () => BinaryConstants.WireType;
method isDelimited
isDelimited: () => boolean;
method isEndGroup
isEndGroup: () => boolean;
method nextField
nextField: () => boolean;
method readAny
readAny: (fieldType: BinaryConstants.FieldType) => AnyFieldType;
method readBool
readBool: () => boolean;
method readBytes
readBytes: () => Uint8Array;
method readDouble
readDouble: () => number;
method readEnum
readEnum: () => number;
method readFixed32
readFixed32: () => number;
method readFixed64
readFixed64: () => number;
method readFixed64String
readFixed64String: () => string;
method readFixedHash64
readFixedHash64: () => string;
method readFloat
readFloat: () => number;
method readGroup
readGroup: (field: number, message: Message, reader: BinaryReadReader) => void;
method readInt32
readInt32: () => number;
method readInt32String
readInt32String: () => string;
method readInt64
readInt64: () => number;
method readInt64String
readInt64String: () => string;
method readPackedBool
readPackedBool: () => boolean[];
method readPackedDouble
readPackedDouble: () => number[];
method readPackedEnum
readPackedEnum: () => number[];
method readPackedFixed32
readPackedFixed32: () => number[];
method readPackedFixed64
readPackedFixed64: () => number[];
method readPackedFixed64String
readPackedFixed64String: () => string[];
method readPackedFixedHash64
readPackedFixedHash64: () => string[];
method readPackedFloat
readPackedFloat: () => number[];
method readPackedInt32
readPackedInt32: () => number[];
method readPackedInt32String
readPackedInt32String: () => string[];
method readPackedInt64
readPackedInt64: () => number[];
method readPackedInt64String
readPackedInt64String: () => string[];
method readPackedSfixed32
readPackedSfixed32: () => number[];
method readPackedSfixed64
readPackedSfixed64: () => number[];
method readPackedSfixed64String
readPackedSfixed64String: () => string[];
method readPackedSint32
readPackedSint32: () => number[];
method readPackedSint64
readPackedSint64: () => number[];
method readPackedSint64String
readPackedSint64String: () => string[];
method readPackedUint32
readPackedUint32: () => number[];
method readPackedUint32String
readPackedUint32String: () => string[];
method readPackedUint64
readPackedUint64: () => number[];
method readPackedUint64String
readPackedUint64String: () => string[];
method readPackedVarintHash64
readPackedVarintHash64: () => string[];
method readSfixed32
readSfixed32: () => number;
method readSfixed32String
readSfixed32String: () => string;
method readSfixed64
readSfixed64: () => number;
method readSfixed64String
readSfixed64String: () => string;
method readSint32
readSint32: () => number;
method readSint64
readSint64: () => number;
method readSint64String
readSint64String: () => string;
method readString
readString: () => string;
method readUint32
readUint32: () => number;
method readUint32String
readUint32String: () => string;
method readUint64
readUint64: () => number;
method readUint64String
readUint64String: () => string;
method readVarintHash64
readVarintHash64: () => string;
method registerReadCallback
registerReadCallback: ( callbackName: string, callback: (binaryReader: BinaryReader) => any) => void;
method reset
reset: () => void;
method runReadCallback
runReadCallback: (callbackName: string) => any;
method setBlock
setBlock: (bytes?: ByteSource, start?: number, length?: number) => void;
method skipDelimitedField
skipDelimitedField: () => void;
method skipField
skipField: () => void;
method skipFixed32Field
skipFixed32Field: () => void;
method skipFixed64Field
skipFixed64Field: () => void;
method skipGroup
skipGroup: () => void;
method skipMatchingFields
skipMatchingFields: () => void;
method skipVarintField
skipVarintField: () => void;
method unskipHeader
unskipHeader: () => void;
class BinaryWriter
class BinaryWriter {}
constructor
constructor();
property writeMessage
writeMessage: BinaryWrite;
method beginSubMessage
beginSubMessage: (field: number) => void;
method endSubMessage
endSubMessage: (field: number) => void;
method getResultBase64String
getResultBase64String: () => string;
method getResultBuffer
getResultBuffer: () => Uint8Array;
method maybeWriteSerializedMessage
maybeWriteSerializedMessage: ( bytes?: Uint8Array, start?: number, end?: number) => void;
method reset
reset: () => void;
method writeAny
writeAny: ( fieldType: BinaryConstants.FieldType, field: number, value: AnyFieldType) => void;
method writeBool
writeBool: (field: number, value?: boolean) => void;
method writeBytes
writeBytes: (field: number, value?: ByteSource) => void;
method writeDouble
writeDouble: (field: number, value?: number) => void;
method writeEnum
writeEnum: (field: number, value?: number) => void;
method writeFixed32
writeFixed32: (field: number, value?: number) => void;
method writeFixed64
writeFixed64: (field: number, value?: number) => void;
method writeFixed64String
writeFixed64String: (field: number, value?: string) => void;
method writeFixedHash64
writeFixedHash64: (field: number, value?: string) => void;
method writeFloat
writeFloat: (field: number, value?: number) => void;
method writeGroup
writeGroup: ( field: number, value: any, writeCallback: BinaryWriteCallback) => void;
method writeInt32
writeInt32: (field: number, value?: number) => void;
method writeInt32String
writeInt32String: (field: number, value?: string) => void;
method writeInt64
writeInt64: (field: number, value?: number) => void;
method writeInt64String
writeInt64String: (field: number, value?: string) => void;
method writePackedBool
writePackedBool: (field: number, value?: readonly boolean[]) => void;
method writePackedDouble
writePackedDouble: (field: number, value?: readonly number[]) => void;
method writePackedEnum
writePackedEnum: (field: number, value?: readonly number[]) => void;
method writePackedFixed32
writePackedFixed32: (field: number, value?: readonly number[]) => void;
method writePackedFixed64
writePackedFixed64: (field: number, value?: readonly number[]) => void;
method writePackedFixed64String
writePackedFixed64String: (field: number, value?: readonly string[]) => void;
method writePackedFixedHash64
writePackedFixedHash64: (field: number, value?: readonly string[]) => void;
method writePackedFloat
writePackedFloat: (field: number, value?: readonly number[]) => void;
method writePackedInt32
writePackedInt32: (field: number, value?: readonly number[]) => void;
method writePackedInt32String
writePackedInt32String: (field: number, value?: readonly string[]) => void;
method writePackedInt64
writePackedInt64: (field: number, value?: readonly number[]) => void;
method writePackedInt64String
writePackedInt64String: (field: number, value?: readonly string[]) => void;
method writePackedSfixed32
writePackedSfixed32: (field: number, value?: readonly number[]) => void;
method writePackedSfixed64
writePackedSfixed64: (field: number, value?: readonly number[]) => void;
method writePackedSfixed64String
writePackedSfixed64String: (field: number, value?: readonly string[]) => void;
method writePackedSint32
writePackedSint32: (field: number, value?: readonly number[]) => void;
method writePackedSint64
writePackedSint64: (field: number, value?: readonly number[]) => void;
method writePackedSint64String
writePackedSint64String: (field: number, value?: readonly string[]) => void;
method writePackedUint32
writePackedUint32: (field: number, value?: readonly number[]) => void;
method writePackedUint32String
writePackedUint32String: (field: number, value?: readonly string[]) => void;
method writePackedUint64
writePackedUint64: (field: number, value?: readonly number[]) => void;
method writePackedUint64String
writePackedUint64String: (field: number, value?: readonly string[]) => void;
method writePackedVarintHash64
writePackedVarintHash64: (field: number, value?: readonly string[]) => void;
method writeRepeatedBool
writeRepeatedBool: (field: number, value?: readonly boolean[]) => void;
method writeRepeatedBytes
writeRepeatedBytes: (field: number, value?: readonly ByteSource[]) => void;
method writeRepeatedDouble
writeRepeatedDouble: (field: number, value?: readonly number[]) => void;
method writeRepeatedEnum
writeRepeatedEnum: (field: number, value?: readonly number[]) => void;
method writeRepeatedFixed32
writeRepeatedFixed32: (field: number, value?: readonly number[]) => void;
method writeRepeatedFixed64
writeRepeatedFixed64: (field: number, value?: readonly number[]) => void;
method writeRepeatedFixed64String
writeRepeatedFixed64String: (field: number, value?: readonly string[]) => void;
method writeRepeatedFixedHash64
writeRepeatedFixedHash64: (field: number, value?: readonly string[]) => void;
method writeRepeatedFloat
writeRepeatedFloat: (field: number, value?: readonly number[]) => void;
method writeRepeatedGroup
writeRepeatedGroup: ( field: number, value: readonly Message[], writerCallback: BinaryWriteCallback) => void;
method writeRepeatedInt32
writeRepeatedInt32: (field: number, value?: readonly number[]) => void;
method writeRepeatedInt32String
writeRepeatedInt32String: (field: number, value?: readonly string[]) => void;
method writeRepeatedInt64
writeRepeatedInt64: (field: number, value?: readonly number[]) => void;
method writeRepeatedInt64String
writeRepeatedInt64String: (field: number, value?: readonly string[]) => void;
method writeRepeatedMessage
writeRepeatedMessage: ( field: number, value: readonly Message[], writerCallback: BinaryWriteCallback) => void;
method writeRepeatedSfixed32
writeRepeatedSfixed32: (field: number, value?: readonly number[]) => void;
method writeRepeatedSfixed64
writeRepeatedSfixed64: (field: number, value?: readonly number[]) => void;
method writeRepeatedSfixed64String
writeRepeatedSfixed64String: (field: number, value?: readonly string[]) => void;
method writeRepeatedSint32
writeRepeatedSint32: (field: number, value?: readonly number[]) => void;
method writeRepeatedSint64
writeRepeatedSint64: (field: number, value?: readonly number[]) => void;
method writeRepeatedSint64String
writeRepeatedSint64String: (field: number, value?: readonly string[]) => void;
method writeRepeatedString
writeRepeatedString: (field: number, value?: readonly string[]) => void;
method writeRepeatedUint32
writeRepeatedUint32: (field: number, value?: readonly number[]) => void;
method writeRepeatedUint32String
writeRepeatedUint32String: (field: number, value?: readonly string[]) => void;
method writeRepeatedUint64
writeRepeatedUint64: (field: number, value?: readonly number[]) => void;
method writeRepeatedUint64String
writeRepeatedUint64String: (field: number, value?: readonly string[]) => void;
method writeRepeatedVarintHash64
writeRepeatedVarintHash64: (field: number, value?: readonly string[]) => void;
method writeSerializedMessage
writeSerializedMessage: (bytes: Uint8Array, start: number, end: number) => void;
method writeSfixed32
writeSfixed32: (field: number, value?: number) => void;
method writeSfixed64
writeSfixed64: (field: number, value?: number) => void;
method writeSfixed64String
writeSfixed64String: (field: number, value?: string) => void;
method writeSint32
writeSint32: (field: number, value?: number) => void;
method writeSint64
writeSint64: (field: number, value?: number) => void;
method writeSint64String
writeSint64String: (field: number, value?: string) => void;
method writeString
writeString: (field: number, value?: string) => void;
method writeUint32
writeUint32: (field: number, value?: number) => void;
method writeUint32String
writeUint32String: (field: number, value?: string) => void;
method writeUint64
writeUint64: (field: number, value?: number) => void;
method writeUint64String
writeUint64String: (field: number, value?: string) => void;
method writeVarintHash64
writeVarintHash64: (field: number, value?: string) => void;
class ExtensionFieldBinaryInfo
class ExtensionFieldBinaryInfo<T> {}
constructor
constructor( fieldInfo: ExtensionFieldInfo<T>, binaryReaderFn: BinaryRead, binaryWriterFn: BinaryWrite, opt_binaryMessageSerializeFn: (msg: Message, writer: BinaryWriter) => void, opt_binaryMessageDeserializeFn: ( msg: Message, reader: BinaryReader ) => Message, opt_isPacked: boolean);
property binaryReaderFn
binaryReaderFn: BinaryRead;
property binaryWriterFn
binaryWriterFn: BinaryWrite;
property fieldInfo
fieldInfo: ExtensionFieldInfo<T>;
property opt_binaryMessageDeserializeFn
opt_binaryMessageDeserializeFn: (msg: Message, reader: BinaryReader) => Message;
property opt_binaryMessageSerializeFn
opt_binaryMessageSerializeFn: (msg: Message, writer: BinaryWriter) => void;
property opt_isPacked
opt_isPacked: boolean;
class ExtensionFieldInfo
class ExtensionFieldInfo<T> {}
constructor
constructor( fieldIndex: number, fieldName: { [key: string]: number }, ctor: typeof Message, toObjectFn: Message.StaticToObject, isRepeated: number);
property ctor
ctor: typeof Message;
property fieldIndex
fieldIndex: number;
property fieldName
fieldName: number;
property isRepeated
isRepeated: number;
property toObjectFn
toObjectFn: Message.StaticToObject;
method isMessageType
isMessageType: () => boolean;
class Map
class Map<K, V> {}
constructor
constructor(arr: [K, V][], valueCtor?: new (init: any) => V);
method clear
clear: () => void;
method del
del: (key: K) => boolean;
method deserializeBinary
static deserializeBinary: <K, V>( map: Map<K, V>, reader: BinaryReader, keyReaderFn: (reader: BinaryReader) => K, valueReaderFn: ( reader: BinaryReader, value: any, readerCallback: BinaryReadCallback ) => V, readCallback?: BinaryReadCallback, defaultKey?: K, defaultValue?: V) => void;
method entries
entries: () => Map.Iterator<[K, V]>;
method forEach
forEach: (callback: (entry: V, key: K) => void, thisArg?: {}) => void;
method fromObject
static fromObject: <TK, TV>( entries: Array<[TK, TV]>, valueCtor: any, valueFromObject: any) => Map<TK, TV>;
method get
get: (key: K) => V | undefined;
method getEntryList
getEntryList: () => Array<[K, V]>;
method getLength
getLength: () => number;
method has
has: (key: K) => boolean;
method keys
keys: () => Map.Iterator<K>;
method serializeBinary
serializeBinary: ( fieldNumber: number, writer: BinaryWriter, keyWriterFn: (field: number, key: K) => void, valueWriterFn: ( field: number, value: V, writerCallback: BinaryWriteCallback ) => void, writeCallback?: BinaryWriteCallback) => void;
method set
set: (key: K, value: V) => this;
method toArray
toArray: () => Array<[K, V]>;
method toObject
toObject: { (includeInstance?: boolean): Array<[K, V]>; <VO>( includeInstance: boolean, valueToObject: (includeInstance: boolean, valueWrapper: V) => VO ): [K, VO][];};
method values
values: () => Map.Iterator<V>;
class Message
abstract class Message {}
property extensions
static extensions: { [key: number]: ExtensionFieldInfo<Message> };
property extensionsBinary
static extensionsBinary: { [key: number]: ExtensionFieldBinaryInfo<Message> };
method addToRepeatedField
static addToRepeatedField: ( msg: Message, fieldNumber: number, value: any, index?: number) => void;
method addToRepeatedWrapperField
static addToRepeatedWrapperField: <T extends Message>( msg: Message, fieldNumber: number, value: T | undefined, ctor: { new (): T }, index?: number) => T;
method bytesAsB64
static bytesAsB64: (bytes: Uint8Array) => string;
method bytesAsU8
static bytesAsU8: (str: string) => Uint8Array;
method bytesListAsB64
static bytesListAsB64: (bytesList: Uint8Array[]) => string[];
method bytesListAsU8
static bytesListAsU8: (strList: string[]) => Uint8Array[];
method clone
static clone: <T extends Message>(msg: T) => T;
method cloneMessage
static cloneMessage: <T extends Message>(msg: T) => T;
method compareExtensions
static compareExtensions: (extension1: {}, extension2: {}) => boolean;
method compareFields
static compareFields: (field1: any, field2: any) => boolean;
method computeOneofCase
static computeOneofCase: (msg: Message, oneof: number[]) => number;
method copyInto
static copyInto: (fromMessage: Message, toMessage: Message) => void;
method deserializeBinary
static deserializeBinary: (bytes: Uint8Array) => Message;
method deserializeBinaryFromReader
static deserializeBinaryFromReader: ( message: Message, reader: BinaryReader) => Message;
method difference
static difference: <T extends Message>(m1: T, m2: T) => T;
method equals
static equals: (m1: Message, m2: Message) => boolean;
method getExtension
getExtension: <T>(fieldInfo: ExtensionFieldInfo<T>) => T;
method getField
static getField: (msg: Message, fieldNumber: number) => FieldValue | null;
method getFieldWithDefault
static getFieldWithDefault: <T>( msg: Message, fieldNumber: number, defaultValue: T) => T;
method getJsPbMessageId
getJsPbMessageId: () => string | undefined;
method getMapField
static getMapField: ( msg: Message, fieldNumber: number, noLazyCreate: boolean, valueCtor?: typeof Message) => Map<any, any>;
method getOptionalFloatingPointField
static getOptionalFloatingPointField: ( msg: Message, fieldNumber: number) => number | undefined;
method getRepeatedFloatingPointField
static getRepeatedFloatingPointField: ( msg: Message, fieldNumber: number) => number[];
method getRepeatedWrapperField
static getRepeatedWrapperField: <T extends Message>( msg: Message, ctor: { new (): T }, fieldNumber: number) => T[];
method getWrapperField
static getWrapperField: <T extends Message>( msg: Message, ctor: { new (): T }, fieldNumber: number, required?: number) => T;
method initialize
static initialize: ( msg: Message, data: Message.MessageArray, messageId: string | number, suggestedPivot: number, repeatedFields?: number[] | null, oneofFields?: number[][] | null) => void;
method readBinaryExtension
readBinaryExtension: ( proto: Message, reader: BinaryReader, extensions: { [key: number]: ExtensionFieldBinaryInfo<Message> }, setExtensionFn: <T>(fieldInfo: ExtensionFieldInfo<T>, val: T) => void) => void;
method registerMessageType
static registerMessageType: (id: number, constructor: typeof Message) => void;
method serializeBinary
abstract serializeBinary: () => Uint8Array;
method serializeBinaryExtensions
serializeBinaryExtensions: ( proto: Message, writer: BinaryWriter, extensions: { [key: number]: ExtensionFieldBinaryInfo<Message> }, getExtensionFn: <T>(fieldInfo: ExtensionFieldInfo<T>) => T) => void;
method serializeBinaryToWriter
static serializeBinaryToWriter: (message: Message, writer: BinaryWriter) => void;
method setExtension
setExtension: <T>(fieldInfo: ExtensionFieldInfo<T>, value: T) => void;
method setField
static setField: ( msg: Message, fieldNumber: number, value: ReadonlyFieldValue) => void;
method setOneofField
static setOneofField: ( msg: Message, fieldNumber: number, oneof: number[], value: ReadonlyFieldValue) => void;
method setOneofWrapperField
static setOneofWrapperField: ( msg: Message, fieldNumber: number, oneof: number[], value: any) => void;
method setRepeatedWrapperField
static setRepeatedWrapperField: <T extends Message>( msg: Message, fieldNumber: number, value?: readonly T[]) => void;
method setWrapperField
static setWrapperField: <T extends Message>( msg: Message, fieldNumber: number, value?: T | Map<any, any>) => void;
method toArray
toArray: () => Message.MessageArray;
method toMap
static toMap: ( field: any[], mapKeyGetterFn: (field: any) => string, toObjectFn?: Message.StaticToObject, includeInstance?: boolean) => void;
method toObject
static toObject: (includeInstance: boolean, msg: Message) => {};
method toObjectExtension
static toObjectExtension: ( msg: Message, obj: {}, extensions: { [key: number]: ExtensionFieldInfo<Message> }, getExtensionFn: (fieldInfo: ExtensionFieldInfo<Message>) => Message, includeInstance?: boolean) => void;
method toObjectList
static toObjectList: <T extends Message>( field: T[], toObjectFn: (includeInstance: boolean, data: T) => {}, includeInstance?: boolean) => Array<{}>;
method toString
toString: () => string;
Interfaces
interface FieldValueArray
interface FieldValueArray extends Array<FieldValue> {}
interface ReadonlyFieldValueArray
interface ReadonlyFieldValueArray extends ReadonlyArray<FieldValue> {}
Type Aliases
type AnyFieldType
type AnyFieldType = ScalarFieldType | RepeatedFieldType | Uint8Array;
type BinaryRead
type BinaryRead = (msg: any, reader: BinaryReadReader) => any;
type BinaryReadCallback
type BinaryReadCallback = (value: any, binaryReader: BinaryReader) => void;
type BinaryReadReader
type BinaryReadReader = (msg: any, binaryReader: BinaryReader) => void;
type BinaryWrite
type BinaryWrite = ( fieldNumber: number, value: any, writerCallback: BinaryWriteCallback) => void;
type BinaryWriteCallback
type BinaryWriteCallback = (value: any, binaryWriter: BinaryWriter) => void;
type ByteSource
type ByteSource = ArrayBuffer | Uint8Array | number[] | string;
type FieldValue
type FieldValue = | string | number | boolean | Uint8Array | FieldValueArray | undefined;
type ReadonlyFieldValue
type ReadonlyFieldValue = | string | number | boolean | Uint8Array | ReadonlyFieldValueArray | undefined;
type RepeatedFieldType
type RepeatedFieldType = ScalarFieldType[] | Uint8Array[];
type ScalarFieldType
type ScalarFieldType = boolean | number | string;
Namespaces
namespace arith
namespace arith {}
class Int64
class Int64 {}
constructor
constructor(lo: number, hi: number);
property hi
hi: number;
property lo
lo: number;
method add
add: (other: Int64) => Int64;
method clone
clone: () => Int64;
method fromString
static fromString: (str: string) => Int64;
method sub
sub: (other: Int64) => Int64;
method toString
toString: () => string;
class UInt64
class UInt64 {}
constructor
constructor(lo: number, hi: number);
property hi
hi: number;
property lo
lo: number;
method add
add: (other: UInt64) => UInt64;
method clone
clone: () => UInt64;
method cmp
cmp: (other: UInt64) => number;
method div
div: (divisor: number) => [UInt64, UInt64];
method fromString
static fromString: (str: string) => UInt64;
method leftShift
leftShift: () => UInt64;
method lsb
lsb: () => boolean;
method msb
msb: () => boolean;
method mul
mul: (a: number) => UInt64;
method mul32x32
static mul32x32: (a: number, b: number) => UInt64;
method rightShift
rightShift: () => UInt64;
method sub
sub: (other: UInt64) => UInt64;
method toString
toString: () => string;
method zero
zero: () => boolean;
namespace BinaryConstants
namespace BinaryConstants {}
variable FLOAT32_EPS
const FLOAT32_EPS: number;
variable FLOAT32_MAX
const FLOAT32_MAX: number;
variable FLOAT32_MIN
const FLOAT32_MIN: number;
variable FLOAT64_EPS
const FLOAT64_EPS: number;
variable FLOAT64_MAX
const FLOAT64_MAX: number;
variable FLOAT64_MIN
const FLOAT64_MIN: number;
variable INVALID_FIELD_NUMBER
const INVALID_FIELD_NUMBER: number;
variable TWO_TO_20
const TWO_TO_20: number;
variable TWO_TO_23
const TWO_TO_23: number;
variable TWO_TO_31
const TWO_TO_31: number;
variable TWO_TO_32
const TWO_TO_32: number;
variable TWO_TO_52
const TWO_TO_52: number;
variable TWO_TO_63
const TWO_TO_63: number;
variable TWO_TO_64
const TWO_TO_64: number;
variable ZERO_HASH
const ZERO_HASH: string;
function FieldTypeToWireType
FieldTypeToWireType: (fieldType: FieldType) => WireType;
enum FieldType
enum FieldType { INVALID = -1, DOUBLE = 1, FLOAT = 2, INT64 = 3, UINT64 = 4, INT32 = 5, FIXED64 = 6, FIXED32 = 7, BOOL = 8, STRING = 9, GROUP = 10, MESSAGE = 11, BYTES = 12, UINT32 = 13, ENUM = 14, SFIXED32 = 15, SFIXED64 = 16, SINT32 = 17, SINT64 = 18, FHASH64 = 30, VHASH64 = 31,}
member BOOL
BOOL = 8
member BYTES
BYTES = 12
member DOUBLE
DOUBLE = 1
member ENUM
ENUM = 14
member FHASH64
FHASH64 = 30
member FIXED32
FIXED32 = 7
member FIXED64
FIXED64 = 6
member FLOAT
FLOAT = 2
member GROUP
GROUP = 10
member INT32
INT32 = 5
member INT64
INT64 = 3
member INVALID
INVALID = -1
member MESSAGE
MESSAGE = 11
member SFIXED32
SFIXED32 = 15
member SFIXED64
SFIXED64 = 16
member SINT32
SINT32 = 17
member SINT64
SINT64 = 18
member STRING
STRING = 9
member UINT32
UINT32 = 13
member UINT64
UINT64 = 4
member VHASH64
VHASH64 = 31
enum WireType
enum WireType { INVALID = -1, VARINT = 0, FIXED64 = 1, DELIMITED = 2, START_GROUP = 3, END_GROUP = 4, FIXED32 = 5,}
namespace Map
namespace Map {}
interface Iterator
interface Iterator<T> {}
method [Symbol.iterator]
[Symbol.iterator]: () => Iterator<T>;
method next
next: () => IteratorResult<T>;
interface IteratorResult
interface IteratorResult<T> {}
namespace Message
namespace Message {}
type MessageArray
type MessageArray = any[];
type StaticToObject
type StaticToObject = (includeInstance: boolean, msg: Message) => {};
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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/google-protobuf
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/google-protobuf)
- HTML<a href="https://www.jsdocs.io/package/@types/google-protobuf"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 7982 ms. - Missing or incorrect documentation? Open an issue for this package.