MCPcopy Create free account
hub / github.com/Effect-TS/effect / layerConfig

Function layerConfig

packages/sql/pg/src/PgClient.ts:563–573  ·  view source on GitHub ↗
(
  config: Config.Wrap<PgPoolConfig<R>>
)

Source from the content-addressed store, hash-verified

561 * @since 4.0.0
562 */
563export const layerConfig = <R = never>(
564 config: Config.Wrap<PgPoolConfig<R>>
565): Layer.Layer<
566 PgClient | Client.SqlClient,
567 Config.ConfigError | SqlError,
568 Exclude<R, Scope.Scope | Reactivity.Reactivity>
569> =>
570 layerFrom(Effect.flatMap(
571 Config.unwrap(config),
572 make
573 ))
574
575/**
576 * Creates a client layer from pool configuration.

Callers

nothing calls this directly

Calls 1

layerFromFunction · 0.70

Tested by

no test coverage detected