experimentConfig.tsx 658 B

123456789101112131415161718192021222324
  1. import {Experiments, ExperimentType} from 'sentry/types/experiments';
  2. /**
  3. * This is the value an experiment will have when the unit of assignment
  4. * (organization, user, etc) is not part of any experiment group.
  5. *
  6. * This likely indicates they should see nothing, or the original version of
  7. * what's being tested.
  8. */
  9. export const unassignedValue = -1;
  10. /**
  11. * Frontend experiment configuration object
  12. */
  13. export const experimentList: {
  14. assignments: number[];
  15. key: string;
  16. parameter: string;
  17. type: ExperimentType;
  18. }[] = [];
  19. export const experimentConfig = experimentList.reduce(
  20. (acc, exp) => ({...acc, [exp.key]: exp}),
  21. {}
  22. ) as Experiments;