UNPKG

@amplitude/experiment-js-client

Version:
31 lines (30 loc) 1.25 kB
import { ExperimentConfig } from './config'; import { ExperimentClient } from './experimentClient'; /** * Initializes a singleton {@link ExperimentClient} identified by the configured * instance name. * * @param apiKey The deployment API Key * @param config See {@link ExperimentConfig} for config options */ export declare const initialize: (apiKey: string, config?: ExperimentConfig) => ExperimentClient; /** * Initialize a singleton {@link ExperimentClient} which automatically * integrates with the installed and initialized instance of the amplitude * analytics SDK. * * You must be using amplitude-js SDK version 8.17.0+ for this integration to * work. * * @param apiKey The deployment API Key * @param config See {@link ExperimentConfig} for config options */ export declare const initializeWithAmplitudeAnalytics: (apiKey: string, config?: ExperimentConfig) => ExperimentClient; /** * Provides factory methods for storing singleton instances of {@link ExperimentClient} * @category Core Usage */ export declare const Experiment: { initialize: (apiKey: string, config?: ExperimentConfig) => ExperimentClient; initializeWithAmplitudeAnalytics: (apiKey: string, config?: ExperimentConfig) => ExperimentClient; };