You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@types/marvelapp__react-ab-test

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/marvelapp__react-ab-test

TypeScript definitions for @marvelapp/react-ab-test

3.1.4
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npm
Version published
Weekly downloads
997
3.96%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/marvelapp__react-ab-test

Summary

This package contains type definitions for @marvelapp/react-ab-test (https://github.com/marvelapp/react-ab-test#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/marvelapp__react-ab-test.

index.d.ts

import { JSX } from "react";

export type ListenerCallback = (experimentName: string, variantName: string) => void;
export interface Subscription {
    remove(): void;
    listener: ListenerCallback;
    eventType: string;
}

export namespace emitter {
    function emitWin(experimentName: string): void;
    function addActiveVariantListener(eventName: string | ListenerCallback, callback?: ListenerCallback): Subscription;
    function addPlayListener(eventName: string | ListenerCallback, callback?: ListenerCallback): Subscription;
    function addWinListener(eventName: string | ListenerCallback, callback?: ListenerCallback): Subscription;
    function defineVariants(experimentName: string, variantNames: string[], variantWeights?: number[]): void;
    function setActiveVariant(experimentName: string, variantName: string): void;
    function getActiveVariant(experimentName: string): string;
    function calculateActiveVariant(
        experimentName: string,
        userIdentifier?: string,
        defaultVariantName?: string,
    ): string;
    function getSortedVariants(experimentName: string): string[];
    function setCustomDistributionAlgorithm(
        customAlgorithm: (experimentName: string, userIdentifier: string, defaultVariantName?: string) => void,
    ): void;
}

export interface ExperimentProps {
    name: string;
    defaultVariantName?: string;
    userIdentifier?: string;
    children: React.ReactNode;
}

export function Experiment({
    name,
    defaultVariantName,
    userIdentifier,
    children,
}: ExperimentProps): JSX.Element;

export function Variant({
    name,
    children,
}: { name: string; children: React.ReactNode }): JSX.Element;

export namespace experimentDebugger {
    function setDebuggerAvailable(isAvailable: boolean): void;
    function enable(): void;
    function disable(): void;
}

export namespace mixpanelHelper {
    function enable(): void;
    function disable(): void;
}

export namespace segmentHelper {
    function enable(): void;
    function disable(): void;
}

Additional Details

  • Last updated: Mon, 04 Dec 2023 17:35:44 GMT
  • Dependencies: @types/react

Credits

These definitions were written by mtayllan.

FAQs

Package last updated on 04 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts