@elgato/streamdeck
Version:
The official Node.js SDK for creating Stream Deck plugins.
42 lines (41 loc) • 1.23 kB
TypeScript
import type { JsonObject } from "@elgato/utils";
import type { Controller, WillAppear, WillDisappear } from "../../api/index.js";
import type { Device } from "../devices/index.js";
/**
* Provides information about an instance of a Stream Deck action.
*/
export declare class ActionContext {
#private;
/**
* Initializes a new instance of the {@link ActionContext} class.
* @param source Source of the action.
*/
constructor(source: WillAppear<JsonObject> | WillDisappear<JsonObject>);
/**
* Type of the action.
* - `Keypad` is a key.
* - `Encoder` is a dial and portion of the touch strip.
* @returns Controller type.
*/
get controllerType(): Controller;
/**
* Stream Deck device the action is positioned on.
* @returns Stream Deck device.
*/
get device(): Device;
/**
* Action instance identifier.
* @returns Identifier.
*/
get id(): string;
/**
* Manifest identifier (UUID) for this action type.
* @returns Manifest identifier.
*/
get manifestId(): string;
/**
* Converts this instance to a serializable object.
* @returns The serializable object.
*/
toJSON(): object;
}