UNPKG

@scaleway/use-growthbook

Version:

Utility package to expose AB test tool

15 lines (14 loc) 682 B
import { Context, GrowthBook } from "@growthbook/growthbook-react"; //#region src/types.d.ts type Attributes = Record<string, string | number | undefined>; /** * @param {boolean} [autoRefresh] - false. * @param {number} [timeout] - 500. * @param {boolean} [skipCache] - false. */ type LoadConfig = NonNullable<Parameters<GrowthBook['init']>[0]>; type ToolConfig = Pick<Context, 'apiHost' | 'clientKey' | 'enableDevMode' | 'debug' | 'stickyBucketService'>; type TrackingCallback = NonNullable<Context['trackingCallback']>; type ErrorCallback = ((error: Error | string) => void) | null; //#endregion export { Attributes, ErrorCallback, LoadConfig, ToolConfig, TrackingCallback };