Skip to main content
Latest
interface IConversionOptions
import { type IConversionOptions } from "https://deno.land/x/steam_trader@v0.4.0/types/protobuf.d.ts";

Conversion options as used by Type#toObject and Message.toObject.

Properties

optional
longs: Function

Long conversion type. Valid values are String and Number (the global types). Defaults to copy the present value, which is a possibly unsafe number without and a Long with a long library.

optional
enums: Function

Enum value conversion type. Only valid value is String (the global type). Defaults to copy the present value, which is the numeric id.

optional
bytes: Function

Bytes value conversion type. Valid values are Array and (a base64 encoded) String (the global types). Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.

optional
defaults: boolean

Also sets default values on the resulting object

optional
arrays: boolean

Sets empty arrays for missing repeated fields even if defaults=false

optional
objects: boolean

Sets empty objects for missing map fields even if defaults=false

optional
oneofs: boolean

Includes virtual oneof properties set to the present field's name, if any

optional
json: boolean

Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings