update API reports for backend system factory function refactor

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-12 10:57:11 +01:00
parent ecbec4ec4c
commit d1e86013ef
21 changed files with 159 additions and 119 deletions
+15 -15
View File
@@ -23,7 +23,7 @@ export interface BackendFeature {
}
// @public (undocumented)
export interface BackendModuleConfig<TOptions> {
export interface BackendModuleConfig {
// (undocumented)
moduleId: string;
// (undocumented)
@@ -31,16 +31,15 @@ export interface BackendModuleConfig<TOptions> {
// (undocumented)
register(
reg: Omit<BackendRegistrationPoints, 'registerExtensionPoint'>,
options: TOptions,
): void;
}
// @public (undocumented)
export interface BackendPluginConfig<TOptions> {
export interface BackendPluginConfig {
// (undocumented)
id: string;
// (undocumented)
register(reg: BackendRegistrationPoints, options: TOptions): void;
register(reg: BackendRegistrationPoints): void;
}
// @public (undocumented)
@@ -113,14 +112,14 @@ export namespace coreServices {
}
// @public
export function createBackendModule<TOptions extends MaybeOptions = undefined>(
config: BackendModuleConfig<TOptions>,
): FactoryFunctionWithOptions<BackendFeature, TOptions>;
export function createBackendModule<TOptions extends [options?: object] = []>(
config: FactoryFunctionConfig<BackendModuleConfig, TOptions>,
): FactoryFunction<BackendFeature, TOptions>;
// @public (undocumented)
export function createBackendPlugin<TOptions extends MaybeOptions = undefined>(
config: BackendPluginConfig<TOptions>,
): FactoryFunctionWithOptions<BackendFeature, TOptions>;
export function createBackendPlugin<TOptions extends [options?: object] = []>(
config: FactoryFunctionConfig<BackendPluginConfig, TOptions>,
): FactoryFunction<BackendFeature, TOptions>;
// @public (undocumented)
export function createExtensionPoint<T>(
@@ -135,10 +134,13 @@ export function createServiceFactory<
TDeps extends {
[name in string]: ServiceRef<unknown>;
},
TOpts extends MaybeOptions = undefined,
TOpts extends [options?: object] = [],
>(
config: ServiceFactoryConfig<TService, TScope, TImpl, TDeps, TOpts>,
): FactoryFunctionWithOptions<ServiceFactory<TService>, TOpts>;
config: FactoryFunctionConfig<
ServiceFactoryConfig<TService, TScope, TImpl, TDeps>,
TOpts
>,
): FactoryFunction<ServiceFactory<TService>, TOpts>;
// @public
export function createServiceRef<TService>(
@@ -337,14 +339,12 @@ export interface ServiceFactoryConfig<
TDeps extends {
[name in string]: ServiceRef<unknown>;
},
TOpts extends MaybeOptions = undefined,
> {
// (undocumented)
deps: TDeps;
// (undocumented)
factory(
deps: ServiceRefsToInstances<TDeps, 'root'>,
options: TOpts,
): TScope extends 'root'
? Promise<TImpl>
: Promise<(deps: ServiceRefsToInstances<TDeps>) => Promise<TImpl>>;