UNPKG

posthog-js

Version:

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

13 lines (12 loc) • 545 B
import type { PostHog } from '../posthog-core'; import type { RemoteConfigResult } from '../types'; export type ExtensionConstructor<T extends Extension> = new (instance: PostHog, ...args: any[]) => T; export interface Extension { initialize?(): boolean | void; /** * Receives the full remote config fetch result. Handlers must narrow on * `result.ok` before reading config fields, and encode their failure * behavior explicitly in the `!result.ok` branch. */ onRemoteConfig?(result: RemoteConfigResult): void; }