UNPKG

google-publisher-tag

Version:

Type-safe React wrapper for Google Publisher Tag (GPT).

15 lines 660 B
import React from "react"; import type { GPTGlobalConfig, SlotConfig, SlotHandle, Targeting } from "./gpt.types"; type Ctx<Names extends string> = { configured: boolean; config: GPTGlobalConfig<Names>; defineSlot: (cfg: SlotConfig<Names>) => Promise<SlotHandle>; setTargeting: (t: Targeting) => Promise<void>; }; export declare function GPTProvider<Names extends string = string>({ children, config, }: { children: React.ReactNode; config?: GPTGlobalConfig<Names>; }): import("react/jsx-runtime").JSX.Element; export declare function useGPT<Names extends string = string>(): Ctx<Names>; export {}; //# sourceMappingURL=provider.d.ts.map