Skip to content

Commit 70e544d

Browse files
committed
chore: type modified
1 parent 55cf9b5 commit 70e544d

File tree

1 file changed

+11
-3
lines changed
  • src/Pages/App/Configurations/WorkflowEditor/SourceMaterialsSelector

1 file changed

+11
-3
lines changed

src/Pages/App/Configurations/WorkflowEditor/SourceMaterialsSelector/types.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,22 @@
1616

1717
import { CustomInputProps, MaterialType, SelectPickerProps } from '@devtron-labs/devtron-fe-common-lib'
1818

19-
export interface SourceMaterialsSelectorProps {
20-
repoName?: string
19+
type CommonSourceTypeProps = {
2120
sourceTypePickerProps: Omit<
2221
SelectPickerProps<string | number, false>,
2322
'required' | 'isClearable' | 'closeMenuOnSelect' | 'size'
2423
>
2524
branchInputProps: Omit<CustomInputProps, 'required' | 'type'> & {
2625
hideInput?: boolean
2726
}
28-
gitURL?: MaterialType['url']
2927
}
28+
29+
export type SourceMaterialsSelectorProps =
30+
| (CommonSourceTypeProps & {
31+
repoName: string
32+
gitURL: MaterialType['url']
33+
})
34+
| (CommonSourceTypeProps & {
35+
repoName?: never
36+
gitURL?: never
37+
})

0 commit comments

Comments
 (0)