Implementing IExtensionContextMenu

To make a Context Menu extension, you must implement the IExtensionContextMenu interface in the main class of your extension:

import { Extension } from "@teamsql-extensions/ts-extension-sdk/dist/source/Extension";
import { IExtensionContextMenu } from "@teamsql-extensions/ts-extension-sdk/dist/source/interfaces/groups/IExtensionContextMenu"

export class TeamSQLExtension extends Extension implements IExtensionContextMenu {

    getMenu(): Array<MenuItem> {
        let menu = new Array<MenuItem>();
        return menu;
    }
}

-getMenu(): Array<MenuItem>

If you implement the IExtensionContextMenu interface, you must return the Array<MenuItem> object.

results matching ""

    No results matching ""