|
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | 16 |
|
17 | | -import { ComponentType } from 'react'; |
| 17 | +import { ComponentType, PropsWithChildren } from 'react'; |
18 | 18 | import { |
19 | 19 | AnyApiFactory, |
20 | 20 | AppTheme, |
@@ -67,12 +67,12 @@ export type ErrorBoundaryFallbackProps = { |
67 | 67 | * @public |
68 | 68 | */ |
69 | 69 | export type AppComponents = { |
70 | | - NotFoundErrorPage: ComponentType<{}>; |
| 70 | + NotFoundErrorPage: ComponentType<PropsWithChildren<{}>>; |
71 | 71 | BootErrorPage: ComponentType<BootErrorPageProps>; |
72 | | - Progress: ComponentType<{}>; |
| 72 | + Progress: ComponentType<PropsWithChildren<{}>>; |
73 | 73 | Router: ComponentType<{ basename?: string }>; |
74 | 74 | ErrorBoundaryFallback: ComponentType<ErrorBoundaryFallbackProps>; |
75 | | - ThemeProvider?: ComponentType<{}>; |
| 75 | + ThemeProvider?: ComponentType<PropsWithChildren<{}>>; |
76 | 76 |
|
77 | 77 | /** |
78 | 78 | * An optional sign-in page that will be rendered instead of the AppRouter at startup. |
@@ -319,23 +319,23 @@ export type BackstageApp = { |
319 | 319 | * ); |
320 | 320 | * ``` |
321 | 321 | */ |
322 | | - createRoot(element: JSX.Element): ComponentType<{}>; |
| 322 | + createRoot(element: JSX.Element): ComponentType<PropsWithChildren<{}>>; |
323 | 323 |
|
324 | 324 | /** |
325 | 325 | * Provider component that should wrap the Router created with getRouter() |
326 | 326 | * and any other components that need to be within the app context. |
327 | 327 | * |
328 | 328 | * @deprecated Use {@link BackstageApp.createRoot} instead. |
329 | 329 | */ |
330 | | - getProvider(): ComponentType<{}>; |
| 330 | + getProvider(): ComponentType<PropsWithChildren<{}>>; |
331 | 331 |
|
332 | 332 | /** |
333 | 333 | * Router component that should wrap the App Routes create with getRoutes() |
334 | 334 | * and any other components that should only be available while signed in. |
335 | 335 | * |
336 | 336 | * @deprecated Import and use the {@link AppRouter} component from `@backstage/core-app-api` instead |
337 | 337 | */ |
338 | | - getRouter(): ComponentType<{}>; |
| 338 | + getRouter(): ComponentType<PropsWithChildren<{}>>; |
339 | 339 | }; |
340 | 340 |
|
341 | 341 | /** |
|
0 commit comments