Skip to main content
Module

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

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

Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.

Constructors

new
FieldBase(
name: string,
id: number,
type: string,
rule?: (string | { [k: string]: any; }),
extend?: (string | { [k: string]: any; }),
options?: { [k: string]: any; },
comment?: string,
)

Not an actual constructor. Use Field instead.

Properties

bytes: boolean

Whether this field's value is a buffer.

comment: (string | null)

Comment for this field.

declaringField: (Field | null)

Sister-field within the declaring namespace if an extended field.

defaultValue: any

The field's default value on prototypes.

optional
extend: string

Extended type if different from parent.

extensionField: (Field | null)

Sister-field within the extended type if a declaring extension field.

id: number

Unique field id.

long: boolean

Whether this field's value should be treated as a long.

map: boolean

Whether this field is a map or not.

message: (Type | null)

Message this field belongs to.

optional: boolean

Whether this field is optional.

partOf: (OneOf | null)

OneOf this field belongs to, if any,

repeated: boolean

Whether this field is repeated.

required: boolean

Whether this field is required.

resolvedType: (Type | Enum | null)

Resolved type if not a basic type.

optional
rule: string

Field rule, if any.

type: string

Field type.

typeDefault: any

The field type's default value.

Methods

resolve(): Field

Resolves this field's type references.

toJSON(toJSONOptions?: IToJSONOptions): IField

Converts this field to a field descriptor.