backend-plugin-api: Remove ServiceFactoryOrFunction type

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2024-08-21 15:21:25 +02:00
parent 337a4704a6
commit 4d82481c95
4 changed files with 5 additions and 12 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-plugin-api': minor
---
Removed deprecated `ServiceFactoryOrFunction` type.
@@ -623,9 +623,6 @@ export interface ServiceFactory<
service: ServiceRef<TService, TScope, TInstances>;
}
// @public @deprecated
export type ServiceFactoryOrFunction = ServiceFactory | (() => ServiceFactory);
// @public
export type ServiceRef<
TService,
@@ -20,6 +20,5 @@ export type {
ServiceFactory,
PluginServiceFactoryOptions,
RootServiceFactoryOptions,
ServiceFactoryOrFunction,
} from './types';
export { createServiceRef, createServiceFactory } from './types';
@@ -76,14 +76,6 @@ export interface InternalServiceFactory<
): Promise<TService>;
}
/**
* Represents either a {@link ServiceFactory} or a function that returns one.
*
* @deprecated The support for service factory functions is deprecated and will be removed.
* @public
*/
export type ServiceFactoryOrFunction = ServiceFactory | (() => ServiceFactory);
/** @public */
export interface ServiceRefOptions<
TService,