Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

convertChannelReferenceToChannelName

Converts a value reference such as `|channel|` into its channel name.

Import

import { convertChannelReferenceToChannelName } from "@dartwic/interface-sdk/ui";

Declaration

export function convertChannelReferenceToChannelName(value: string) {
    const convert = getHostApi().helpers.convertChannelReferenceToChannelName;
    if (typeof convert !== "function") {
        throw new Error("The interface host does not provide convertChannelReferenceToChannelName.");
    }
    return String(convert(value));
}