MCPcopy
hub / github.com/Effect-TS/effect / layer

Function layer

packages/sql-sqlite-do/src/SqliteClient.ts:214–222  ·  view source on GitHub ↗
(
  config: SqliteClientConfig
)

Source from the content-addressed store, hash-verified

212 * @since 1.0.0
213 */
214export const layer = (
215 config: SqliteClientConfig
216): Layer.Layer<SqliteClient | Client.SqlClient, ConfigError> =>
217 Layer.scopedContext(
218 Effect.map(make(config), (client) =>
219 Context.make(SqliteClient, client).pipe(
220 Context.add(Client.SqlClient, client)
221 ))
222 ).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