UNPKG

@nuxt/scripts

Version:

Load third-party scripts with better performance, privacy and DX in Nuxt Apps.

19 lines (18 loc) 814 B
import type { RegistryScriptInput } from '#nuxt-scripts/types'; type RdtFns = ((event: 'init', id: string) => void) & ((event: 'track', eventName: string) => void); export interface RedditPixelApi { rdt: RdtFns & { sendEvent: (rdt: RedditPixelApi['rdt'], args: unknown[]) => void; callQueue: unknown[]; }; } declare global { interface Window extends RedditPixelApi { } } export declare const RedditPixelOptions: import("valibot").ObjectSchema<{ readonly id: import("valibot").StringSchema<undefined>; }, undefined>; export type RedditPixelInput = RegistryScriptInput<typeof RedditPixelOptions, true, false, false>; export declare function useScriptRedditPixel<T extends RedditPixelApi>(_options?: RedditPixelInput): import("#nuxt-scripts/types").UseScriptContext<T>; export {};