MCPcopy Index your code
hub / github.com/Effect-TS/effect / layer

Function layer

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

Source from the content-addressed store, hash-verified

206 * @since 1.0.0
207 */
208export const layer = (
209 config: D1ClientConfig
210): Layer.Layer<D1Client | Client.SqlClient, ConfigError> =>
211 Layer.scopedContext(
212 Effect.map(make(config), (client) =>
213 Context.make(D1Client, client).pipe(
214 Context.add(Client.SqlClient, client)
215 ))
216 ).pipe(Layer.provide(Reactivity.layer))

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected