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

Function layer

packages/sql/sqlite-node/src/SqliteClient.ts:365–373  ·  view source on GitHub ↗
(
  config: SqliteClientConfig
)

Source from the content-addressed store, hash-verified

363 * @since 4.0.0
364 */
365export const layer = (
366 config: SqliteClientConfig
367): Layer.Layer<SqliteClient | Client.SqlClient> =>
368 Layer.effectContext(
369 Effect.map(make(config), (client) =>
370 Context.make(SqliteClient, client).pipe(
371 Context.add(Client.SqlClient, client)
372 ))
373 ).pipe(Layer.provide(Reactivity.layer))
374
375// internal
376

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