MCPcopy Create free account
hub / github.com/effect-app/libs / layer

Function layer

repos/effect/packages/sql/libsql/src/LibsqlClient.ts:376–384  ·  view source on GitHub ↗
(
  config: LibsqlClientConfig
)

Source from the content-addressed store, hash-verified

374 * Creates a layer from a concrete libSQL client configuration, providing both `LibsqlClient` and `SqlClient`.
375 *
376 * @category layers
377 * @since 4.0.0
378 */
379export const layer = (
380 config: LibsqlClientConfig
381): Layer.Layer<LibsqlClient | Client.SqlClient> =>
382 Layer.effectContext(
383 Effect.map(make(config), (client) =>
384 Context.make(LibsqlClient, client).pipe(
385 Context.add(Client.SqlClient, client)
386 ))
387 ).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.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…