import { DiagLogger } from "@opentelemetry/api";

//#region src/utils/performanceObserver/performanceObserver.d.ts
declare function isEntryTypeSupported(type: string): boolean;
/**
 * Creates a PerformanceObserver for the specified entry type if supported, and starts observing.
 * Returns the observer instance, or null if the entry type is not supported or if an error occurs.
 *
 * Each entry is passed individually to `processEntry`. Errors thrown by `processEntry` are caught
 * and logged via `diag` (if provided) so that one bad entry does not block the rest.
 *
 * Note: The observer is created with the "buffered" option set to true, so it will receive entries
 * that were recorded before the observer was created.
 * buffered: true is not supported when observing multiple entry types, so if you need to observe
 * multiple types, you should create separate observers for each type with buffered: true.
 * See https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe#entrytypes
 */
declare function createPerformanceObserver<T extends PerformanceEntry>(type: string, processEntry: (entry: T) => void, options?: PerformanceObserverInit & {
  diag?: DiagLogger;
}): PerformanceObserver | null;
//#endregion
export { createPerformanceObserver, isEntryTypeSupported };
//# sourceMappingURL=performanceObserver.d.cts.map