(
wrapper: InstanceWrapper,
collection: Map<InjectionToken, InstanceWrapper>,
moduleRef: Module,
contextId = STATIC_CONTEXT,
inquirer?: InstanceWrapper,
)
| 223 | } |
| 224 | |
| 225 | public async loadMiddleware( |
| 226 | wrapper: InstanceWrapper, |
| 227 | collection: Map<InjectionToken, InstanceWrapper>, |
| 228 | moduleRef: Module, |
| 229 | contextId = STATIC_CONTEXT, |
| 230 | inquirer?: InstanceWrapper, |
| 231 | ) { |
| 232 | const { metatype, token } = wrapper; |
| 233 | const targetWrapper = collection.get(token)!; |
| 234 | if (!isUndefined(targetWrapper.instance)) { |
| 235 | return; |
| 236 | } |
| 237 | targetWrapper.instance = Object.create(metatype!.prototype); |
| 238 | await this.loadInstance( |
| 239 | wrapper, |
| 240 | collection, |
| 241 | moduleRef, |
| 242 | this.createResolutionContext(contextId, inquirer || wrapper), |
| 243 | ); |
| 244 | } |
| 245 | |
| 246 | public async loadController( |
| 247 | wrapper: InstanceWrapper<Controller>, |
no test coverage detected