Experiment: {
    createdAt: string;
    dbId: string;
    endedAt: string | null;
    goal: ExperimentGoal;
    group: string | null;
    key: string;
    kind: ExperimentKind;
    priority: number;
    rolloutPct: number;
    stage: ExperimentStage;
    startedAt: string | null;
    surfaces: string[];
    targetRule: unknown;
    trafficFrom: number;
    trafficTo: number;
    unitType: ExperimentUnit;
    updatedAt: string;
    variants: ExperimentVariant[];
    winner: string | null;
}

Type declaration

  • createdAt: string
  • dbId: string
  • endedAt: string | null
  • goal: ExperimentGoal
  • group: string | null

    Experiments in one group never share a unit: each takes the slice trafficFrom-trafficTo (0-99) of it.

  • key: string
  • kind: ExperimentKind
  • priority: number

    1-100 (default 50): when several want one surface, the highest shows; ties keep the oldest.

  • rolloutPct: number
  • stage: ExperimentStage

    draft (nobody) -> dev (staff) -> beta (+ beta testers) -> rollout (rolloutPct % of units) -> live (everyone) -> ended.

  • startedAt: string | null
  • surfaces: string[]

    home | banner | discord | page:<feature>

  • targetRule: unknown
  • trafficFrom: number
  • trafficTo: number
  • unitType: ExperimentUnit
  • updatedAt: string
  • variants: ExperimentVariant[]
  • winner: string | null