@@ -11,6 +11,31 @@ import { MiddlewareWrapper } from '../middleware/container';
1111import { InstanceWrapper } from './container' ;
1212import { Module } from './module' ;
1313
14+ /**
15+ * The type of an injectable dependency
16+ */
17+ export type InjectorDependency = Type < any > | Function | string ;
18+
19+ /**
20+ * Context of a dependency which gets injected by
21+ * the injector
22+ */
23+ export interface InjectorDependencyContext {
24+ /**
25+ * The name of the function or injection token
26+ */
27+ name ?: string ;
28+ /**
29+ * The index of the dependency which gets injected
30+ * from the dependencies array
31+ */
32+ index : number ;
33+ /**
34+ * The dependency array which gets injected
35+ */
36+ dependencies : InjectorDependency [ ] ;
37+ }
38+
1439export class Injector {
1540 public async loadInstanceOfMiddleware (
1641 wrapper : MiddlewareWrapper ,
@@ -288,29 +313,4 @@ export class Injector {
288313 } ;
289314 return modules . concat . apply ( modules , modules . map ( flatten ) ) ;
290315 }
291- }
292-
293- /**
294- * The type of an injectable dependency
295- */
296- export type InjectorDependency = Type < any > | Function | string ;
297-
298- /**
299- * Context of a dependency which gets injected by
300- * the injector
301- */
302- export interface InjectorDependencyContext {
303- /**
304- * The name of the function or injection token
305- */
306- name ?: string ;
307- /**
308- * The index of the dependency which gets injected
309- * from the dependencies array
310- */
311- index : number ;
312- /**
313- * The dependency array which gets injected
314- */
315- dependencies : InjectorDependency [ ] ;
316- }
316+ }
0 commit comments