createServiceFactory()
Home > @backstage/backend-plugin-api
> createServiceFactory
Creates a plugin scoped service factory with optional options.
Signature:
function createServiceFactory<TService, TImpl extends TService, TDeps extends {
[name in string]: ServiceRef<unknown>;
}, TContext = undefined, TOpts extends object | undefined = undefined>(config: (options?: TOpts) => PluginServiceFactoryConfig<TService, TContext, TImpl, TDeps>): (options?: TOpts) => ServiceFactory<TService, 'plugin'>;
Parameters
Parameter | Type | Description |
---|---|---|
config | (options?: TOpts) => PluginServiceFactoryConfig<TService, TContext, TImpl, TDeps> | The service factory configuration. |
Returns:
(options?: TOpts) => ServiceFactory<TService, 'plugin'>