Skip to content

Commit 1c4246e

Browse files
committed
fix(@angular/ssr): allow using function with optional request context argument
1 parent 1316930 commit 1c4246e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/angular/ssr/src/handler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
* Function for handling HTTP requests in a web environment.
1111
*
1212
* @param request - The incoming HTTP request object.
13+
* @param requestContext - Optional context for rendering, such as metadata associated with the request.
1314
* @returns A Promise resolving to a `Response` object, `null`, or directly a `Response`,
1415
* supporting both synchronous and asynchronous handling.
1516
* @developerPreview
1617
*/
1718
export type RequestHandlerFunction = (
1819
request: Request,
20+
requestContext?: unknown,
1921
) => Promise<Response | null> | null | Response;
2022

2123
/**

0 commit comments

Comments
 (0)