Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* }
*
* registerModel({provide: MyModel});
* // or
* registerModel(MyModel);
*
* const injector = new InjectorService();
* injector.load();
*
* const myModel = injector.get(MyModel);
* myModel.getFoo(); // test
* ```
*
* @param provider Provider configuration.
*/
export const registerModel = GlobalProviders.createRegisterFn(PROVIDER_TYPE_MONGOOSE_MODEL);
* }
*
* registerResolverService({provide: MyFooService});
* // or
* registerResolverService(MyFooService);
*
* const injector = new InjectorService();
* injector.load();
*
* const myFooService = injector.get(MyFooService);
* myFooService.getFoo(); // test
* ```
*
* @param provider Provider configuration.
*/
export const registerResolverService = GlobalProviders.createRegisterFn(PROVIDER_TYPE_RESOLVER_SERVICE);
* }
*
* registerSocketService({provide: MyFooService});
* // or
* registerSocketService(MyFooService);
*
* const injector = new InjectorService();
* injector.load();
*
* const myFooService = injector.get(MyFooService);
* myFooService.getFoo(); // test
* ```
*
* @param provider Provider configuration.
*/
export const registerProtocol = GlobalProviders.createRegisterFn(PROVIDER_TYPE_PROTOCOL);
* }
*
* registerModel({provide: MyModel});
* // or
* registerModel(MyModel);
*
* const injector = new InjectorService();
* injector.load();
*
* const myModel = injector.get(MyModel);
* myModel.getFoo(); // test
* ```
*
* @param provider Provider configuration.
*/
export const registerModel = GlobalProviders.createRegisterFn("mongooseModel");
* }
*
* registerSocketService({provide: MyFooService});
* // or
* registerSocketService(MyFooService);
*
* const injector = new InjectorService();
* injector.load();
*
* const myFooService = injector.get(MyFooService);
* myFooService.getFoo(); // test
* ```
*
* @param provider Provider configuration.
*/
export const registerSocketService = GlobalProviders.createRegisterFn("socketService");
* }
*
* registerSocketService({provide: MyFooService});
* // or
* registerSocketService(MyFooService);
*
* const injector = new InjectorService();
* injector.load();
*
* const myFooService = injector.get(MyFooService);
* myFooService.getFoo(); // test
* ```
*
* @param provider Provider configuration.
*/
export const registerSocketService = GlobalProviders.createRegisterFn(PROVIDER_TYPE_SOCKET_SERVICE);