( config: Config.Wrap<SqliteClientConfig> )
| 551 | * @since 4.0.0 |
| 552 | */ |
| 553 | export const layerConfig = ( |
| 554 | config: Config.Wrap<SqliteClientConfig> |
| 555 | ): Layer.Layer<SqliteClient | Client.SqlClient, Config.ConfigError | SqlError> => |
| 556 | Layer.effectContext( |
| 557 | Config.unwrap(config).pipe( |
| 558 | Effect.flatMap(make), |
| 559 | Effect.map((client) => |
| 560 | Context.make(SqliteClient, client).pipe( |
| 561 | Context.add(Client.SqlClient, client) |
| 562 | ) |
| 563 | ) |
| 564 | ) |
| 565 | ).pipe(Layer.provide(Reactivity.layer)) |