sveltekit-enhance
    Preparing search index...

    Variable redirectConst

    redirect: (
        status:
            | 302
            | 300
            | 301
            | 303
            | 304
            | 305
            | 306
            | 307
            | 308
            | {} & number,
        location: string | URL,
    ) => never = SRedirect

    Type Declaration

      • (
            status:
                | 302
                | 300
                | 301
                | 303
                | 304
                | 305
                | 306
                | 307
                | 308
                | {} & number,
            location: string | URL,
        ): never
      • Redirect a request. When called during request handling, SvelteKit will return a redirect response. Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.

        Most common status codes:

        • 303 See Other: redirect as a GET request (often used after a form POST request)
        • 307 Temporary Redirect: redirect will keep the request method
        • 308 Permanent Redirect: redirect will keep the request method, SEO will be transferred to the new page

        See all redirect status codes

        Parameters

        • status: 302 | 300 | 301 | 303 | 304 | 305 | 306 | 307 | 308 | {} & number

          The HTTP status code. Must be in the range 300-308.

        • location: string | URL

          The location to redirect to.

        Returns never

        This error instructs SvelteKit to redirect to the specified location.

        If the provided status is invalid or the location cannot be used as a header value.