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

Function layer

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

Source from the content-addressed store, hash-verified

392 * @since 4.0.0
393 */
394export const layer = (
395 config: D1ClientConfig
396): Layer.Layer<D1Client | Client.SqlClient, Config.ConfigError> =>
397 Layer.effectContext(
398 Effect.map(make(config), (client) =>
399 Context.make(D1Client, client).pipe(
400 Context.add(Client.SqlClient, client)
401 ))
402 ).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