Skip to content

Commit

Permalink
fix(types): remove optional mark in RequestHandler args (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb authored Apr 7, 2021
1 parent 0ce1b6e commit bb2d97d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/polite-worms-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Fix argument type for RequestHandler
2 changes: 1 addition & 1 deletion packages/kit/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export type Response = {
};

export type RequestHandler<Context = any, Body = unknown> = (
request?: Request<Context, Body>
request: Request<Context, Body>
) => Response | Promise<Response>;

export type Load = (input: LoadInput) => LoadOutput | Promise<LoadOutput>;
Expand Down

0 comments on commit bb2d97d

Please sign in to comment.