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 <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-05 09:55:33 +01:00
parent d0b53e39fd
commit 1bec049493
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-plugin-api': patch
---
Fixed inconsistent `JSX.Element` type reference in the `DialogApiDialog.update` method signature.
+1 -1
View File
@@ -866,7 +866,7 @@ export interface DialogApiDialog<TResult = void> {
result(): Promise<TResult>;
update(
elementOrComponent:
| React.JSX.Element
| JSX.Element
| ((props: { dialog: DialogApiDialog<TResult> }) => JSX.Element),
): void;
}
@@ -42,7 +42,7 @@ export interface DialogApiDialog<TResult = void> {
*/
update(
elementOrComponent:
| React.JSX.Element
| JSX.Element
| ((props: { dialog: DialogApiDialog<TResult> }) => JSX.Element),
): void;