Skip to content

Commit bd90102

Browse files
committed
chore(ui/ingest): add type annotations to mapSourceTypeAliases
1 parent 97be3f1 commit bd90102

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

datahub-web-react/src/app/ingest/source/IngestionSourceList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ enum IngestionSourceType {
105105

106106
const DEFAULT_PAGE_SIZE = 25;
107107

108-
const mapSourceTypeAliases = (source) => {
108+
const mapSourceTypeAliases = <T extends { type: string }>(source?: T): T | undefined => {
109109
if (source) {
110110
let { type } = source;
111111
if (type === 'unity-catalog') {

datahub-web-react/src/app/ingestV2/source/IngestionSourceList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export enum IngestionSourceType {
114114

115115
const DEFAULT_PAGE_SIZE = 25;
116116

117-
const mapSourceTypeAliases = (source) => {
117+
const mapSourceTypeAliases = <T extends { type: string }>(source?: T): T | undefined => {
118118
if (source) {
119119
let { type } = source;
120120
if (type === 'unity-catalog') {

0 commit comments

Comments
 (0)