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

Function layer

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

Source from the content-addressed store, hash-verified

265 * @since 4.0.0
266 */
267export const layer = (
268 config: SqliteClientConfig
269): Layer.Layer<SqliteClient | Client.SqlClient> =>
270 Layer.effectContext(
271 Effect.map(make(config), (client) =>
272 Context.make(SqliteClient, client).pipe(
273 Context.add(Client.SqlClient, client)
274 ))
275 ).pipe(Layer.provide(Reactivity.layer))
276
277interface DB {
278 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