( config: SqliteClientConfig )
| 228 | * @since 1.0.0 |
| 229 | */ |
| 230 | export const layer = ( |
| 231 | config: SqliteClientConfig |
| 232 | ): Layer.Layer<SqliteClient | Client.SqlClient, ConfigError> => |
| 233 | Layer.scopedContext( |
| 234 | Effect.map(make(config), (client) => |
| 235 | Context.make(SqliteClient, client).pipe( |
| 236 | Context.add(Client.SqlClient, client) |
| 237 | )) |
| 238 | ).pipe(Layer.provide(Reactivity.layer)) |