Skip to content

Commit

Permalink
Update request type definitions to make platform possibly undefined (#…
Browse files Browse the repository at this point in the history
…8232)

* fallback platform to empty object

* Update .changeset/shy-monkeys-raise.md

* mark platform type as possibly undefined instead

* Update packages/kit/types/index.d.ts

* Update .changeset/shy-monkeys-raise.md

Co-authored-by: Conduitry <git@chor.date>

* Update packages/kit/types/index.d.ts

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Rich Harris <hello@rich-harris.dev>
Co-authored-by: Conduitry <git@chor.date>
  • Loading branch information
4 people authored Jan 5, 2023
1 parent 4168707 commit 5426901
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/shy-monkeys-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Update typings of `event.platform` to be possibly undefined
2 changes: 1 addition & 1 deletion packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ export interface RequestEvent<
/**
* Additional data made available through the adapter.
*/
platform: Readonly<App.Platform>;
platform: Readonly<App.Platform> | undefined;
/**
* The original request object
*/
Expand Down

0 comments on commit 5426901

Please sign in to comment.