1
1
import { Action } from "./Action" ;
2
2
import { ActionMetadata } from "./metadata/ActionMetadata" ;
3
3
import { ActionParameterHandler } from "./ActionParameterHandler" ;
4
- import { Driver } from "./driver/Driver " ;
4
+ import { BaseDriver } from "./driver/BaseDriver " ;
5
5
import { InterceptorInterface } from "./InterceptorInterface" ;
6
6
import { InterceptorMetadata } from "./metadata/InterceptorMetadata" ;
7
7
import { MetadataBuilder } from "./metadata-builder/MetadataBuilder" ;
8
- import { RoutingControllersOptions } from "./RoutingControllersOptions" ;
8
+ import { RoutingControllersOptions } from "./RoutingControllersOptions" ;
9
9
import { getFromContainer } from "./container" ;
10
10
import { isPromiseLike } from "./util/isPromiseLike" ;
11
11
import { runInSequence } from "./util/runInSequence" ;
12
12
13
13
/**
14
14
* Registers controllers and middlewares in the given server framework.
15
15
*/
16
- export class RoutingControllers {
16
+ export class RoutingControllers < T extends BaseDriver > {
17
17
18
18
// -------------------------------------------------------------------------
19
19
// Private properties
@@ -22,7 +22,7 @@ export class RoutingControllers {
22
22
/**
23
23
* Used to check and handle controller action parameters.
24
24
*/
25
- private parameterHandler : ActionParameterHandler ;
25
+ private parameterHandler : ActionParameterHandler < T > ;
26
26
27
27
/**
28
28
* Used to build metadata objects for controllers and middlewares.
@@ -38,7 +38,7 @@ export class RoutingControllers {
38
38
// Constructor
39
39
// -------------------------------------------------------------------------
40
40
41
- constructor ( private driver : Driver , private options : RoutingControllersOptions ) {
41
+ constructor ( private driver : T , private options : RoutingControllersOptions ) {
42
42
this . parameterHandler = new ActionParameterHandler ( driver ) ;
43
43
this . metadataBuilder = new MetadataBuilder ( options ) ;
44
44
}
0 commit comments