Skip to main content
Module

x/steam_trader/types/protobuf.d.ts>Message

https://deno.land/x/steam_trader
Latest
class Message
import { Message } from "https://deno.land/x/steam_trader@v0.4.0/types/protobuf.d.ts";

Abstract runtime message.

Constructors

new
Message(properties?: Properties<T>)

Constructs a new message instance.

Type Parameters

optional
T extends object = object

Properties

readonly
$type: Type

Reference to the reflected type.

Methods

toJSON(): { [k: string]: any; }

Converts this message to JSON.

Static Properties

readonly
$type: Type

Reference to the reflected type.

Static Methods

create<T extends Message<T>>(this: Constructor<T>, properties?: { [k: string]: any; }): Message<T>

Creates a new message of this type using the specified properties.

decode<T extends Message<T>>(this: Constructor<T>, reader: (Reader | Uint8Array)): T

Decodes a message of this type.

decodeDelimited<T extends Message<T>>(this: Constructor<T>, reader: (Reader | Uint8Array)): T

Decodes a message of this type preceeded by its length as a varint.

encode<T extends Message<T>>(
this: Constructor<T>,
message: (T | { [k: string]: any; }),
writer?: Writer,
): Writer

Encodes a message of this type.

encodeDelimited<T extends Message<T>>(
this: Constructor<T>,
message: (T | { [k: string]: any; }),
writer?: Writer,
): Writer

Encodes a message of this type preceeded by its length as a varint.

fromObject<T extends Message<T>>(this: Constructor<T>, object: { [k: string]: any; }): T

Creates a new message of this type from a plain object. Also converts values to their respective internal types.

toObject<T extends Message<T>>(
this: Constructor<T>,
message: T,
): { [k: string]: any; }

Creates a plain object from a message of this type. Also converts values to other types if specified.

verify(message: { [k: string]: any; }): (string | null)

Verifies a message of this type.