| 554 | * @since 4.0.0 |
| 555 | */ |
| 556 | export const layer = ( |
| 557 | config: SqliteClientConfig |
| 558 | ): Layer.Layer<SqliteClient | Client.SqlClient, SqlError> => |
| 559 | Layer.effectContext( |
| 560 | Effect.map(make(config), (client) => |
| 561 | Context.make(SqliteClient, client).pipe( |
| 562 | Context.add(Client.SqlClient, client) |
| 563 | )) |
| 564 | ).pipe(Layer.provide(Reactivity.layer)) |
| 565 | |
| 566 | /** |
| 567 | * Builds a layer from an Effect `Config` value, providing both the worker-backed SQLite WASM `SqliteClient` service and the generic `SqlClient` service. |