avoid exporting BackendFeatureFactory
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
import {
|
||||
BackendFeature,
|
||||
BackendFeatureFactory,
|
||||
RootConfigService,
|
||||
coreServices,
|
||||
createServiceFactory,
|
||||
@@ -121,11 +120,10 @@ function isBackendFeature(value: unknown): value is BackendFeature {
|
||||
|
||||
function isBackendFeatureFactory(
|
||||
value: unknown,
|
||||
): value is BackendFeatureFactory {
|
||||
): value is () => BackendFeature {
|
||||
return (
|
||||
!!value &&
|
||||
typeof value === 'function' &&
|
||||
(value as BackendFeatureFactory).$$type ===
|
||||
'@backstage/BackendFeatureFactory'
|
||||
(value as any).$$type === '@backstage/BackendFeatureFactory'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,16 +9,6 @@ export interface BackendFeature {
|
||||
$$type: '@backstage/BackendFeature';
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface BackendFeatureFactory<
|
||||
TOptions extends [options?: object] = [],
|
||||
> {
|
||||
// (undocumented)
|
||||
$$type: '@backstage/BackendFeatureFactory';
|
||||
// (undocumented)
|
||||
(...options: TOptions): BackendFeature;
|
||||
}
|
||||
|
||||
// @alpha (undocumented)
|
||||
export interface FeatureDiscoveryService {
|
||||
// (undocumented)
|
||||
|
||||
@@ -21,16 +21,6 @@ export interface BackendFeature {
|
||||
$$type: '@backstage/BackendFeature';
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface BackendFeatureFactory<
|
||||
TOptions extends [options?: object] = [],
|
||||
> {
|
||||
// (undocumented)
|
||||
$$type: '@backstage/BackendFeatureFactory';
|
||||
// (undocumented)
|
||||
(...options: TOptions): BackendFeature;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface BackendModuleConfig {
|
||||
moduleId: string;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { createServiceRef } from './services';
|
||||
import { BackendFeature, BackendFeatureFactory } from './wiring';
|
||||
import { BackendFeature } from './wiring';
|
||||
|
||||
/** @alpha */
|
||||
export interface FeatureDiscoveryService {
|
||||
@@ -33,4 +33,4 @@ export const featureDiscoveryServiceRef =
|
||||
});
|
||||
|
||||
export type { ServiceRef } from './services';
|
||||
export type { BackendFeature, BackendFeatureFactory };
|
||||
export type { BackendFeature };
|
||||
|
||||
@@ -28,6 +28,5 @@ export type {
|
||||
BackendModuleRegistrationPoints,
|
||||
BackendPluginRegistrationPoints,
|
||||
BackendFeature,
|
||||
BackendFeatureFactory,
|
||||
ExtensionPoint,
|
||||
} from './types';
|
||||
|
||||
@@ -67,7 +67,7 @@ export interface BackendModuleRegistrationPoints {
|
||||
}): void;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
/** @internal */
|
||||
export interface BackendFeatureFactory<
|
||||
TOptions extends [options?: object] = [],
|
||||
> {
|
||||
|
||||
Reference in New Issue
Block a user