import type { Awaitable } from '../../common/types/util'; import type { BaseClient } from '../base'; import { type PluginEventContributionScope, type PluginRuntimeRecord, type PluginRuntimeRegistry } from './registry'; import type { PluginSharedRegistry, RegisteredPluginShared, SharedKey } from './types'; type SharedFactory = (client: BaseClient) => unknown; type SharedDispose = (value: unknown) => Awaitable; export declare function createSharedKey(name: Name): SharedKey; export declare function createSharedKey(): (name: Name) => SharedKey; export declare function createSharedKey(name: Name): SharedKey; export declare function sharedName(name: string | SharedKey): string; export declare function addPluginShared(registry: PluginRuntimeRegistry, record: PluginRuntimeRecord, name: string, factory: SharedFactory, scope: PluginEventContributionScope, opts?: { dispose?: SharedDispose; override?: boolean; }): void; export declare function removePluginShared(registry: PluginRuntimeRegistry, record: PluginRuntimeRecord, names: readonly string[], scope: PluginEventContributionScope): void; export declare function createSharedRegistry(client: BaseClient, registry: PluginRuntimeRegistry): PluginSharedRegistry; export declare function disposePluginSharedValues(shared: PluginSharedRegistry, registry: PluginRuntimeRegistry, record: PluginRuntimeRecord): Promise; export declare function cleanupPluginSharedContributions(registry: PluginRuntimeRegistry, record: PluginRuntimeRecord, shouldRemove: (contribution: { scope: PluginEventContributionScope; }) => boolean): void; export declare function cleanupPluginDynamicSharedContributions(registry: PluginRuntimeRegistry, record: PluginRuntimeRecord): Promise; export declare function clearSharedRegistryInstances(shared: PluginSharedRegistry): void; export {};