mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-24 17:51:51 +02:00
[web] Add workbench labs experiment GitOrigin-RevId: 9369c48ae9b818bdcce767811e284e8bfb0f9efe
11 lines
429 B
TypeScript
11 lines
429 B
TypeScript
import getMeta from './meta'
|
|
|
|
// Should be `never` when no experiments are active. Otherwise it should be a
|
|
// union of active experiment names e.g. `'experiment1' | 'experiment2'`
|
|
export type ActiveExperiment = 'monthly-texlive' | 'ai-workbench'
|
|
|
|
export const isInExperiment = (experiment: ActiveExperiment): boolean => {
|
|
const experiments = getMeta('ol-labsExperiments')
|
|
return Boolean(experiments?.includes(experiment))
|
|
}
|