Hyperlinkv0.8.0-beta.28

Config

Config.Arrayconsteffect/Config.ts:792
<V extends Schema.Constraint>(
  value: V,
  options?: { readonly separator?: string | undefined }
): Schema.Union<
  readonly [
    Schema.compose<
      Schema.$Array<V>,
      Schema.decodeTo<
        Schema.$Array<Schema.String>,
        Schema.String,
        never,
        never
      >
    >,
    Schema.$Array<V>
  ]
>
schemas
Source effect/Config.ts:79218 lines
const ArrayConfig = <V extends Schema.Constraint>(value: V, options?: {
  readonly separator?: string | undefined
}) => {
  const array = Schema.Array(value)
  const separator = options?.separator ?? ","
  const arrayString = Schema.String.pipe(
    Schema.decodeTo(
      Schema.Array(Schema.String),
      {
        decode: SchemaGetter.split(options),
        encode: SchemaGetter.transform((input: ReadonlyArray<string>) => input.join(separator))
      }
    ),
    Schema.decodeTo(array)
  )

  return Schema.Union([arrayString, array])
}