Update typings for RouterOptions::actions and ScaffolderActionsExtensionPoint::addActions to allow any kind of action being assigned to it.
Signed-off-by: Andreas Berger <andreas@berger-ecommerce.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
'@backstage/plugin-scaffolder-node': patch
|
||||
---
|
||||
|
||||
Update typing for `RouterOptions::actions` and `ScaffolderActionsExtensionPoint::addActions` to allow any kind of action being assigned to it.
|
||||
@@ -91,7 +91,7 @@ export const scaffolderPlugin: (
|
||||
|
||||
// @alpha
|
||||
export type ScaffolderPluginOptions = {
|
||||
actions?: TemplateAction<any>[];
|
||||
actions?: TemplateAction<any, any>[];
|
||||
taskWorkers?: number;
|
||||
taskBroker?: TaskBroker;
|
||||
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
||||
|
||||
@@ -746,7 +746,7 @@ export type OctokitWithPullRequestPluginClient = Octokit & {
|
||||
// @public
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
actions?: TemplateAction_2<any>[];
|
||||
actions?: TemplateAction_2<any, any>[];
|
||||
// (undocumented)
|
||||
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
||||
// (undocumented)
|
||||
|
||||
@@ -40,7 +40,7 @@ import { createRouter } from './service/router';
|
||||
* @alpha
|
||||
*/
|
||||
export type ScaffolderPluginOptions = {
|
||||
actions?: TemplateAction<any>[];
|
||||
actions?: TemplateAction<any, any>[];
|
||||
taskWorkers?: number;
|
||||
taskBroker?: TaskBroker;
|
||||
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
||||
@@ -50,7 +50,7 @@ export type ScaffolderPluginOptions = {
|
||||
class ScaffolderActionsExtensionPointImpl
|
||||
implements ScaffolderActionsExtensionPoint
|
||||
{
|
||||
#actions = new Array<TemplateAction<any>>();
|
||||
#actions = new Array<TemplateAction<any, any>>();
|
||||
|
||||
addActions(...actions: TemplateAction<any>[]): void {
|
||||
this.#actions.push(...actions);
|
||||
|
||||
@@ -98,7 +98,7 @@ export interface RouterOptions {
|
||||
database: PluginDatabaseManager;
|
||||
catalogClient: CatalogApi;
|
||||
scheduler?: PluginTaskScheduler;
|
||||
actions?: TemplateAction<any>[];
|
||||
actions?: TemplateAction<any, any>[];
|
||||
/**
|
||||
* @deprecated taskWorkers is deprecated in favor of concurrentTasksLimit option with a single TaskWorker
|
||||
* @defaultValue 1
|
||||
|
||||
@@ -70,7 +70,7 @@ export const createTemplateAction: <
|
||||
// @alpha
|
||||
export interface ScaffolderActionsExtensionPoint {
|
||||
// (undocumented)
|
||||
addActions(...actions: TemplateAction<any>[]): void;
|
||||
addActions(...actions: TemplateAction<any, any>[]): void;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
|
||||
@@ -23,7 +23,7 @@ import { TemplateAction } from './actions';
|
||||
* @alpha
|
||||
*/
|
||||
export interface ScaffolderActionsExtensionPoint {
|
||||
addActions(...actions: TemplateAction<any>[]): void;
|
||||
addActions(...actions: TemplateAction<any, any>[]): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user