Skip to main content

createServiceFactory()

Home > @backstage/backend-plugin-api > createServiceFactory

Creates a root scoped service factory with optional options.

Signature:

function createServiceFactory<TService, TImpl extends TService, TDeps extends {
[name in string]: ServiceRef<unknown, 'root'>;
}, TOpts extends object | undefined = undefined>(config: (options?: TOpts) => RootServiceFactoryConfig<TService, TImpl, TDeps>): (options?: TOpts) => ServiceFactory<TService, 'root'>;

Parameters

ParameterTypeDescription
config(options?: TOpts) => RootServiceFactoryConfig<TService, TImpl, TDeps>The service factory configuration.

Returns:

(options?: TOpts) => ServiceFactory<TService, 'root'>