core-app-api: deprecate the BackstagePluginWithAnyOutput type

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-11-16 10:57:05 +01:00
parent eaeac8fdac
commit ecd1fcb80a
3 changed files with 18 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-app-api': patch
---
Deprecated the `BackstagePluginWithAnyOutput` type.
+9 -2
View File
@@ -197,7 +197,14 @@ export type AppOptions = {
icons: AppIcons & {
[key in string]: IconComponent;
};
plugins?: BackstagePluginWithAnyOutput[];
plugins?: (Omit<BackstagePlugin<any, any>, 'output'> & {
output(): (
| PluginOutput
| {
type: string;
}
)[];
})[];
components: AppComponents;
themes: (Partial<AppTheme> & Omit<AppTheme, 'theme'>)[];
configLoader?: AppConfigLoader;
@@ -269,7 +276,7 @@ export type BackstageApp = {
getRouter(): ComponentType<{}>;
};
// @public
// @public @deprecated
export type BackstagePluginWithAnyOutput = Omit<
BackstagePlugin<any, any>,
'output'
+4 -1
View File
@@ -200,6 +200,7 @@ export type AppRouteBinder = <
*
* @public
* @remarks
* @deprecated Will be removed
*
* The `type: string` type is there to handle output from newer or older plugin
* API versions that might not be supported by this version of the app API, but
@@ -246,7 +247,9 @@ export type AppOptions = {
/**
* A list of all plugins to include in the app.
*/
plugins?: BackstagePluginWithAnyOutput[];
plugins?: (Omit<BackstagePlugin<any, any>, 'output'> & {
output(): (PluginOutput | { type: string })[];
})[];
/**
* Supply components to the app to override the default ones.