( config: SqliteClientConfig )
| 285 | * @since 4.0.0 |
| 286 | */ |
| 287 | export 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 | |
| 297 | interface DB { |
| 298 | close: () => void |