Function
makeExampleExtension
(ctx: { readonly storage: { count: number } })
Source from the content-addressed store, hash-verified
| 21 | const ExampleApiBundle = HttpApi.make("example").add(ExampleApi); |
| 22 | |
| 23 | const makeExampleExtension = (ctx: { readonly storage: { count: number } }) => ({ |
| 24 | greet: (name: string) => |
| 25 | Effect.sync(() => { |
| 26 | ctx.storage.count += 1; |
| 27 | return { |
| 28 | message: `hello ${name}`, |
| 29 | count: ctx.storage.count, |
| 30 | }; |
| 31 | }), |
| 32 | }); |
| 33 | |
| 34 | type ExampleExtension = ReturnType<typeof makeExampleExtension>; |
| 35 | |
Callers
nothing calls this directly
Tested by
no test coverage detected