chore: smol updates from pr review

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-08-28 11:55:05 +02:00
parent 3530a64deb
commit e0ca667207
18 changed files with 83 additions and 47 deletions
+16 -19
View File
@@ -749,7 +749,20 @@ export function createExternalRouteRef<
export function createFrontendModule<
TId extends string,
TExtensions extends readonly ExtensionDefinition[] = [],
>(options: FrontendModuleOptions<TId, TExtensions>): FrontendModule;
>(options: CreateFrontendModuleOptions<TId, TExtensions>): FrontendModule;
// @public (undocumented)
export interface CreateFrontendModuleOptions<
TPluginId extends string,
TExtensions extends readonly ExtensionDefinition[],
> {
// (undocumented)
extensions?: TExtensions;
// (undocumented)
featureFlags?: FeatureFlagConfig[];
// (undocumented)
pluginId: TPluginId;
}
// @public (undocumented)
export function createFrontendPlugin<
@@ -1232,11 +1245,8 @@ export { FetchApi };
export { fetchApiRef };
// @public (undocumented)
export type FrontendFeature =
| FrontendPlugin
| FrontendModule
| ExtensionOverrides;
// @public @deprecated (undocumented)
export type FrontendFeature = FrontendPlugin | ExtensionOverrides;
// @public (undocumented)
export interface FrontendModule {
@@ -1246,19 +1256,6 @@ export interface FrontendModule {
readonly pluginId: string;
}
// @public (undocumented)
export interface FrontendModuleOptions<
TPluginId extends string,
TExtensions extends readonly ExtensionDefinition[],
> {
// (undocumented)
extensions?: TExtensions;
// (undocumented)
featureFlags?: FeatureFlagConfig[];
// (undocumented)
pluginId: TPluginId;
}
// @public (undocumented)
export interface FrontendPlugin<
TRoutes extends AnyRoutes = AnyRoutes,
@@ -26,7 +26,7 @@ import {
import { FeatureFlagConfig } from './types';
/** @public */
export interface FrontendModuleOptions<
export interface CreateFrontendModuleOptions<
TPluginId extends string,
TExtensions extends readonly ExtensionDefinition[],
> {
@@ -52,7 +52,7 @@ export interface InternalFrontendModule extends FrontendModule {
export function createFrontendModule<
TId extends string,
TExtensions extends readonly ExtensionDefinition[] = [],
>(options: FrontendModuleOptions<TId, TExtensions>): FrontendModule {
>(options: CreateFrontendModuleOptions<TId, TExtensions>): FrontendModule {
const { pluginId } = options;
const extensions = new Array<Extension<any>>();
@@ -51,7 +51,6 @@ export type BackstagePlugin<
TExternalRoutes extends AnyExternalRoutes = AnyExternalRoutes,
TExtensionMap extends { [id in string]: ExtensionDefinition } = {},
> = FrontendPlugin<TRoutes, TExternalRoutes, TExtensionMap>;
/** @public */
export interface PluginOptions<
TId extends string,
@@ -46,7 +46,7 @@ export {
export {
createFrontendModule,
type FrontendModule,
type FrontendModuleOptions,
type CreateFrontendModuleOptions,
} from './createFrontendModule';
export {
createExtensionOverrides,
@@ -16,7 +16,6 @@
import { ExternalRouteRef, RouteRef, SubRouteRef } from '../routing';
import { ExtensionDefinition } from './createExtension';
import { FrontendModule } from './createFrontendModule';
import { FrontendPlugin } from './createFrontendPlugin';
/**
@@ -47,8 +46,8 @@ export interface ExtensionOverrides {
readonly $$type: '@backstage/ExtensionOverrides';
}
/** @public */
export type FrontendFeature =
| FrontendPlugin
| FrontendModule
| ExtensionOverrides;
/**
* @public
* @deprecated import from {@link @backstage/frontend-app-api#FrontendFeature} instead
*/
export type FrontendFeature = FrontendPlugin | ExtensionOverrides;