Skip to content

Commit

Permalink
fix(nextjs): Update params type with Promise as expected in Next.js 15 (
Browse files Browse the repository at this point in the history
  • Loading branch information
ggallon authored Nov 1, 2024
1 parent 16a638b commit 6cbd6a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next-auth/src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// @ts-expect-error Next.js does not yet correctly use the `package.json#exports` field
import type { NextRequest } from "next/server"
import type { Awaitable } from "@auth/core/types"

/**
* AppRouteHandlerFnContext is the context that is passed to the handler as the
* second argument.
*/
export type AppRouteHandlerFnContext = {
params?: Record<string, string | string[]>
params: Awaitable<Record<string, string | string[]>>
}
/**
* Handler function for app routes. If a non-Response value is returned, an error
Expand Down

0 comments on commit 6cbd6a5

Please sign in to comment.