UNPKG

@elbwalker/destination-web-plausible

Version:

Plausible web destination for walkerOS

37 lines (32 loc) 1.16 kB
import { WalkerOS, Mapping } from '@elbwalker/types'; import { DestinationWeb } from '@elbwalker/walker.js'; declare global { interface Window { plausible?: Plausible & { q?: IArguments[]; }; } } type Plausible = (event: string, options?: { props?: WalkerOS.AnyObject; }) => void; interface Destination extends DestinationWeb.Destination<Custom, CustomEvent> { } type Config = DestinationWeb.Config<Custom, CustomEvent>; interface Custom { domain?: string; } type EventConfig = Mapping.EventConfig<CustomEvent>; interface CustomEvent { } type index_Config = Config; type index_Custom = Custom; type index_CustomEvent = CustomEvent; type index_Destination = Destination; type index_EventConfig = EventConfig; type index_Plausible = Plausible; declare namespace index { export type { index_Config as Config, index_Custom as Custom, index_CustomEvent as CustomEvent, index_Destination as Destination, index_EventConfig as EventConfig, index_Plausible as Plausible }; } declare const destinationPlausible: Destination; export { index as DestinationPlausible, destinationPlausible as default, destinationPlausible };