Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/angular/ssr/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
export type RequestHandlerFunction = (
request: Request,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
...ignoredArgs: any[]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using any here, can we instead use generics to infer the type?

Example

export type RequestHandlerFunction<T = unknown> = (
  request: Request,
  requestContext?: T,
) => Promise<Response | null> | null | Response;

export function createRequestHandler<T = unknown>(
  handler: RequestHandlerFunction<T>,
): RequestHandlerFunction<T> {

}

) => Promise<Response | null> | null | Response;

/**
Expand Down