Skip to main content
Module

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

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

Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.

Constructors

new
Root(options?: { [k: string]: any; })

Constructs a new root namespace instance.

Properties

deferred: Field[]

Deferred extension fields.

files: string[]

Resolved file names of loaded files.

Methods

fetch(path: string, callback: FetchCallback): void

Fetch content from file path or url This method exists so you can override it with your own logic.

load(
filename: (string | string[]),
options: IParseOptions,
callback: LoadCallback,
): void

Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.

load(filename: (string | string[]), callback: LoadCallback): void

Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.

load(filename: (string | string[]), options?: IParseOptions): Promise<Root>

Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.

loadSync(filename: (string | string[]), options?: IParseOptions): Root

Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).

resolvePath(origin: string, target: string): (string | null)

Resolves the path of an imported file, relative to the importing origin. This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.

Static Methods

fromJSON(json: INamespace, root?: Root): Root

Loads a namespace descriptor into a root namespace.