Skip to main content

createServiceFactory()

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

Creates a plugin scoped service factory without options.

Signature:

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

Parameters

Parameter

Type

Description

options

PluginServiceFactoryOptions<TService, TInstances, TContext, TImpl, TDeps>

The service factory configuration.

**Returns:**

ServiceFactory<TService, 'plugin', TInstances>