MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / makeExampleExtension

Function makeExampleExtension

packages/plugins/example/src/server.ts:23–32  ·  view source on GitHub ↗
(ctx: { readonly storage: { count: number } })

Source from the content-addressed store, hash-verified

21const ExampleApiBundle = HttpApi.make("example").add(ExampleApi);
22
23const 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
34type ExampleExtension = ReturnType<typeof makeExampleExtension>;
35

Callers

nothing calls this directly

Calls 1

syncMethod · 0.65

Tested by

no test coverage detected