backend-plugin-api: add ServiceFactoryOrFunction type

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-03 13:45:50 +01:00
parent 043f4e5678
commit ecc6bfe4c9
9 changed files with 36 additions and 9 deletions
@@ -32,7 +32,7 @@ import {
tokenManagerFactory,
urlReaderFactory,
} from '@backstage/backend-app-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
import { ServiceFactoryOrFunction } from '@backstage/backend-plugin-api';
export const defaultServiceFactories = [
cacheFactory(),
@@ -55,7 +55,7 @@ export const defaultServiceFactories = [
* @public
*/
export interface CreateBackendOptions {
services?: (ServiceFactory | (() => ServiceFactory))[];
services?: ServiceFactoryOrFunction[];
}
/**