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

Function layer

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

Source from the content-addressed store, hash-verified

410 * @since 4.0.0
411 */
412export const layer = (
413 config: LibsqlClientConfig
414): Layer.Layer<LibsqlClient | Client.SqlClient> =>
415 Layer.effectContext(
416 Effect.map(make(config), (client) =>
417 Context.make(LibsqlClient, client).pipe(
418 Context.add(Client.SqlClient, client)
419 ))
420 ).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