posthog-js
Version:
Posthog-js allows you to automatically capture usage and send events to PostHog.
40 lines (39 loc) • 1.25 kB
TypeScript
import RageClick from './extensions/rageclick';
import { Properties, RemoteConfigResult } from './types';
import { PostHog } from './posthog-core';
import type { Extension } from './extensions/types';
type HeatmapEventBuffer = {
[key: string]: Properties[];
} | undefined;
export declare class Heatmaps implements Extension {
instance: PostHog;
rageclicks: RageClick;
_enabledServerSide: boolean;
private get _config();
_initialized: boolean;
_mouseMoveTimeout: ReturnType<typeof setTimeout> | undefined;
private _buffer;
private _flushInterval;
private _deadClicksCapture;
private _onClickHandler;
private _onMouseMoveHandler;
private _flushHandler;
private _onVisibilityChange_handler;
constructor(instance: PostHog);
initialize(): void;
get flushIntervalMilliseconds(): number;
get isEnabled(): boolean;
startIfEnabled(): void;
onRemoteConfig(result: RemoteConfigResult): void;
getAndClearBuffer(): HeatmapEventBuffer;
private _onDeadClick;
private _onVisibilityChange;
private _setupListeners;
private _removeListeners;
private _getProperties;
private _onClick;
private _onMouseMove;
private _capture;
private _flush;
}
export {};