Skip to content

Commit c5a34ef

Browse files
committed
chore(ui/ingest): add type annotations to mapSourceTypeAliases
1 parent a63ab5c commit c5a34ef

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
@@ -116,7 +116,7 @@ export enum IngestionSourceType {
116116

117117
const DEFAULT_PAGE_SIZE = 25;
118118

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

0 commit comments

Comments
 (0)