diff --git a/CommonUI/src/Components/Detail/Detail.tsx b/CommonUI/src/Components/Detail/Detail.tsx index 4c8684c0bbf..68eb3f95b5c 100644 --- a/CommonUI/src/Components/Detail/Detail.tsx +++ b/CommonUI/src/Components/Detail/Detail.tsx @@ -27,7 +27,9 @@ export interface ComponentProps { showDetailsInNumberOfColumns?: number | undefined; } -const Detail = ( +type DetailFunction = (props: ComponentProps) => ReactElement; + +const Detail: DetailFunction = ( props: ComponentProps ): ReactElement => { type GetMarkdownViewerFunction = (text: string) => ReactElement; diff --git a/CommonUI/src/Components/List/List.tsx b/CommonUI/src/Components/List/List.tsx index 5c3c7c9b498..d47bd7791ef 100644 --- a/CommonUI/src/Components/List/List.tsx +++ b/CommonUI/src/Components/List/List.tsx @@ -42,7 +42,9 @@ export interface ComponentProps { onFilterRefreshClick?: undefined | (() => void); } -const List = ( +type ListFunction = (props: ComponentProps) => ReactElement; + +const List: ListFunction = ( props: ComponentProps ): ReactElement => { const getListbody: GetReactElementFunction = (): ReactElement => { diff --git a/CommonUI/src/Components/List/ListBody.tsx b/CommonUI/src/Components/List/ListBody.tsx index cbffdc6d1cf..2fd6f1b97a2 100644 --- a/CommonUI/src/Components/List/ListBody.tsx +++ b/CommonUI/src/Components/List/ListBody.tsx @@ -17,7 +17,9 @@ export interface ComponentProps { listDetailOptions?: undefined | ListDetailProps; } -const ListBody = ( +type ListBodyFunction = (props: ComponentProps) => ReactElement; + +const ListBody: ListBodyFunction = ( props: ComponentProps ): ReactElement => { type GetBodyFunction = (provided?: DroppableProvided) => ReactElement; diff --git a/CommonUI/src/Components/OrderedStatesList/Item.tsx b/CommonUI/src/Components/OrderedStatesList/Item.tsx index 2a6f6f4b7a3..a579940ff1a 100644 --- a/CommonUI/src/Components/OrderedStatesList/Item.tsx +++ b/CommonUI/src/Components/OrderedStatesList/Item.tsx @@ -13,7 +13,9 @@ export interface ComponentProps { getDescriptionElement?: ((item: T) => ReactElement) | undefined; } -const Item = ( +type ItemFunction = (props: ComponentProps) => ReactElement; + +const Item: ItemFunction = ( props: ComponentProps ): ReactElement => { const [isButtonLoading, setIsButtonLoading] = useState>( diff --git a/CommonUI/src/Components/OrderedStatesList/OrderedStatesList.tsx b/CommonUI/src/Components/OrderedStatesList/OrderedStatesList.tsx index 1f132e2697f..d1d7500e0a8 100644 --- a/CommonUI/src/Components/OrderedStatesList/OrderedStatesList.tsx +++ b/CommonUI/src/Components/OrderedStatesList/OrderedStatesList.tsx @@ -26,7 +26,11 @@ export interface ComponentProps { shouldAddItemInTheBeginning?: boolean | undefined; } -const OrderedStatesList = ( +type OrderedStatesListFunction = ( + props: ComponentProps +) => ReactElement; + +const OrderedStatesList: OrderedStatesListFunction = ( props: ComponentProps ): ReactElement => { if (props.isLoading) { diff --git a/CommonUI/src/Components/Table/TableRow.tsx b/CommonUI/src/Components/Table/TableRow.tsx index 6181b053107..414f98085f7 100644 --- a/CommonUI/src/Components/Table/TableRow.tsx +++ b/CommonUI/src/Components/Table/TableRow.tsx @@ -24,7 +24,7 @@ export interface ComponentProps { dragDropIndexField?: keyof T | undefined; } -type TableRowFunction = ( +type TableRowFunction = ( props: ComponentProps ) => ReactElement; diff --git a/Dashboard/src/Utils/SpanUtil.ts b/Dashboard/src/Utils/SpanUtil.ts index af41350bca4..48b5a09dad9 100644 --- a/Dashboard/src/Utils/SpanUtil.ts +++ b/Dashboard/src/Utils/SpanUtil.ts @@ -19,7 +19,7 @@ export default class SpanUtil { public static getSpanDurationAsString(data: { divisibilityFactor: DivisibilityFactor; spanDurationInUnixNano: number; - }) { + }): string { const { divisibilityFactor, spanDurationInUnixNano } = data; return `${Math.round( @@ -31,7 +31,7 @@ export default class SpanUtil { divisibilityFactor: DivisibilityFactor; timelineStartTimeUnixNano: number; spanStartTimeUnixNano: number; - }) { + }): string { const { divisibilityFactor, timelineStartTimeUnixNano, @@ -48,7 +48,7 @@ export default class SpanUtil { divisibilityFactor: DivisibilityFactor; timelineStartTimeUnixNano: number; spanEndTimeUnixNano: number; - }) { + }): string { const { divisibilityFactor, timelineStartTimeUnixNano,