Skip to main content
Module

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

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

Reflected oneof.

Constructors

new
OneOf(
name: string,
fieldNames?: (string[] | { [k: string]: any; }),
options?: { [k: string]: any; },
comment?: string,
)

Constructs a new oneof instance.

Properties

comment: (string | null)

Comment for this field.

readonly
fieldsArray: Field[]

Fields that belong to this oneof as an array for iteration.

oneof: string[]

Field names that belong to this oneof.

Methods

add(field: Field): OneOf

Adds a field to this oneof and removes it from its current parent, if any.

remove(field: Field): OneOf

Removes a field from this oneof and puts it back to the oneof's parent.

toJSON(toJSONOptions?: IToJSONOptions): IOneOf

Converts this oneof to a oneof descriptor.

Static Methods

d<T extends string>(...fieldNames: string[]): OneOfDecorator

OneOf decorator (TypeScript).

fromJSON(name: string, json: IOneOf): OneOf

Constructs a oneof from a oneof descriptor.