Do not unpack arguments directly on exported items

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-12-07 19:42:10 +01:00
parent 95ab7baba6
commit dcd1a0c3f4
66 changed files with 433 additions and 708 deletions
+5 -12
View File
@@ -38,11 +38,7 @@ function createStatusColumn(): TableColumn<GithubDeployment>;
// Warning: (ae-missing-release-tag) "EntityGithubDeploymentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityGithubDeploymentsCard: ({
last,
lastStatuses,
columns,
}: {
export const EntityGithubDeploymentsCard: (props: {
last?: number | undefined;
lastStatuses?: number | undefined;
columns?: TableColumn<GithubDeployment>[] | undefined;
@@ -58,12 +54,9 @@ export const githubDeploymentsPlugin: BackstagePlugin<{}, {}>;
// Warning: (ae-missing-release-tag) "GithubDeploymentsTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function GithubDeploymentsTable({
deployments,
isLoading,
reload,
columns,
}: GithubDeploymentsTableProps): JSX.Element;
export function GithubDeploymentsTable(
props: GithubDeploymentsTableProps,
): JSX.Element;
// @public (undocumented)
export namespace GithubDeploymentsTable {
@@ -78,7 +71,7 @@ export namespace GithubDeploymentsTable {
// Warning: (ae-missing-release-tag) "GithubStateIndicator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
const GithubStateIndicator: ({ state }: { state: string }) => JSX.Element;
const GithubStateIndicator: (props: { state: string }) => JSX.Element;
// Warning: (ae-missing-release-tag) "isGithubDeploymentsAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -80,15 +80,12 @@ const GithubDeploymentsComponent = ({
);
};
export const GithubDeploymentsCard = ({
last,
lastStatuses,
columns,
}: {
export const GithubDeploymentsCard = (props: {
last?: number;
lastStatuses?: number;
columns?: TableColumn<GithubDeployment>[];
}) => {
const { last, lastStatuses, columns } = props;
const { entity } = useEntity();
const [host] = [
entity?.metadata.annotations?.[SOURCE_LOCATION_ANNOTATION],
@@ -36,12 +36,8 @@ type GithubDeploymentsTableProps = {
columns: TableColumn<GithubDeployment>[];
};
export function GithubDeploymentsTable({
deployments,
isLoading,
reload,
columns,
}: GithubDeploymentsTableProps) {
export function GithubDeploymentsTable(props: GithubDeploymentsTableProps) {
const { deployments, isLoading, reload, columns } = props;
const classes = useStyles();
return (
@@ -27,8 +27,8 @@ import {
Link,
} from '@backstage/core-components';
export const GithubStateIndicator = ({ state }: { state: string }) => {
switch (state) {
export const GithubStateIndicator = (props: { state: string }) => {
switch (props.state) {
case 'PENDING':
return <StatusPending />;
case 'IN_PROGRESS':