Skip to main content
Version: Next

createServiceFactory()

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

Creates a root scoped service factory without options.

Signature:

function createServiceFactory<TService, TInstances extends 'singleton' | 'multiton', TImpl extends TService, TDeps extends {
[name in string]: ServiceRef<unknown, 'root'>;
}>(options: RootServiceFactoryOptions<TService, TInstances, TImpl, TDeps>): ServiceFactory<TService, 'root', TInstances>;

Parameters

Parameter

Type

Description

options

RootServiceFactoryOptions<TService, TInstances, TImpl, TDeps>

The service factory configuration.

**Returns:**

ServiceFactory<TService, 'root', TInstances>