Last active
January 21, 2016 10:53
-
-
Save subash-a/62397f16b3a05fdf625a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface BinaryWriterStatic { | |
new(): BinaryWriter; | |
} | |
interface BinaryWriter { | |
writeString(): void; | |
writeUint64(): void; | |
} | |
interface BinaryReaderStatic { | |
new(bytes: Uint8Array): BinaryReader; | |
} | |
interface BinaryReader { | |
readString(): string; | |
readUint64(): number; | |
isEndGroup(): boolean; | |
nextField(): void; | |
getFieldNumber(): number; | |
skipField(): void; | |
} | |
// methods contained in a general message object | |
interface MessageTypeStatic { | |
deserializeBinary(bytes: Uint8Array): MessageType; | |
deserializeBinaryFromReader(msg: MessageType, reader: BinaryReader): MessageType; | |
serializeBinary(): Uint8Array; | |
serializeBinaryToWriter(writer: BinaryWriter): Uint8Array; | |
new(opt?: Array<Object>): MessageType; | |
} | |
interface MessageType { | |
cloneMessage(): this; | |
toObject(includeInstance: boolean, msg: this): Object; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment