import type { ActionIdentifier, DeviceIdentifier, PluginEvent } from "../../api/index.js"; import { Event } from "./event.js"; /** * Provides information for an event relating to an action. */ export declare class ActionWithoutPayloadEvent, TAction> extends Event { readonly action: TAction; /** * Initializes a new instance of the {@link ActionWithoutPayloadEvent} class. * @param action Action that raised the event. * @param source Source of the event, i.e. the original message from Stream Deck. */ constructor(action: TAction, source: TSource); } /** * Provides information for an event relating to an action. */ export declare class ActionEvent & PayloadEvent, TAction> extends ActionWithoutPayloadEvent { /** * Provides additional information about the event that occurred, e.g. how many `ticks` the dial was rotated, the current `state` of the action, etc. */ readonly payload: ExtractPayload; /** * Initializes a new instance of the {@link ActionEvent} class. * @param action Action that raised the event. * @param source Source of the event, i.e. the original message from Stream Deck. */ constructor(action: TAction, source: TSource); } /** * Utility type for extracting the payload type from the specified `T` type. */ type ExtractPayload = T extends { /** * Payload supplied with the event. */ payload: infer TPayload; } ? TPayload extends object ? TPayload : never : never; /** * Utility type for determining the payload of an event. */ type PayloadEvent = { /** * Payload providing additional information for an event. */ payload: ExtractPayload; }; export {};