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:
Hum3
2018-03-11 08:57:10 -03:00
committed by GitHub
parent 9bb6dc2f8b
commit a959f414dd
+6 -5
View File
@@ -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;