(
moduleDefinition: any,
scope: Type<unknown>[],
)
| 180 | } |
| 181 | |
| 182 | public async insertModule( |
| 183 | moduleDefinition: any, |
| 184 | scope: Type<unknown>[], |
| 185 | ): Promise< |
| 186 | | { |
| 187 | moduleRef: Module; |
| 188 | inserted: boolean; |
| 189 | } |
| 190 | | undefined |
| 191 | > { |
| 192 | const moduleToAdd = this.isForwardReference(moduleDefinition) |
| 193 | ? moduleDefinition.forwardRef() |
| 194 | : moduleDefinition; |
| 195 | |
| 196 | if (this.isInjectable(moduleToAdd)) { |
| 197 | throw new InvalidClassModuleException( |
| 198 | moduleDefinition, |
| 199 | scope, |
| 200 | 'provider', |
| 201 | ); |
| 202 | } |
| 203 | if (this.isController(moduleToAdd)) { |
| 204 | throw new InvalidClassModuleException( |
| 205 | moduleDefinition, |
| 206 | scope, |
| 207 | 'controller', |
| 208 | ); |
| 209 | } |
| 210 | if (this.isExceptionFilter(moduleToAdd)) { |
| 211 | throw new InvalidClassModuleException(moduleDefinition, scope, 'filter'); |
| 212 | } |
| 213 | |
| 214 | return this.container.addModule(moduleToAdd, scope); |
| 215 | } |
| 216 | |
| 217 | public async scanModulesForDependencies( |
| 218 | modules: Map<string, Module> = this.container.getModules(), |
no test coverage detected