Closed liss-mouse closed 1 year ago
From the readme and the code, I can see that custom handler provided to the getRequestHandler accepts an object
getRequestHandler
const handler = routes.getRequestHandler(app, ({req, res, route, query}) => { app.render(req, res, route.page, query) })
But in type definitions, the type of the handler differs:
export type HTTPHandler = ( request: IncomingMessage, response: ServerResponse ) => void
so that TS fails to compile
From the readme and the code, I can see that custom handler provided to the
getRequestHandler
accepts an objectBut in type definitions, the type of the handler differs:
so that TS fails to compile