( config: D1ClientConfig )
| 392 | * @since 4.0.0 |
| 393 | */ |
| 394 | export const layer = ( |
| 395 | config: D1ClientConfig |
| 396 | ): Layer.Layer<D1Client | Client.SqlClient, Config.ConfigError> => |
| 397 | Layer.effectContext( |
| 398 | Effect.map(make(config), (client) => |
| 399 | Context.make(D1Client, client).pipe( |
| 400 | Context.add(Client.SqlClient, client) |
| 401 | )) |
| 402 | ).pipe(Layer.provide(Reactivity.layer)) |