mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
little change
`import { router, get, ServerRequest, ServerResponse } from 'microrouter';
const notfound = (req: ServerRequest, res: ServerResponse) => send(res, 404, 'Not found route');
export default router(
get('/', notfound)`
);
This commit is contained in:
Vendored
+6
-5
@@ -8,12 +8,13 @@
|
||||
|
||||
import { IncomingMessage, ServerResponse, Server } from 'http';
|
||||
import { RequestHandler } from 'micro';
|
||||
|
||||
export type ServerResponse = ServerResponse;
|
||||
export type ServerRequest = IncomingMessage & {
|
||||
params: { [key: string]: string },
|
||||
query: { [key: string]: string }
|
||||
};
|
||||
export type AugmentedRequestHandler = (
|
||||
req: IncomingMessage & {
|
||||
params: {[key: string]: string},
|
||||
query: {[key: string]: string}
|
||||
},
|
||||
req: ServerRequest,
|
||||
res: ServerResponse
|
||||
) => any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user