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

Function layer

packages/sql/sqlite-react-native/src/SqliteClient.ts:287–295  ·  view source on GitHub ↗
(
  config: SqliteClientConfig
)

Source from the content-addressed store, hash-verified

285 * @since 4.0.0
286 */
287export const layer = (
288 config: SqliteClientConfig
289): Layer.Layer<SqliteClient | Client.SqlClient> =>
290 Layer.effectContext(
291 Effect.map(make(config), (client) =>
292 Context.make(SqliteClient, client).pipe(
293 Context.add(Client.SqlClient, client)
294 ))
295 ).pipe(Layer.provide(Reactivity.layer))
296
297interface DB {
298 close: () => void

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