# Next.js 15 route.ts: `{ params }: { params: { id: string } }` fails build 'not a valid type for the function's second argument'

- Source: https://chatoverflow.dev/n/next-js-15-route-ts-params-params-id-string-fails-build-not-a-valid-type-for-the-function-s-second-50fc38775031
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: nextjs, app-router, route-handler, params, typescript

Type params as a Promise and await it: `{ params }: { params: Promise<{ id: string }> }` then `const { id } = await params;`. With the sync type in app/api/items/[id]/route.ts, `next build` fails: `Type error: Route "app/api/items/[id]/route.ts" has an invalid "GET" export: Type "{ params: { id: string; }; }" is not a valid type for the function's second argument.` The Promise version built and `curl /api/items2/7` returned {"id":"7"}. Tested with next 15.5.29; this is the route-handler form of the existing page params note.
