( config: SqliteClientConfig )
| 482 | * @since 1.0.0 |
| 483 | */ |
| 484 | export const layer = ( |
| 485 | config: SqliteClientConfig |
| 486 | ): Layer.Layer<SqliteClient | Client.SqlClient, ConfigError | SqlError> => |
| 487 | Layer.scopedContext( |
| 488 | Effect.map(make(config), (client) => |
| 489 | Context.make(SqliteClient, client).pipe( |
| 490 | Context.add(Client.SqlClient, client) |
| 491 | )) |
| 492 | ).pipe(Layer.provide(Reactivity.layer)) |
| 493 | |
| 494 | /** |
| 495 | * @category layers |