UNPKG

posthog-js

Version:

Posthog-js allows you to automatically capture usage and send events to PostHog.

20 lines • 874 B
//#region lib/src/utils/globals.d.ts /** Subset of the web-vitals library's `ReportOpts` passed to metric observers. */ interface WebVitalsReportOpts { reportAllChanges?: boolean; reportSoftNavs?: boolean; } type WebVitalsMetricCallbacks = { onLCP: (onReport: (metric: any) => void, opts?: WebVitalsReportOpts) => void; onCLS: (onReport: (metric: any) => void, opts?: WebVitalsReportOpts) => void; onFCP: (onReport: (metric: any) => void, opts?: WebVitalsReportOpts) => void; onINP: (onReport: (metric: any) => void, opts?: WebVitalsReportOpts) => void; }; type WebVitalsCallbacks = WebVitalsMetricCallbacks & { withoutAttribution?: WebVitalsMetricCallbacks; }; //#endregion //#region lib/src/entrypoints/web-vitals-with-attribution.d.ts declare const postHogWebVitalsCallbacks: WebVitalsCallbacks; //#endregion export { postHogWebVitalsCallbacks as default };