backend-plugin-api: simplified ServiceFactory type
Co-authored-by: Fredrik Adelöw <freben@gmail.com> Co-authored-by: Johan Haals <johan.haals@gmail.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
import { createSpecializedBackend } from '@backstage/backend-app-api';
|
||||
import {
|
||||
AnyServiceFactory,
|
||||
ServiceFactory,
|
||||
ServiceRef,
|
||||
createServiceFactory,
|
||||
BackendFeature,
|
||||
@@ -31,7 +31,7 @@ export interface TestBackendOptions<
|
||||
services?: readonly [
|
||||
...{
|
||||
[index in keyof TServices]:
|
||||
| AnyServiceFactory
|
||||
| ServiceFactory<TServices[index]>
|
||||
| [ServiceRef<TServices[index]>, Partial<TServices[index]>];
|
||||
},
|
||||
];
|
||||
@@ -68,7 +68,7 @@ export async function startTestBackend<
|
||||
factory: async () => async () => serviceDef[1],
|
||||
});
|
||||
}
|
||||
return serviceDef as AnyServiceFactory;
|
||||
return serviceDef as ServiceFactory;
|
||||
});
|
||||
|
||||
const backend = createSpecializedBackend({
|
||||
|
||||
Reference in New Issue
Block a user