Skip to content

Commit 9fcbf7f

Browse files
authored
fix: add bindings and variables generics to hono createWorkflow (#74)
1 parent dd7dbee commit 9fcbf7f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

platforms/hono.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,13 @@ export const serve = <
5151
return handler;
5252
};
5353

54-
export const createWorkflow = <TInitialPayload, TResult>(
55-
...params: Parameters<typeof serve<TInitialPayload, WorkflowBindings, Variables, TResult>>
54+
export const createWorkflow = <
55+
TInitialPayload = unknown,
56+
TResult = unknown,
57+
TBindings extends WorkflowBindings = WorkflowBindings,
58+
TVariables extends Variables = Variables,
59+
>(
60+
...params: Parameters<typeof serve<TInitialPayload, TBindings, TVariables, TResult>>
5661
): InvokableWorkflow<TInitialPayload, TResult> => {
5762
const [routeFunction, options = {}] = params;
5863
return {

0 commit comments

Comments
 (0)