diff --git a/Accounts/src/Reducers/changePassword.ts b/Accounts/src/Reducers/changePassword.ts index 9adec23596..90f27cf520 100755 --- a/Accounts/src/Reducers/changePassword.ts +++ b/Accounts/src/Reducers/changePassword.ts @@ -12,7 +12,7 @@ const initialState: $TSFixMe = { success: false, }; -export default function register(state = initialState, action: Action): void { +export default function register(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.CHANGEPASSWORD_REQUEST: return Object.assign({}, state, { diff --git a/Accounts/src/Reducers/login.ts b/Accounts/src/Reducers/login.ts index 5f49fbf0a2..9476a5306b 100755 --- a/Accounts/src/Reducers/login.ts +++ b/Accounts/src/Reducers/login.ts @@ -52,7 +52,7 @@ const initialState: $TSFixMe = { loginMethod: 'standard', }; -export default function register(state = initialState, action: Action): void { +export default function register(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case CHANGE_LOGIN: return Object.assign({}, state, { diff --git a/Accounts/src/Reducers/register.ts b/Accounts/src/Reducers/register.ts index 729a1be867..24f9a0ce01 100755 --- a/Accounts/src/Reducers/register.ts +++ b/Accounts/src/Reducers/register.ts @@ -47,7 +47,7 @@ const initialState: $TSFixMe = { email: null, }; -export default function register(state = initialState, action: Action): void { +export default function register(state: $TSFixMe = initialState, action: Action): void { let incCount: $TSFixMe, decCount: $TSFixMe, stage: $TSFixMe; switch (action.type) { case SIGNUP_REQUEST: diff --git a/Accounts/src/Reducers/resendToken.ts b/Accounts/src/Reducers/resendToken.ts index 518aa1b9f8..713bef8a54 100755 --- a/Accounts/src/Reducers/resendToken.ts +++ b/Accounts/src/Reducers/resendToken.ts @@ -13,7 +13,7 @@ const initialState: $TSFixMe = { success: false, }; -export default function register(state = initialState, action: Action): void { +export default function register(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case RESENDTOKEN_REQUEST: return Object.assign({}, state, { diff --git a/Accounts/src/Reducers/resetPassword.ts b/Accounts/src/Reducers/resetPassword.ts index 0813167079..9a55fe35d6 100755 --- a/Accounts/src/Reducers/resetPassword.ts +++ b/Accounts/src/Reducers/resetPassword.ts @@ -17,7 +17,7 @@ const initialState: $TSFixMe = { success: false, }; -export default function register(state = initialState, action: Action): void { +export default function register(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case PASSWORDRESET_REQUEST: return Object.assign({}, state, { diff --git a/AdminDashboard/src/Reducers/dashboard.ts b/AdminDashboard/src/Reducers/dashboard.ts index b74c5e5123..19b3f7304f 100644 --- a/AdminDashboard/src/Reducers/dashboard.ts +++ b/AdminDashboard/src/Reducers/dashboard.ts @@ -13,7 +13,7 @@ const initialState: $TSFixMe = { success: false, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case DASHBOARD_LOAD_REQUEST: return Object.assign({}, state, { diff --git a/AdminDashboard/src/Reducers/license.ts b/AdminDashboard/src/Reducers/license.ts index 62cad2709c..0dfd286574 100644 --- a/AdminDashboard/src/Reducers/license.ts +++ b/AdminDashboard/src/Reducers/license.ts @@ -25,7 +25,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case FETCH_LICENSE_REQUEST: return Object.assign({}, state, { diff --git a/AdminDashboard/src/Reducers/modal.ts b/AdminDashboard/src/Reducers/modal.ts index 619e372174..61dfa60bfe 100644 --- a/AdminDashboard/src/Reducers/modal.ts +++ b/AdminDashboard/src/Reducers/modal.ts @@ -7,7 +7,7 @@ const initialState: $TSFixMe = { feedbackModalVisble: false, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case OPEN_MODAL: return Object.assign({}, state, { diff --git a/AdminDashboard/src/Reducers/notifications.ts b/AdminDashboard/src/Reducers/notifications.ts index b341f18645..46413abbe1 100644 --- a/AdminDashboard/src/Reducers/notifications.ts +++ b/AdminDashboard/src/Reducers/notifications.ts @@ -21,7 +21,7 @@ const initialState: $TSFixMe = { notificationsPosition: 0, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case OPEN_NOTIFICATION_MENU: return Object.assign({}, state, { diff --git a/AdminDashboard/src/Reducers/page.ts b/AdminDashboard/src/Reducers/page.ts index 9d6cf5ef7b..d440ba3e88 100755 --- a/AdminDashboard/src/Reducers/page.ts +++ b/AdminDashboard/src/Reducers/page.ts @@ -12,7 +12,7 @@ const initialState: $TSFixMe = { sidenavopen: false, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case PAGE_LOAD_REQUEST: return Object.assign({}, state, { diff --git a/AdminDashboard/src/Reducers/probe.ts b/AdminDashboard/src/Reducers/probe.ts index edaa565f0f..a4e05a5cba 100644 --- a/AdminDashboard/src/Reducers/probe.ts +++ b/AdminDashboard/src/Reducers/probe.ts @@ -29,7 +29,7 @@ const initialState: $TSFixMe = { }, }; -export default function probes(state = initialState, action: Action): void { +export default function probes(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.PROBE_SUCCESS: return Object.assign({}, state, { diff --git a/AdminDashboard/src/Reducers/version.ts b/AdminDashboard/src/Reducers/version.ts index 8095a83ac9..d0f3c9b98d 100644 --- a/AdminDashboard/src/Reducers/version.ts +++ b/AdminDashboard/src/Reducers/version.ts @@ -20,7 +20,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case GET_VERSION_FAILED: return Object.assign({}, state, { diff --git a/Backend/test/alert.test.ts b/Backend/test/alert.test.ts index 63751bfd24..bab1e02861 100644 --- a/Backend/test/alert.test.ts +++ b/Backend/test/alert.test.ts @@ -58,7 +58,7 @@ describe('Alert API', (): void => { userId = res.body.id; ComponentModel.create({ name: 'Test Component' }).then( - (component: $TSFixMe) => { + (component: $TSFixMe) => { UserModel.findByIdAndUpdate( userId, { $set: { isVerified: true } }, diff --git a/Backend/test/enterpriseAlert.test.ts b/Backend/test/enterpriseAlert.test.ts index e7050b8f8d..4bb7b24287 100644 --- a/Backend/test/enterpriseAlert.test.ts +++ b/Backend/test/enterpriseAlert.test.ts @@ -39,7 +39,7 @@ describe('Enterprise Alert API', function (): void { projectId = project._id; ComponentModel.create({ name: 'New Component' }).then( - (component: $TSFixMe) => { + (component: $TSFixMe) => { request .post('/user/login') .send({ diff --git a/CommonServer/Services/StatusPageService.ts b/CommonServer/Services/StatusPageService.ts index 7656406002..56f93e79a9 100755 --- a/CommonServer/Services/StatusPageService.ts +++ b/CommonServer/Services/StatusPageService.ts @@ -1096,7 +1096,7 @@ public async getEvents( // do not repeat the same event two times events = eventIds.map((id: $TSFixMe) => { - return events.find(event => String(event._id) === String(id)); + return events.find((event : $TSFixMe) =>String(event._id) === String(id)); }); const count: $TSFixMe = events.length; @@ -1203,7 +1203,7 @@ public async getFutureEvents( // do not repeat the same event two times events = eventIds.map((id: $TSFixMe) => { - return events.find(event => String(event._id) === String(id)); + return events.find((event : $TSFixMe) =>String(event._id) === String(id)); }); // // sort in ascending start date @@ -1311,7 +1311,7 @@ public async getPastEvents( // do not repeat the same event two times events = eventIds.map((id: $TSFixMe) => { - return events.find(event => String(event._id) === String(id)); + return events.find((event : $TSFixMe) =>String(event._id) === String(id)); }); // sort in ascending start date diff --git a/CommonUI/src/reducers/modal.ts b/CommonUI/src/reducers/modal.ts index 33a97a865f..02f8f5d448 100755 --- a/CommonUI/src/reducers/modal.ts +++ b/CommonUI/src/reducers/modal.ts @@ -14,7 +14,7 @@ const initialState: InitialStateType = { }; export default ( - state = initialState, + state: $TSFixMe = initialState, action: ModalAction ): InitialStateType => { switch (action.type) { diff --git a/Dashboard/src/Actions/performanceTrackerMetric.ts b/Dashboard/src/Actions/performanceTrackerMetric.ts index 3946257b7b..bacf6bbebb 100644 --- a/Dashboard/src/Actions/performanceTrackerMetric.ts +++ b/Dashboard/src/Actions/performanceTrackerMetric.ts @@ -229,35 +229,50 @@ export const setErrorEndDate: Function = (date: $TSFixMe): void => { }; }; -export const resetTimeDate: Function = (startDate: $TSFixMe, endDate: $TSFixMe): void => { +export const resetTimeDate: Function = ( + startDate: $TSFixMe, + endDate: $TSFixMe +): void => { return { type: types.RESET_TIME_DATE, payload: { startDate, endDate }, }; }; -export const resetThroughputDate: Function = (startDate: $TSFixMe, endDate: $TSFixMe): void => { +export const resetThroughputDate: Function = ( + startDate: $TSFixMe, + endDate: $TSFixMe +): void => { return { type: types.RESET_THROUGHPUT_DATE, payload: { startDate, endDate }, }; }; -export const resetErrorDate: Function = (startDate: $TSFixMe, endDate: $TSFixMe): void => { +export const resetErrorDate: Function = ( + startDate: $TSFixMe, + endDate: $TSFixMe +): void => { return { type: types.RESET_ERROR_DATE, payload: { startDate, endDate }, }; }; -export const resetIncomingDate: Function = (startDate: $TSFixMe, endDate: $TSFixMe): void => { +export const resetIncomingDate: Function = ( + startDate: $TSFixMe, + endDate: $TSFixMe +): void => { return { type: types.RESET_INCOMING_DATE, payload: { startDate, endDate }, }; }; -export const resetOutgoingDate: Function = (startDate: $TSFixMe, endDate: $TSFixMe): void => { +export const resetOutgoingDate: Function = ( + startDate: $TSFixMe, + endDate: $TSFixMe +): void => { return { type: types.RESET_OUTGOING_DATE, payload: { startDate, endDate }, diff --git a/Dashboard/src/Reducers/alert.ts b/Dashboard/src/Reducers/alert.ts index 25043b9210..d11c3d6773 100755 --- a/Dashboard/src/Reducers/alert.ts +++ b/Dashboard/src/Reducers/alert.ts @@ -48,7 +48,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case types.ALERT_FETCH_SUCCESS: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/animateSidebar.ts b/Dashboard/src/Reducers/animateSidebar.ts index 6372daeb50..6a50b2e1ca 100644 --- a/Dashboard/src/Reducers/animateSidebar.ts +++ b/Dashboard/src/Reducers/animateSidebar.ts @@ -6,7 +6,7 @@ const initialState: $TSFixMe = { animateSidebar: false, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case ANIMATE_SIDEBAR: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/callRouting.ts b/Dashboard/src/Reducers/callRouting.ts index ec0d65e8ab..72c0746db5 100644 --- a/Dashboard/src/Reducers/callRouting.ts +++ b/Dashboard/src/Reducers/callRouting.ts @@ -78,7 +78,7 @@ const initialState: $TSFixMe = { }, }; -export default function card(state = initialState, action: Action): void { +export default function card(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.GET_CALL_ROUTING_NUMBERS_REQUEST: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/card.ts b/Dashboard/src/Reducers/card.ts index 94ff369ffa..05bfc5410c 100755 --- a/Dashboard/src/Reducers/card.ts +++ b/Dashboard/src/Reducers/card.ts @@ -30,7 +30,7 @@ const initialState: $TSFixMe = { }, }; -export default function card(state = initialState, action: Action): void { +export default function card(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.ADD_CARD_REQUEST: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/changePassword.ts b/Dashboard/src/Reducers/changePassword.ts index 9adec23596..90f27cf520 100755 --- a/Dashboard/src/Reducers/changePassword.ts +++ b/Dashboard/src/Reducers/changePassword.ts @@ -12,7 +12,7 @@ const initialState: $TSFixMe = { success: false, }; -export default function register(state = initialState, action: Action): void { +export default function register(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.CHANGEPASSWORD_REQUEST: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/credential.ts b/Dashboard/src/Reducers/credential.ts index 881c31b255..9d1f77e4fa 100644 --- a/Dashboard/src/Reducers/credential.ts +++ b/Dashboard/src/Reducers/credential.ts @@ -14,7 +14,7 @@ const initialState: $TSFixMe = { dockerSecurities: [], }; -export default function credential(state = initialState, action: Action): void { +export default function credential(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.ADD_GIT_CREDENTIAL_REQUEST: return { diff --git a/Dashboard/src/Reducers/customField.ts b/Dashboard/src/Reducers/customField.ts index c206eba7f8..93e1d06c30 100644 --- a/Dashboard/src/Reducers/customField.ts +++ b/Dashboard/src/Reducers/customField.ts @@ -22,7 +22,7 @@ const initialState: $TSFixMe = { }; export default function customField( - state = initialState, + state: $TSFixMe = initialState, action: Action ): void { switch (action.type) { diff --git a/Dashboard/src/Reducers/dateTime.ts b/Dashboard/src/Reducers/dateTime.ts index 6215fecd96..2f5d4c31b8 100644 --- a/Dashboard/src/Reducers/dateTime.ts +++ b/Dashboard/src/Reducers/dateTime.ts @@ -9,7 +9,7 @@ const initialState: $TSFixMe = { }, }; -export default function dateTime(state = initialState, action: Action): void { +export default function dateTime(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case 'SET_START_DATE': return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/emailTemplates.ts b/Dashboard/src/Reducers/emailTemplates.ts index 7aa789efa6..334a866e4f 100755 --- a/Dashboard/src/Reducers/emailTemplates.ts +++ b/Dashboard/src/Reducers/emailTemplates.ts @@ -35,7 +35,7 @@ const initialState: $TSFixMe = { showEmailSmtpConfiguration: false, }; -export default function incident(state = initialState, action: Action): void { +export default function incident(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.EMAIL_TEMPLATES_SUCCESS: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/feedback.ts b/Dashboard/src/Reducers/feedback.ts index c2e76f3eff..cf5ea11caa 100755 --- a/Dashboard/src/Reducers/feedback.ts +++ b/Dashboard/src/Reducers/feedback.ts @@ -18,7 +18,7 @@ const initialState: $TSFixMe = { feedbackModalVisble: false, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case OPEN_FEEDBACK_MODAL: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/groups.ts b/Dashboard/src/Reducers/groups.ts index bd14062fd0..62c3f4fcce 100644 --- a/Dashboard/src/Reducers/groups.ts +++ b/Dashboard/src/Reducers/groups.ts @@ -12,7 +12,7 @@ const initialState: $TSFixMe = { oncallDuty: [], }; -export default function groups(state = initialState, action: Action): void { +export default function groups(state: $TSFixMe = initialState, action: Action): void { let updatedGroup: $TSFixMe; switch (action.type) { case types.GET_GROUPS_REQUEST: diff --git a/Dashboard/src/Reducers/incident.ts b/Dashboard/src/Reducers/incident.ts index 46cd59cc21..54887b3ca3 100755 --- a/Dashboard/src/Reducers/incident.ts +++ b/Dashboard/src/Reducers/incident.ts @@ -84,7 +84,7 @@ const initialState: $TSFixMe = { activeIncident: null, }; -export default function incident(state = initialState, action: Action): void { +export default function incident(state: $TSFixMe = initialState, action: Action): void { let incident: $TSFixMe, incidents: $TSFixMe, unresolvedincidents: $TSFixMe, diff --git a/Dashboard/src/Reducers/incidentCommunicationSla.ts b/Dashboard/src/Reducers/incidentCommunicationSla.ts index 03cce1fd79..1b6279d19b 100644 --- a/Dashboard/src/Reducers/incidentCommunicationSla.ts +++ b/Dashboard/src/Reducers/incidentCommunicationSla.ts @@ -28,7 +28,7 @@ const initialState: $TSFixMe = { }; export default function incidentCommunicationSla( - state = initialState, + state: $TSFixMe = initialState, action: Action ): void { switch (action.type) { diff --git a/Dashboard/src/Reducers/incidentNoteTemplate.ts b/Dashboard/src/Reducers/incidentNoteTemplate.ts index a6704bd0c0..6085def37a 100644 --- a/Dashboard/src/Reducers/incidentNoteTemplate.ts +++ b/Dashboard/src/Reducers/incidentNoteTemplate.ts @@ -29,7 +29,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case types.FETCH_INCIDENT_NOTE_TEMPLATES_REQUEST: return { diff --git a/Dashboard/src/Reducers/incomingRequest.ts b/Dashboard/src/Reducers/incomingRequest.ts index 77b7a6a3b7..9cd253613c 100644 --- a/Dashboard/src/Reducers/incomingRequest.ts +++ b/Dashboard/src/Reducers/incomingRequest.ts @@ -33,7 +33,7 @@ const initialState: $TSFixMe = { }; export default function incomingRequest( - state = initialState, + state: $TSFixMe = initialState, action: Action ): void { switch (action.type) { diff --git a/Dashboard/src/Reducers/modal.ts b/Dashboard/src/Reducers/modal.ts index af1ca7f108..5b36db5a97 100755 --- a/Dashboard/src/Reducers/modal.ts +++ b/Dashboard/src/Reducers/modal.ts @@ -7,7 +7,7 @@ const initialState: $TSFixMe = { feedbackModalVisble: false, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case OPEN_MODAL: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/monitorCustomField.ts b/Dashboard/src/Reducers/monitorCustomField.ts index 022f6895a5..8e7139b9ee 100644 --- a/Dashboard/src/Reducers/monitorCustomField.ts +++ b/Dashboard/src/Reducers/monitorCustomField.ts @@ -21,7 +21,7 @@ const initialState: $TSFixMe = { }; export default function monitorCustomField( - state = initialState, + state: $TSFixMe = initialState, action: Action ): void { switch (action.type) { diff --git a/Dashboard/src/Reducers/monitorSla.ts b/Dashboard/src/Reducers/monitorSla.ts index b24f74a2cf..0211c9a10c 100644 --- a/Dashboard/src/Reducers/monitorSla.ts +++ b/Dashboard/src/Reducers/monitorSla.ts @@ -28,7 +28,7 @@ const initialState: $TSFixMe = { page: 1, }; -export default function monitorSla(state = initialState, action: Action): void { +export default function monitorSla(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.CREATE_MONITOR_SLA_REQUEST: return { diff --git a/Dashboard/src/Reducers/msteams.ts b/Dashboard/src/Reducers/msteams.ts index 1465515c4a..09c62e1c2a 100644 --- a/Dashboard/src/Reducers/msteams.ts +++ b/Dashboard/src/Reducers/msteams.ts @@ -52,7 +52,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { let msTeams: $TSFixMe, index: $TSFixMe, count: $TSFixMe; switch (action.type) { case GET_MS_TEAMS_FAILED: diff --git a/Dashboard/src/Reducers/notifications.ts b/Dashboard/src/Reducers/notifications.ts index 54026a2702..f2338e2136 100755 --- a/Dashboard/src/Reducers/notifications.ts +++ b/Dashboard/src/Reducers/notifications.ts @@ -24,7 +24,7 @@ const initialState: $TSFixMe = { notificationsPosition: 0, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case OPEN_NOTIFICATION_MENU: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/onCallSchedule.ts b/Dashboard/src/Reducers/onCallSchedule.ts index 20f6b4bc05..2b397db719 100644 --- a/Dashboard/src/Reducers/onCallSchedule.ts +++ b/Dashboard/src/Reducers/onCallSchedule.ts @@ -9,7 +9,7 @@ const initialState: $TSFixMe = { onCallScheduleModalVisble: false, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case OPEN_ONCALLSCHEDULE_MODAL: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/page.ts b/Dashboard/src/Reducers/page.ts index 3fad952c3c..15a7e092e8 100755 --- a/Dashboard/src/Reducers/page.ts +++ b/Dashboard/src/Reducers/page.ts @@ -14,7 +14,7 @@ const initialState: $TSFixMe = { toggleProjectSettingsMore: false, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case PAGE_LOAD_REQUEST: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/probe.ts b/Dashboard/src/Reducers/probe.ts index af1f7f94a7..13ee070da0 100644 --- a/Dashboard/src/Reducers/probe.ts +++ b/Dashboard/src/Reducers/probe.ts @@ -14,7 +14,7 @@ const initialState: $TSFixMe = { }, }; -export default function probes(state = initialState, action: Action): void { +export default function probes(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.PROBE_SUCCESS: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/project.ts b/Dashboard/src/Reducers/project.ts index c34ea1420a..db486a4031 100755 --- a/Dashboard/src/Reducers/project.ts +++ b/Dashboard/src/Reducers/project.ts @@ -128,7 +128,7 @@ const initialState: $TSFixMe = { }, }; -export default function project(state = initialState, action: Action): void { +export default function project(state: $TSFixMe = initialState, action: Action): void { let projects: $TSFixMe, newProjects: $TSFixMe; switch (action.type) { case types.CHANGE_DELETE_MODAL: diff --git a/Dashboard/src/Reducers/report.ts b/Dashboard/src/Reducers/report.ts index 7990199dc3..030858cd6e 100755 --- a/Dashboard/src/Reducers/report.ts +++ b/Dashboard/src/Reducers/report.ts @@ -31,7 +31,7 @@ const initialState: $TSFixMe = { }, }; -export default function incidents(state = initialState, action: Action): void { +export default function incidents(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.GET_ACTIVE_MEMBERS_REQUEST: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/schedule.ts b/Dashboard/src/Reducers/schedule.ts index 5a6e164739..c50d6ff7d4 100755 --- a/Dashboard/src/Reducers/schedule.ts +++ b/Dashboard/src/Reducers/schedule.ts @@ -125,7 +125,7 @@ const initialState: $TSFixMe = { }, }; -export default function schedule(state = initialState, action: Action): void { +export default function schedule(state: $TSFixMe = initialState, action: Action): void { let data: $TSFixMe, index: $TSFixMe, isExistingSchedule: $TSFixMe; switch (action.type) { case SCHEDULE_FETCH_SUCCESS: diff --git a/Dashboard/src/Reducers/scheduledEvent.ts b/Dashboard/src/Reducers/scheduledEvent.ts index 4a6345a2db..5125c83a5d 100755 --- a/Dashboard/src/Reducers/scheduledEvent.ts +++ b/Dashboard/src/Reducers/scheduledEvent.ts @@ -216,7 +216,7 @@ export default function scheduledEvent( if (!existingOngoingEvent) { if (startDate <= currentDate && endDate > currentDate) { events = state.subProjectOngoingScheduledEvent.events.map( - eventData => { + (eventData: $TSFixMe) => { if ( String(eventData.project) === String(action.payload.projectId._id) @@ -238,7 +238,7 @@ export default function scheduledEvent( const scheduledEvents: $TSFixMe = state.subProjectScheduledEventList.scheduledEvents.map( - event => { + (event : $TSFixMe) =>{ if ( String(event.project) === String(action.payload.projectId._id) @@ -338,7 +338,7 @@ export default function scheduledEvent( case FETCH_SCHEDULED_EVENTS_SUCCESS: { const scheduledEvents: $TSFixMe = state.subProjectScheduledEventList.scheduledEvents.map( - event => { + (event : $TSFixMe) =>{ if ( action.payload.data.length > 0 && String(event.project) === @@ -536,7 +536,7 @@ export default function scheduledEvent( const scheduledEvents: $TSFixMe = state.subProjectScheduledEventList.scheduledEvents.map( - subEvent => { + sub(event : $TSFixMe) =>{ if ( String(subEvent.project) === String(action.payload.projectId) @@ -596,7 +596,7 @@ export default function scheduledEvent( ...state.scheduledEventList, scheduledEvents: state.scheduledEventList.scheduledEvents.filter( - scheduledEvent => { + scheduled(event : $TSFixMe) =>{ if ( String(scheduledEvent._id) === String(action.payload._id) @@ -669,7 +669,7 @@ export default function scheduledEvent( ); const subEvents: $TSFixMe = state.subProjectScheduledEventList.scheduledEvents.map( - subEvent => { + sub(event : $TSFixMe) =>{ if ( String(subEvent.project) === String(action.payload.projectId._id) @@ -795,7 +795,7 @@ export default function scheduledEvent( ); const subEvents: $TSFixMe = state.subProjectScheduledEventList.scheduledEvents.map( - subEvent => { + sub(event : $TSFixMe) =>{ if ( String(subEvent.project) === String(action.payload.projectId._id) diff --git a/Dashboard/src/Reducers/search.ts b/Dashboard/src/Reducers/search.ts index 1d85be1d79..b04b243b1a 100644 --- a/Dashboard/src/Reducers/search.ts +++ b/Dashboard/src/Reducers/search.ts @@ -17,7 +17,7 @@ const initialState: $TSFixMe = { searchFieldVisible: false, }; -export default function search(state = initialState, action: Action): void { +export default function search(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case SHOW_SEARCH_BAR: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/security.ts b/Dashboard/src/Reducers/security.ts index aed08878e2..a7970f9f6e 100644 --- a/Dashboard/src/Reducers/security.ts +++ b/Dashboard/src/Reducers/security.ts @@ -43,7 +43,7 @@ const initialState: $TSFixMe = { activeApplicationSecurity: '', }; -export default function security(state = initialState, action: Action): void { +export default function security(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.ADD_CONTAINER_SECURITY_REQUEST: return { @@ -97,7 +97,7 @@ export default function security(state = initialState, action: Action): void { const securities: $TSFixMe = state.containerSecurities.securities.length > 0 ? state.containerSecurities.securities.map( - containerSecurity => { + (containerSecurity : $TSFixMe) =>{ if ( String(containerSecurity._id) === String(action.payload._id) @@ -192,7 +192,7 @@ export default function security(state = initialState, action: Action): void { // update the list of container securities const securities: $TSFixMe = state.containerSecurities.securities.filter( - containerSecurity => { + (containerSecurity : $TSFixMe) =>{ return ( String(containerSecurity._id) !== String(action.payload._id) @@ -410,7 +410,7 @@ export default function security(state = initialState, action: Action): void { const securities: $TSFixMe = state.applicationSecurities.securities.length > 0 ? state.applicationSecurities.securities.map( - applicationSecurity => { + (applicationSecurity : $TSFixMe) =>{ if ( String(applicationSecurity._id) === String(action.payload._id) @@ -505,7 +505,7 @@ export default function security(state = initialState, action: Action): void { // update the list of application securities const securities: $TSFixMe = state.applicationSecurities.securities.filter( - applicationSecurity => { + (applicationSecurity : $TSFixMe) =>{ return ( String(applicationSecurity._id) !== String(action.payload._id) diff --git a/Dashboard/src/Reducers/slack.ts b/Dashboard/src/Reducers/slack.ts index 79bfb13e99..5561906a50 100755 --- a/Dashboard/src/Reducers/slack.ts +++ b/Dashboard/src/Reducers/slack.ts @@ -31,7 +31,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { let teams: $TSFixMe, index: $TSFixMe, count: $TSFixMe; switch (action.type) { case GET_SLACK_TEAM_FAILED: diff --git a/Dashboard/src/Reducers/slackWebhooks.ts b/Dashboard/src/Reducers/slackWebhooks.ts index bc023c6e98..309081ed3a 100644 --- a/Dashboard/src/Reducers/slackWebhooks.ts +++ b/Dashboard/src/Reducers/slackWebhooks.ts @@ -52,7 +52,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { let slacks: $TSFixMe, index: $TSFixMe, count: $TSFixMe; switch (action.type) { case GET_SLACK_WEBHOOK_FAILED: diff --git a/Dashboard/src/Reducers/smsTemplates.ts b/Dashboard/src/Reducers/smsTemplates.ts index 90835756dc..ea856d0766 100755 --- a/Dashboard/src/Reducers/smsTemplates.ts +++ b/Dashboard/src/Reducers/smsTemplates.ts @@ -35,7 +35,7 @@ const initialState: $TSFixMe = { showSmsSmtpConfiguration: false, }; -export default function incident(state = initialState, action: Action): void { +export default function incident(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.SMS_TEMPLATES_SUCCESS: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/subProject.ts b/Dashboard/src/Reducers/subProject.ts index 7834dd2551..c902abe665 100755 --- a/Dashboard/src/Reducers/subProject.ts +++ b/Dashboard/src/Reducers/subProject.ts @@ -42,7 +42,7 @@ const initialState: $TSFixMe = { activeSubProject: null, }; -export default function subProject(state = initialState, action: Action): void { +export default function subProject(state: $TSFixMe = initialState, action: Action): void { let subProjects: $TSFixMe, index: $TSFixMe; switch (action.type) { case types.SUBPROJECTS_SUCCESS: diff --git a/Dashboard/src/Reducers/subscriber.ts b/Dashboard/src/Reducers/subscriber.ts index 1b1b731fee..c6cc1b7b42 100755 --- a/Dashboard/src/Reducers/subscriber.ts +++ b/Dashboard/src/Reducers/subscriber.ts @@ -40,7 +40,7 @@ const initialState: $TSFixMe = { }, }; -export default function subscriber(state = initialState, action: Action): void { +export default function subscriber(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.CREATE_SUBSCRIBER_RESET: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/team.ts b/Dashboard/src/Reducers/team.ts index 9efc69ab9f..9ce4774717 100755 --- a/Dashboard/src/Reducers/team.ts +++ b/Dashboard/src/Reducers/team.ts @@ -64,7 +64,7 @@ const initialState: $TSFixMe = { pages: {}, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case TEAM_LOADING_REQUEST: return { diff --git a/Dashboard/src/Reducers/tutorial.ts b/Dashboard/src/Reducers/tutorial.ts index ea63816e51..6864d7f68c 100644 --- a/Dashboard/src/Reducers/tutorial.ts +++ b/Dashboard/src/Reducers/tutorial.ts @@ -35,7 +35,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case FETCH_TUTORIAL_REQUEST: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/version.ts b/Dashboard/src/Reducers/version.ts index 1ff8a7b646..4a1b09970c 100644 --- a/Dashboard/src/Reducers/version.ts +++ b/Dashboard/src/Reducers/version.ts @@ -19,7 +19,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { switch (action.type) { case GET_VERSION_FAILED: return Object.assign({}, state, { diff --git a/Dashboard/src/Reducers/webHook.ts b/Dashboard/src/Reducers/webHook.ts index 742d6e7559..3a450b608c 100755 --- a/Dashboard/src/Reducers/webHook.ts +++ b/Dashboard/src/Reducers/webHook.ts @@ -52,7 +52,7 @@ const initialState: $TSFixMe = { }, }; -export default (state = initialState, action: Action): void => { +export default (state: $TSFixMe = initialState, action: Action): void => { let webHooks: $TSFixMe, index: $TSFixMe, count: $TSFixMe; switch (action.type) { case GET_WEB_HOOK_FAILED: diff --git a/JavaScriptSDK/src/cli/server-monitor/bin/index.ts b/JavaScriptSDK/src/cli/server-monitor/bin/index.ts index 4627706f3f..8f47b56a26 100644 --- a/JavaScriptSDK/src/cli/server-monitor/bin/index.ts +++ b/JavaScriptSDK/src/cli/server-monitor/bin/index.ts @@ -110,7 +110,7 @@ const checkParams: Function = (params: $TSFixMe): void => { * @return {Promise} The cli param value promise. */ -const getParamValue: Function = (params, name): void => { +const getParamValue: Function = (params: $TSFixMe, name: $TSFixMe): void => { const options: $TSFixMe = program.opts(); return new Promise((resolve: $TSFixMe) => { if (options[name] === true || options[name] === undefined) { diff --git a/JavaScriptSDK/src/cli/server-monitor/lib/api.ts b/JavaScriptSDK/src/cli/server-monitor/lib/api.ts index 688d3d1ab5..bddf1a4cbf 100644 --- a/JavaScriptSDK/src/cli/server-monitor/lib/api.ts +++ b/JavaScriptSDK/src/cli/server-monitor/lib/api.ts @@ -29,7 +29,7 @@ const ping: Function = ( monitorId: $TSFixMe, apiUrl: URL, apiKey: string, - interval = '* * * * *', + interval: $TSFixMe = '* * * * *', simulate: $TSFixMe, simulateData: $TSFixMe ): void => { diff --git a/StatusPage/src/Reducer/validateToken.ts b/StatusPage/src/Reducer/validateToken.ts index b209d1d1c2..db7bf8d9d0 100755 --- a/StatusPage/src/Reducer/validateToken.ts +++ b/StatusPage/src/Reducer/validateToken.ts @@ -15,7 +15,7 @@ const initialState: $TSFixMe = { success: false, }; -export default function register(state = initialState, action: Action): void { +export default function register(state: $TSFixMe = initialState, action: Action): void { switch (action.type) { case types.VALIDATE_TOKEN_REQUEST: return Object.assign({}, state, {