Skip to content

Commit

Permalink
Merge branch 'master' into gh-7302
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Nov 18, 2022
2 parents 1314f50 + 0d45963 commit 164788f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-kiwis-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

[fix] adjust interfaces to fix type errors
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"check": "tsc"
},
"dependencies": {
"@cloudflare/workers-types": "^3.18.0",
"@cloudflare/workers-types": "^4.0.0",
"@iarna/toml": "^2.2.5",
"esbuild": "^0.15.12"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"prepublishOnly": "pnpm build"
},
"dependencies": {
"@cloudflare/workers-types": "^3.18.0",
"@cloudflare/workers-types": "^4.0.0",
"esbuild": "^0.15.12",
"worktop": "0.8.0-next.14"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class HttpError {

export class Redirect {
/**
* @param {number} status
* @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status
* @param {string} location
*/
constructor(status, location) {
Expand Down
6 changes: 3 additions & 3 deletions packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,11 +747,11 @@ export function error(
/**
* The object returned by the `error` function
*/
export interface HttpError extends UniqueInterface {
export interface HttpError {
/** The HTTP status code */
status: number;
/** The error message */
body: { message: string } extends App.Error ? App.Error | string | undefined : App.Error;
body: App.Error;
}

/**
Expand All @@ -766,7 +766,7 @@ export function redirect(
/**
* The object returned by the `redirect` function
*/
export interface Redirect extends UniqueInterface {
export interface Redirect {
/** The HTTP status code */
status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308;
/** The location to redirect to */
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

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

0 comments on commit 164788f

Please sign in to comment.