1
- import http from "http" ;
2
- import next from "next" ;
1
+ import { IncomingMessage , ServerResponse } from "http" ;
2
+ import { Server } from "next" ;
3
3
import { ComponentType } from "react" ;
4
4
import { LinkState } from "next/link" ;
5
5
import { SingletonRouter , EventChangeOptions } from "next/router" ;
6
6
7
7
export type HTTPHandler = (
8
- request : http . IncomingMessage ,
9
- response : http . ServerResponse
8
+ request : IncomingMessage ,
9
+ response : ServerResponse
10
10
) => void ;
11
11
12
12
export type RouteParams = {
@@ -36,7 +36,7 @@ export interface Router extends SingletonRouter {
36
36
}
37
37
38
38
export interface Registry {
39
- getRequestHandler ( app : next . Server , custom ?: HTTPHandler ) : HTTPHandler ;
39
+ getRequestHandler ( app : Server , custom ?: HTTPHandler ) : HTTPHandler ;
40
40
add ( name : string , pattern ?: string , page ?: string ) : this;
41
41
add ( pattern : string , page : string ) : this;
42
42
add ( options : { name : string ; pattern ?: string ; page ?: string } ) : this;
@@ -45,7 +45,7 @@ export interface Registry {
45
45
}
46
46
47
47
export default class Routes implements Registry {
48
- getRequestHandler ( app : next . Server , custom ?: HTTPHandler ) : HTTPHandler ;
48
+ getRequestHandler ( app : Server , custom ?: HTTPHandler ) : HTTPHandler ;
49
49
add ( name : string , pattern ?: string , page ?: string ) : this;
50
50
add ( pattern : string , page : string ) : this;
51
51
add ( options : { name : string ; pattern ?: string ; page ?: string } ) : this;
0 commit comments