set PropsWithChildren as explicit type on components
Signed-off-by: Oleg S <97077423+RobotSail@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ export type NextRouterProps = {
|
||||
TemplateCardComponent?: React_2.ComponentType<{
|
||||
template: TemplateEntityV1beta3;
|
||||
}>;
|
||||
TaskPageComponent?: React_2.ComponentType<{}>;
|
||||
TaskPageComponent?: React_2.ComponentType<PropsWithChildren<{}>>;
|
||||
TemplateOutputsComponent?: React_2.ComponentType<{
|
||||
output?: ScaffolderTaskOutput;
|
||||
}>;
|
||||
|
||||
@@ -29,6 +29,7 @@ import { ListActionsResponse as ListActionsResponse_2 } from '@backstage/plugin-
|
||||
import { LogEvent as LogEvent_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { Observable } from '@backstage/types';
|
||||
import { PathParams } from '@backstage/core-plugin-api';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { default as React_2 } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
@@ -382,7 +383,7 @@ export type RouterProps = {
|
||||
template: TemplateEntityV1beta3;
|
||||
}>
|
||||
| undefined;
|
||||
TaskPageComponent?: ComponentType<{}>;
|
||||
TaskPageComponent?: ComponentType<PropsWithChildren<{}>>;
|
||||
};
|
||||
groups?: Array<{
|
||||
title?: React_2.ReactNode;
|
||||
@@ -466,7 +467,9 @@ export type ScaffolderGetIntegrationsListResponse =
|
||||
ScaffolderGetIntegrationsListResponse_2;
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export const ScaffolderLayouts: ComponentType<{}>;
|
||||
export const ScaffolderLayouts: ComponentType<{
|
||||
children?: ReactNode;
|
||||
}>;
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderOutputlink = ScaffolderOutputLink;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { ComponentType, useEffect } from 'react';
|
||||
import React, { ComponentType, useEffect, PropsWithChildren } from 'react';
|
||||
import { Navigate, Route, Routes, useOutlet } from 'react-router-dom';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
@@ -52,7 +52,7 @@ export type RouterProps = {
|
||||
TemplateCardComponent?:
|
||||
| ComponentType<{ template: TemplateEntityV1beta3 }>
|
||||
| undefined;
|
||||
TaskPageComponent?: ComponentType<{}>;
|
||||
TaskPageComponent?: ComponentType<PropsWithChildren<{}>>;
|
||||
};
|
||||
groups?: Array<{
|
||||
title?: React.ReactNode;
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('<EntityPicker />', () => {
|
||||
getLocationByRef: jest.fn(),
|
||||
removeEntityByUid: jest.fn(),
|
||||
} as any;
|
||||
let Wrapper: React.ComponentType;
|
||||
let Wrapper: React.ComponentType<React.PropsWithChildren<{}>>;
|
||||
|
||||
beforeEach(() => {
|
||||
entities = [
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('<OwnerPicker />', () => {
|
||||
getLocationByRef: jest.fn(),
|
||||
removeEntityByUid: jest.fn(),
|
||||
} as any;
|
||||
let Wrapper: React.ComponentType;
|
||||
let Wrapper: React.ComponentType<React.PropsWithChildren<{}>>;
|
||||
|
||||
beforeEach(() => {
|
||||
entities = [
|
||||
|
||||
@@ -58,7 +58,7 @@ export type NextRouterProps = {
|
||||
TemplateCardComponent?: React.ComponentType<{
|
||||
template: TemplateEntityV1beta3;
|
||||
}>;
|
||||
TaskPageComponent?: React.ComponentType<{}>;
|
||||
TaskPageComponent?: React.ComponentType<PropsWithChildren<{}>>;
|
||||
TemplateOutputsComponent?: React.ComponentType<{
|
||||
output?: ScaffolderTaskOutput;
|
||||
}>;
|
||||
|
||||
Reference in New Issue
Block a user