Template
1
0
Files
boilerplate/tests/mocks/actions.ts
2025-04-18 20:18:50 +00:00

14 lines
290 B
TypeScript

import z from "zod";
import { action } from "../../libraries/action.ts";
export const addTwoNumbers = action
.make("addTwoNumbers")
.input({ a: z.number(), b: z.number() })
.output({ added: z.number() })
.handle(async ({ a, b }) => {
return {
added: a + b,
};
});