All files / utils/services/apply apply.service.ts

23.08% Statements 3/13
0% Branches 0/6
0% Functions 0/5
30% Lines 3/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 208x       8x                         8x    
import { Container, Service } from '../../../utils/container/index';
import { GapiModuleArguments } from '../../../decorators/gapi-module/gapi-module.decorator.interface';
import { GapiServerModule } from '../../../modules/server/server.module';
 
export const ApplyServicesHook = (self, options: GapiModuleArguments) => {
    if (options.imports) {
        options.imports.forEach(m => Container.get(m));
    }
    if (options.services) {
        options.services.forEach(m => Container.get(m));
    }
    if (options.controllers) {
        options.controllers.forEach(m => Container.get(m));
    }
};
 
 
export function GetType<T, K extends keyof T>(type: T) {
    return Container.get(type);
}