@scalar/api-client
Version:
the open source API testing client
19 lines • 947 B
TypeScript
/** Gets the correct analytics client based on the layout. */
export declare function useAnalytics(): {
capture: <E extends "client-send-request" | "page-view">(event: E, ...[data]: import("zod").input<{
readonly 'page-view': import("zod").ZodObject<{
to: import("zod").ZodString;
from: import("zod").ZodString;
hostname: import("zod").ZodString;
}, import("zod/v4/core").$strip>;
readonly 'client-send-request': import("zod").ZodUndefined;
}[E]> extends undefined ? [] : [import("zod").input<{
readonly 'page-view': import("zod").ZodObject<{
to: import("zod").ZodString;
from: import("zod").ZodString;
hostname: import("zod").ZodString;
}, import("zod/v4/core").$strip>;
readonly 'client-send-request': import("zod").ZodUndefined;
}[E]>]) => Promise<void>;
} | undefined;
//# sourceMappingURL=useAnalytics.d.ts.map