Skip to content

Commit 30a3758

Browse files
committedNov 27, 2024
feat: add support for hono variables
1 parent b108d18 commit 30a3758

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎platforms/hono.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ export type WorkflowBindings = {
2121
*/
2222
export const serve = <
2323
TInitialPayload = unknown,
24-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
2524
TBindings extends WorkflowBindings = WorkflowBindings,
25+
TVariables extends object = object,
2626
>(
2727
routeFunction: RouteFunction<TInitialPayload>,
2828
options?: Omit<WorkflowServeOptions<Response, TInitialPayload>, "onStepFinish">
29-
): ((context: Context<{ Bindings: TBindings }>) => Promise<Response>) => {
30-
const handler = async (context: Context<{ Bindings: TBindings }>) => {
29+
): ((context: Context<{ Bindings: TBindings; Variables: TVariables }>) => Promise<Response>) => {
30+
const handler = async (context: Context<{ Bindings: TBindings; Variables: TVariables }>) => {
3131
const environment = context.env;
3232
const request = context.req.raw;
3333

0 commit comments

Comments
 (0)