@scalar/api-client
Version:
the open source API testing client
35 lines • 1.33 kB
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;
}, "strip", import("zod").ZodTypeAny, {
to: string;
from: string;
hostname: string;
}, {
to: string;
from: string;
hostname: string;
}>;
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;
}, "strip", import("zod").ZodTypeAny, {
to: string;
from: string;
hostname: string;
}, {
to: string;
from: string;
hostname: string;
}>;
readonly 'client-send-request': import("zod").ZodUndefined;
}[E]>]) => Promise<void>;
} | undefined;
//# sourceMappingURL=useAnalytics.d.ts.map