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

Function layer

packages/sql/sqlite-wasm/src/SqliteClient.ts:556–564  ·  view source on GitHub ↗
(
  config: SqliteClientConfig
)

Source from the content-addressed store, hash-verified

554 * @since 4.0.0
555 */
556export const layer = (
557 config: SqliteClientConfig
558): Layer.Layer<SqliteClient | Client.SqlClient, SqlError> =>
559 Layer.effectContext(
560 Effect.map(make(config), (client) =>
561 Context.make(SqliteClient, client).pipe(
562 Context.add(Client.SqlClient, client)
563 ))
564 ).pipe(Layer.provide(Reactivity.layer))
565
566/**
567 * Builds a layer from an Effect `Config` value, providing both the worker-backed SQLite WASM `SqliteClient` service and the generic `SqlClient` service.

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