From 97bbe96661771cf4aad4d7b74a4a0c24a0582738 Mon Sep 17 00:00:00 2001 From: gcanti Date: Sat, 20 Jan 2024 16:52:09 +0100 Subject: [PATCH] chore, closes #436 --- pages/docs/context-management/services.mdx | 4 ++-- src/context-management/services/multiple-services-pipe.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/docs/context-management/services.mdx b/pages/docs/context-management/services.mdx index 8a3b8883b..25177cb9f 100644 --- a/pages/docs/context-management/services.mdx +++ b/pages/docs/context-management/services.mdx @@ -215,13 +215,13 @@ To execute the `program`, we need to provide implementations for both services: Alternatively, instead of calling `provideService` multiple times, we can combine the service implementations into a single `Context`: -```ts file=/src/context-management/services/multiple-services-pipe.ts#L39-L48 +```ts file=/src/context-management/services/multiple-services-pipe.ts#L39-L43 ``` and then provide the entire context using the `Effect.provide` function: -```ts file=/src/context-management/services/multiple-services-pipe.ts#L50- +```ts file=/src/context-management/services/multiple-services-pipe.ts#L45- ``` diff --git a/src/context-management/services/multiple-services-pipe.ts b/src/context-management/services/multiple-services-pipe.ts index 3b0ec0757..14d09c389 100644 --- a/src/context-management/services/multiple-services-pipe.ts +++ b/src/context-management/services/multiple-services-pipe.ts @@ -36,7 +36,7 @@ const runnable1 = program.pipe( ) ) -// Context +// $ExpectType Context const context = Context.empty().pipe( Context.add(Random, Random.of({ next: Effect.sync(() => Math.random()) })), Context.add(Logger, Logger.of({ log: Console.log }))