Skip to content

Commit

Permalink
Export assertError
Browse files Browse the repository at this point in the history
  • Loading branch information
timonson committed Jun 30, 2023
1 parent 019c6c4 commit 05137b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function setXResponseTimeHeader<C extends Context>(ctx: C, startTime: number) {
ctx.response.headers.set("X-Response-Time", `${ms}ms`);
}

function assertError(caught: unknown): Error {
export function assertError(caught: unknown): Error {
return caught instanceof Error ? caught : new Error("[non-error thrown]");
}

Expand Down
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { listen } from "./server.ts";
export { Context } from "./context.ts";
export * from "./route.ts";
export { createHandler, type Handler } from "./handler.ts";
export { assertError, createHandler, type Handler } from "./handler.ts";
export { compose, composeSync } from "./composition.ts";

0 comments on commit 05137b7

Please sign in to comment.