From a58fc22210ac0df11e47edb269a681c372f08648 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Tue, 8 Aug 2023 13:47:36 +0200 Subject: [PATCH] avoid exporting BackendFeatureFactory Signed-off-by: Vincenzo Scamporlino --- .../src/alpha/featureDiscoveryServiceFactory.ts | 6 ++---- packages/backend-plugin-api/alpha-api-report.md | 10 ---------- packages/backend-plugin-api/api-report.md | 10 ---------- packages/backend-plugin-api/src/alpha.ts | 4 ++-- packages/backend-plugin-api/src/wiring/index.ts | 1 - packages/backend-plugin-api/src/wiring/types.ts | 2 +- 6 files changed, 5 insertions(+), 28 deletions(-) diff --git a/packages/backend-app-api/src/alpha/featureDiscoveryServiceFactory.ts b/packages/backend-app-api/src/alpha/featureDiscoveryServiceFactory.ts index 7062448eb1..f9ee7edc5f 100644 --- a/packages/backend-app-api/src/alpha/featureDiscoveryServiceFactory.ts +++ b/packages/backend-app-api/src/alpha/featureDiscoveryServiceFactory.ts @@ -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' ); } diff --git a/packages/backend-plugin-api/alpha-api-report.md b/packages/backend-plugin-api/alpha-api-report.md index 29f78ed9d1..d76d7e4deb 100644 --- a/packages/backend-plugin-api/alpha-api-report.md +++ b/packages/backend-plugin-api/alpha-api-report.md @@ -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) diff --git a/packages/backend-plugin-api/api-report.md b/packages/backend-plugin-api/api-report.md index dc75c09b18..a1ae6284c6 100644 --- a/packages/backend-plugin-api/api-report.md +++ b/packages/backend-plugin-api/api-report.md @@ -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; diff --git a/packages/backend-plugin-api/src/alpha.ts b/packages/backend-plugin-api/src/alpha.ts index e3598dff5a..bd6be5b75e 100644 --- a/packages/backend-plugin-api/src/alpha.ts +++ b/packages/backend-plugin-api/src/alpha.ts @@ -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 }; diff --git a/packages/backend-plugin-api/src/wiring/index.ts b/packages/backend-plugin-api/src/wiring/index.ts index 0b7104374a..9cb767b8ac 100644 --- a/packages/backend-plugin-api/src/wiring/index.ts +++ b/packages/backend-plugin-api/src/wiring/index.ts @@ -28,6 +28,5 @@ export type { BackendModuleRegistrationPoints, BackendPluginRegistrationPoints, BackendFeature, - BackendFeatureFactory, ExtensionPoint, } from './types'; diff --git a/packages/backend-plugin-api/src/wiring/types.ts b/packages/backend-plugin-api/src/wiring/types.ts index b9b4f3ff10..028c2b87da 100644 --- a/packages/backend-plugin-api/src/wiring/types.ts +++ b/packages/backend-plugin-api/src/wiring/types.ts @@ -67,7 +67,7 @@ export interface BackendModuleRegistrationPoints { }): void; } -/** @public */ +/** @internal */ export interface BackendFeatureFactory< TOptions extends [options?: object] = [], > {