From 1a4bd230019f9680995f9c284dfc73e00476059a Mon Sep 17 00:00:00 2001 From: Ignatius Bagus Date: Wed, 7 Apr 2021 14:52:24 +0700 Subject: [PATCH 1/2] fix: remove question mark in RequestHandler args --- packages/kit/types.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kit/types.d.ts b/packages/kit/types.d.ts index 7ab67d56df04..5e34a5776ec4 100644 --- a/packages/kit/types.d.ts +++ b/packages/kit/types.d.ts @@ -90,7 +90,7 @@ export type Response = { }; export type RequestHandler = ( - request?: Request + request: Request ) => Response | Promise; export type Load = (input: LoadInput) => LoadOutput | Promise; From 411dcb8417bffc8d831361c69f27b3bfa73b200e Mon Sep 17 00:00:00 2001 From: Ignatius Bagus Date: Wed, 7 Apr 2021 15:09:07 +0700 Subject: [PATCH 2/2] chore: add changeset --- .changeset/polite-worms-happen.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/polite-worms-happen.md diff --git a/.changeset/polite-worms-happen.md b/.changeset/polite-worms-happen.md new file mode 100644 index 000000000000..f3a5ee63fe58 --- /dev/null +++ b/.changeset/polite-worms-happen.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +Fix argument type for RequestHandler