/** * Plugin contract for extending string utilities. */ export type StringExtnPlugin = { /** The unique plugin name used for registration and lookup. */ name: string; /** The function invoked when the plugin runs. */ fn: (input: string, ...args: any[]) => string; }; /** * Register a plugin for later execution. * @param plugin The plugin to register. * @throws If a plugin with the same name is already registered. */ export declare function registerPlugin(plugin: StringExtnPlugin): void; /** * Execute a registered plugin by name. * @param name The plugin name to execute. * @param input The input string passed to the plugin. * @param args Additional arguments forwarded to the plugin function. * @returns The plugin's result string. * @throws If the plugin does not exist. */ export declare function runPlugin(name: string, input: string, ...args: any[]): string; /** * List all registered plugin names in registration order. * @returns An array of plugin names. */ export declare function listPlugins(): string[]; //# sourceMappingURL=plugin.d.ts.map