Skip to content
tRPC

Partners

Function: experimental_redirect()

On this page

experimental_redirect(url, redirectType?): undefined

Defined in: packages/server/src/adapters/next-app-dir/redirect.ts:29

Like redirect() from next/navigation, for procedures called through nextAppDirCaller. Return it from a resolver; the caller then redirects. Its type is undefined, which matches what the client gets, unlike Next.js's never.

Parameters

ParameterType
urlstring | URL
redirectType?RedirectType

Returns

undefined