Skip to main content

createServiceRef()

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

Creates a new service definition. This overload is used to create plugin scoped services.

Signature:

function createServiceRef<TService>(options: ServiceRefOptions<TService, 'plugin', 'singleton'>): ServiceRef<TService, 'plugin', 'singleton'>;

Parameters

Parameter

Type

Description

options

ServiceRefOptions<TService, 'plugin', 'singleton'>

**Returns:**

ServiceRef<TService, 'plugin', 'singleton'>