posthog-js
Version:
Posthog-js allows you to automatically capture usage and send events to PostHog.
11 lines (10 loc) • 626 B
TypeScript
export * from '@posthog/rrweb-types';
import type { customEvent as RrwebCustomEvent, eventWithoutTime as RrwebEventWithoutTime, eventWithTime as RrwebEventWithTime } from '@posthog/rrweb-types';
import type { customEventData } from '../extensions/replay/types/rrweb-types';
type WithJsonLdUrl<T> = T extends RrwebCustomEvent ? T & {
data: Pick<customEventData, 'href'>;
} : T;
export type customEvent<T = unknown> = WithJsonLdUrl<RrwebCustomEvent<T>>;
export type eventWithoutTime = WithJsonLdUrl<RrwebEventWithoutTime>;
export type event = eventWithoutTime;
export type eventWithTime = WithJsonLdUrl<RrwebEventWithTime>;