( config: SqliteClientConfig )
| 265 | * @since 4.0.0 |
| 266 | */ |
| 267 | export 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 | |
| 277 | interface DB { |
| 278 | close: () => void |