File tree 2 files changed +20
-7
lines changed
components/WorkspaceScheduleForm
2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,6 @@ export interface WorkspaceScheduleFormValues {
99
99
ttl : number
100
100
}
101
101
102
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
103
102
export const validationSchema = Yup . object ( {
104
103
sunday : Yup . boolean ( ) ,
105
104
monday : Yup . boolean ( ) . test (
Original file line number Diff line number Diff line change @@ -814,15 +814,29 @@ export const MockCancellationMessage = {
814
814
message : "Job successfully canceled" ,
815
815
}
816
816
817
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
818
- export const makeMockApiError = ( {
819
- message,
820
- detail,
821
- validations,
822
- } : {
817
+ type MockAPIInput = {
823
818
message ?: string
824
819
detail ?: string
825
820
validations ?: FieldError [ ]
821
+ }
822
+
823
+ type MockAPIOutput = {
824
+ response : {
825
+ data : {
826
+ message : string
827
+ detail : string | undefined
828
+ validations : FieldError [ ] | undefined
829
+ }
830
+ }
831
+ isAxiosError : boolean
832
+ }
833
+
834
+ type MakeMockApiErrorFunction = ( input : MockAPIInput ) => MockAPIOutput
835
+
836
+ export const makeMockApiError : MakeMockApiErrorFunction = ( {
837
+ message,
838
+ detail,
839
+ validations,
826
840
} ) => ( {
827
841
response : {
828
842
data : {
You can’t perform that action at this time.
0 commit comments