Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Dec 19, 2024
1 parent 860404d commit 69ef385
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Handlers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/Handlers.resi
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,20 @@ type onBeforeSendResponse<'ctx> = {
responseType: responseType,
}

type onBeforeBuildResponse<'ctx> = {
request: Request.t,
context: 'ctx,
responseType: responseType,
}

type handleRequestConfig<'ctx> = {
request: Request.t,
render: renderConfig<'ctx> => promise<Jsx.element>,
setupHeaders?: unit => Headers.t,
renderTitle?: array<string> => string,
experimental_stream?: bool,
onBeforeSendResponse?: onBeforeSendResponse<'ctx> => promise<Response.t>,
onBeforeBuildResponse?: onBeforeBuildResponse<'ctx> => promise<unit>,
}

let handleRequest: (t<'ctx>, handleRequestConfig<'ctx>) => promise<Response.t>
Expand Down

0 comments on commit 69ef385

Please sign in to comment.