@openshift-console/dynamic-plugin-sdk
Version:
Provides core APIs, types and utilities used by dynamic plugins at runtime.
11 lines (10 loc) • 688 B
TypeScript
import { Extension, ExtensionDeclaration, CodeRef } from '../types';
/** This component can be used to register a listener function receiving telemetry events.
These events include user identification, page navigation, and other application specific events.
The listener may use this data for reporting and analytics purposes. */
export type TelemetryListener = ExtensionDeclaration<'console.telemetry/listener', {
/** Listen for telemetry events */
listener: CodeRef<TelemetryEventListener>;
}>;
export type TelemetryEventListener = <P = any>(eventType: string, properties?: P) => void;
export declare const isTelemetryListener: (e: Extension) => e is TelemetryListener;