From 1bec0494939c8108cacd636ac7c0295cb5c99a2b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 5 Mar 2026 09:55:33 +0100 Subject: [PATCH] Fix JSX type reference inconsistency in DialogApiDialog The `update` method used `React.JSX.Element` for the first union member and plain `JSX.Element` for the second. These resolve to the same type but the inconsistency within a single method signature is confusing. Aligned both to use `JSX.Element` to match the rest of the file. Signed-off-by: Patrik Oldsberg Made-with: Cursor --- .changeset/fix-dialog-api-jsx-type.md | 5 +++++ packages/frontend-plugin-api/report.api.md | 2 +- .../frontend-plugin-api/src/apis/definitions/DialogApi.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/fix-dialog-api-jsx-type.md diff --git a/.changeset/fix-dialog-api-jsx-type.md b/.changeset/fix-dialog-api-jsx-type.md new file mode 100644 index 0000000000..67ece8913b --- /dev/null +++ b/.changeset/fix-dialog-api-jsx-type.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-plugin-api': patch +--- + +Fixed inconsistent `JSX.Element` type reference in the `DialogApiDialog.update` method signature. diff --git a/packages/frontend-plugin-api/report.api.md b/packages/frontend-plugin-api/report.api.md index c83511fc47..8118e949c4 100644 --- a/packages/frontend-plugin-api/report.api.md +++ b/packages/frontend-plugin-api/report.api.md @@ -866,7 +866,7 @@ export interface DialogApiDialog { result(): Promise; update( elementOrComponent: - | React.JSX.Element + | JSX.Element | ((props: { dialog: DialogApiDialog }) => JSX.Element), ): void; } diff --git a/packages/frontend-plugin-api/src/apis/definitions/DialogApi.ts b/packages/frontend-plugin-api/src/apis/definitions/DialogApi.ts index 85151b05f6..d7ab2e5d75 100644 --- a/packages/frontend-plugin-api/src/apis/definitions/DialogApi.ts +++ b/packages/frontend-plugin-api/src/apis/definitions/DialogApi.ts @@ -42,7 +42,7 @@ export interface DialogApiDialog { */ update( elementOrComponent: - | React.JSX.Element + | JSX.Element | ((props: { dialog: DialogApiDialog }) => JSX.Element), ): void;