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

Function layer

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

Source from the content-addressed store, hash-verified

535 * @since 4.0.0
536 */
537export const layer = (
538 config: SqliteClientConfig
539): Layer.Layer<SqliteClient | Client.SqlClient, SqlError> =>
540 Layer.effectContext(
541 Effect.map(make(config), (client) =>
542 Context.make(SqliteClient, client).pipe(
543 Context.add(Client.SqlClient, client)
544 ))
545 ).pipe(Layer.provide(Reactivity.layer))
546
547/**
548 * 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