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

Function layer

packages/sql/d1/src/D1Client.ts:426–434  ·  view source on GitHub ↗
(
  config: D1ClientConfig
)

Source from the content-addressed store, hash-verified

424 * @since 4.0.0
425 */
426export const layer = (
427 config: D1ClientConfig
428): Layer.Layer<D1Client | Client.SqlClient, Config.ConfigError> =>
429 Layer.effectContext(
430 Effect.map(make(config), (client) =>
431 Context.make(D1Client, client).pipe(
432 Context.add(Client.SqlClient, client)
433 ))
434 ).pipe(Layer.provide(Reactivity.layer))

Callers

nothing calls this directly

Calls 6

makeFunction · 0.70
pipeMethod · 0.65
makeMethod · 0.65
addMethod · 0.65
mapMethod · 0.45
provideMethod · 0.45

Tested by

no test coverage detected