Commit compiled dist for git installs
This commit is contained in:
31
dist/PluginContext.d.ts
vendored
Normal file
31
dist/PluginContext.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PluginContext, NotificationOptions } from './PluginInterfaces.js';
|
||||
import type { IPluginEventClient } from './interfaces.js';
|
||||
import type { PluginRegistry } from './PluginRegistry.js';
|
||||
/**
|
||||
* Options for constructing a PluginContext via `createPluginContext`.
|
||||
*/
|
||||
export interface PluginContextOptions {
|
||||
/** The plugin's unique identifier. */
|
||||
pluginId: string;
|
||||
/**
|
||||
* Optional event client for the `context.events` API.
|
||||
* Any object implementing `on(event, handler)` / `off(event, handler)` works —
|
||||
* e.g. a MatrixClient, Node.js EventEmitter, or socket.io socket.
|
||||
*/
|
||||
eventClient?: IPluginEventClient;
|
||||
/**
|
||||
* Called when a plugin invokes `context.notify(...)`.
|
||||
* The host is responsible for displaying the notification however it wants.
|
||||
*/
|
||||
onNotify?: (options: NotificationOptions) => void | Promise<void>;
|
||||
}
|
||||
/**
|
||||
* Creates a PluginContext wired to the given registry.
|
||||
* Call this before registering and loading a plugin.
|
||||
*
|
||||
* @param options - Host-specific dependencies for the plugin.
|
||||
* @param registry - The shared PluginRegistry instance.
|
||||
* @returns A fully-wired PluginContext ready to be passed to `plugin.onLoad`.
|
||||
*/
|
||||
export declare function createPluginContext(options: PluginContextOptions, registry: PluginRegistry): PluginContext;
|
||||
//# sourceMappingURL=PluginContext.d.ts.map
|
||||
Reference in New Issue
Block a user