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

Function layer

packages/sql/libsql/src/LibsqlClient.ts:379–387  ·  view source on GitHub ↗
(
  config: LibsqlClientConfig
)

Source from the content-addressed store, hash-verified

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
makeMethod · 0.65
addMethod · 0.65
mapMethod · 0.45
provideMethod · 0.45

Tested by

no test coverage detected