backend-app-api: disallow required service factory options
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -49,10 +49,10 @@ function toInternalServiceFactory<TService, TScope extends 'plugin' | 'root'>(
|
||||
}
|
||||
|
||||
const pluginMetadataServiceFactory = createServiceFactory(
|
||||
(options: { pluginId: string }) => ({
|
||||
(options?: { pluginId: string }) => ({
|
||||
service: coreServices.pluginMetadata,
|
||||
deps: {},
|
||||
factory: async () => ({ getId: () => options.pluginId }),
|
||||
factory: async () => ({ getId: () => options?.pluginId! }),
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user