export type MessageTypeDecoder = { decode: (input: Uint8Array) => T; __proto_name__: string; }; export type MessageTypeEncoder = { encode: (message: T) => any; __proto_name__: string; }; type ProtoCallback = (message: Message) => Promise | void; type NetProtoCallback = (message: Message, source: number) => Promise | void; /** * PMA uses ts-proto to define our types, you can see that here: https://github.com/stephenh/ts-proto * You will have to modify the generator to add `name` or just use {@param eventName} * * This makes it very nice to handle events since we only have to give it the Protobuf Object */ export declare function OnProto(messageType: MessageTypeDecoder, eventName?: string): (originalMethod: ProtoCallback, context: ClassMethodDecoratorContext) => void; /** * This makes it very nice to handle events since we only have to give it the Protobuf Object */ export declare function OnProtoNet(messageType: MessageTypeDecoder, eventName?: string): (originalMethod: NetProtoCallback, context: ClassMethodDecoratorContext) => void; export {};