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

Function layer

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

Source from the content-addressed store, hash-verified

403 * @since 4.0.0
404 */
405export const layer = (
406 config: SqliteClientConfig
407): Layer.Layer<SqliteClient | Client.SqlClient, SqlError> =>
408 Layer.effectContext(
409 Effect.map(make(config), (client) =>
410 Context.make(SqliteClient, client).pipe(
411 Context.add(Client.SqlClient, client)
412 ))
413 ).pipe(Layer.provide(Reactivity.layer))
414
415// internal
416

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