Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* }
*
* registerMiddleware({provide: FooMiddleware});
* // or
* registerMiddleware(FooMiddleware);
*
* const injector = new InjectorService()
* injector.load();
*
* const myFooService = injector.get(FooMiddleware);
* fooMiddleware.use(); // test
* ```
*
* @param provider Provider configuration.
*/
export const registerMiddleware = GlobalProviders.createRegisterFn(ProviderType.MIDDLEWARE);
* }
*
* registerConverter({provide: MyConverter});
* // or
* registerConverter(MyConverter);
*
* const injector = new InjectorService();
* injector.load();
*
* const myConverter = injector.get(MyConverter);
* myConverter.serialize(); // test
* ```
*
* @param provider Provider configuration.
*/
export const registerConverter = GlobalProviders.createRegisterFn(ProviderType.SERVICE);