backend-plugin-api: update ServiceFactory type to match new implementation

Co-authored-by: blam <ben@blam.sh>
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-13 16:06:20 +01:00
parent de42fa4ef4
commit d6f4b92097
@@ -64,9 +64,11 @@ export type ServiceFactory<TService = unknown> =
scope: 'plugin';
service: ServiceRef<TService, 'plugin'>;
deps: { [key in string]: ServiceRef<unknown> };
factory(deps: { [key in string]: unknown }): Promise<
(deps: { [key in string]: unknown }) => Promise<TService>
>;
createRootContext?(deps: { [key in string]: unknown }): Promise<unknown>;
factory(
deps: { [key in string]: unknown },
context: unknown,
): Promise<TService>;
};
/**