import * as t from 'io-ts' ; import { nonEmptyStringRt } from '@kbn/io-ts-utils/non_empty_string_rt' ; import { ENVIRONMENT_ALL , ENVIRONMENT_NOT_DEFINED , } from './environment_filter_values' ; export const environmentStringRt = t . union ( [ t . literal ( ENVIRONMENT_NOT_DEFINED . value ) , t . literal ( ENVIRONMENT_ALL . value ) , nonEmptyStringRt , ] ) ; export const environmentRt = t . type ( { environment : environmentStringRt , } ) ; export type Environment = t . TypeOf < typeof environmentRt > [ 'environment' ] ;