Interface ExtensionContext

interface ExtensionContext {
    mode: "production" | "development" | "test";
    registerMessageConverter<Src>(args): void;
    registerPanel(params): void;
    registerTopicAliases(aliasFunction): void;
}

Properties

mode: "production" | "development" | "test"

The current mode of the application.

Methods

  • Register a function to convert messages from one schema to another.

    A converter function is invoked when a panel subscribes to a topic with the convertTo option. The return value of the converter function is the converted message and is provided to the panel.

    If the converter function invocation returns undefined, the output of the converter for that message is ignored and no message is provided to the panel. This is useful in instances where you might want to selectively output a converted schema depending on the input message.

    Type Parameters

    • Src

    Returns void

  • Registers a new alias function with the extension context. The function will be called every time there is a new set of topics and variables and returns an array of topic aliases.

    Parameters

    Returns void