( config: D1ClientConfig )
| 424 | * @since 4.0.0 |
| 425 | */ |
| 426 | export const layer = ( |
| 427 | config: D1ClientConfig |
| 428 | ): Layer.Layer<D1Client | Client.SqlClient, Config.ConfigError> => |
| 429 | Layer.effectContext( |
| 430 | Effect.map(make(config), (client) => |
| 431 | Context.make(D1Client, client).pipe( |
| 432 | Context.add(Client.SqlClient, client) |
| 433 | )) |
| 434 | ).pipe(Layer.provide(Reactivity.layer)) |