Skip to content

Commit 0398d44

Browse files
committed
fix(integrations): type the ashby test helpers against the tool's own params
1 parent 026b683 commit 0398d44

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/sim/tools/ashby/ashby.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ import type { ToolConfig } from '@/tools/types'
2626

2727
const respond = (body: unknown) => new Response(JSON.stringify(body), { status: 200 })
2828

29-
function requestBody(tool: ToolConfig<never, never>, params: unknown): Record<string, unknown> {
29+
function requestBody<P, R>(tool: ToolConfig<P, R>, params: unknown): Record<string, unknown> {
3030
const build = tool.request?.body as (p: unknown) => Record<string, unknown>
3131
return build(params)
3232
}
3333

34-
async function transform(tool: ToolConfig<never, never>, body: unknown) {
34+
async function transform<P, R>(tool: ToolConfig<P, R>, body: unknown) {
3535
const run = tool.transformResponse as (r: Response) => Promise<{ output: Record<string, never> }>
3636
return run(respond(body))
3737
}

0 commit comments

Comments
 (0)