Skip to content

Commit

Permalink
Merge pull request #19 from lifeomic/allow-non-promise-returns
Browse files Browse the repository at this point in the history
feat: allow synchronous route implementations
  • Loading branch information
swain authored Jun 1, 2022
2 parents b87adba + 61eb6b8 commit 47d2e58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/koa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export type ImplementationOf<Schema extends OneSchema<any>, State, Context> = {
: { body: EndpointsOf<Schema>[Name]['Request'] };
}
>,
) => Promise<EndpointsOf<Schema>[Name]['Response']>;
) =>
| EndpointsOf<Schema>[Name]['Response']
| Promise<EndpointsOf<Schema>[Name]['Response']>;
};

/**
Expand Down

0 comments on commit 47d2e58

Please sign in to comment.