import { BundleContext, ServiceReference, ServiceEvent } from '../api/index.js'; import 'apprt-core/Types'; interface ServiceTrackerCustomizer { adding?(item: ServiceReference): boolean; added?(item: { ref: ServiceReference; }): void; removed?(item: { ref: ServiceReference; service: ServiceType | undefined; }): void; modified?(item: { ref: ServiceReference; event: ServiceEvent | undefined; service: ServiceType | undefined; }): void; } interface ServiceTrackerOptions { context: BundleContext; customizer?: ServiceTrackerCustomizer; oc?: string; filter?: string; ref?: ServiceReference; sort?: boolean; } interface ServiceTracker { isClosed(): boolean; open(): void; close(): void; remove(ref: ServiceReference): void; size(): number; getTrackingCount(): number; getServiceReferences(): readonly ServiceReference[]; getServiceReference(): ServiceReference | undefined; getService(): ServiceType | undefined; getService(ref: ServiceReference): ServiceType; getServices(): readonly ServiceType[]; } declare function createServiceTracker(opts: ServiceTrackerOptions): ServiceTracker; export { createServiceTracker, createServiceTracker as default }; export type { ServiceTracker, ServiceTrackerCustomizer, ServiceTrackerOptions };