import type { IDisposable } from '../IDisposable'; import type { IClientSideComponentManifest } from '@microsoft/sp-module-interfaces'; /** * Used with the {@link SPEvent} system, this interface is implemented by components that * can subscribe to events. * * @remarks * ISPEventObserver is an abstraction of the key features that a component must have in order * to subscribe to a SharePoint Framework event: It must have instanceId and componentId * information for diagnostics reporting, and it must have a way to notify the event system * when the component is disposed, so that its handlers can be automatically removed. * Other objects may implement this contract, as long as they meet these requirements. * * @public */ export interface ISPEventObserver extends IDisposable { /** * The instance identifier for the component. * * @remarks * This will be used for diagnostic reporting, e.g. if the callback function has * an uncaught exception */ readonly instanceId: string; /** * The component identifier, from the component's manifest. * * @remarks * This will be used for diagnostic reporting, e.g. if the callback function has * an uncaught exception */ readonly componentId: string; /** * Optional, only client-side components have a manifest. * Provides access to the manifest for the client-side component. * * @remarks * Child classes can override this with more specialized manifest types. * * @internal */ readonly manifest?: IClientSideComponentManifest; } //# sourceMappingURL=ISPEventObserver.d.ts.map