From ab480a35bd89fcc84fae7bc5da6e8e48e46f82c4 Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Tue, 22 Mar 2022 09:30:31 +0000 Subject: [PATCH] remove ts-expect --- accounts/package.json | 1 + accounts/src/App.tsx | 14 +- accounts/src/components/404.tsx | 2 +- accounts/src/components/Modal.tsx | 30 +- accounts/src/components/auth/CardForm.tsx | 54 +- .../components/auth/ChangePasswordForm.tsx | 44 +- accounts/src/components/auth/CompanyForm.tsx | 32 +- accounts/src/components/auth/LoginForm.tsx | 36 +- accounts/src/components/auth/RegisterForm.tsx | 38 +- .../src/components/auth/ResetPasswordForm.tsx | 30 +- accounts/src/components/auth/UserForm.tsx | 84 +- .../src/components/basic/ErrorBoundary.tsx | 6 +- accounts/src/components/basic/Loader.tsx | 7 +- .../src/components/modals/ExtraCharge.tsx | 12 +- accounts/src/config.tsx | 8 +- accounts/src/containers/BackboneModals.tsx | 12 +- accounts/src/index.tsx | 10 +- accounts/src/pages/ChangePassword.tsx | 14 +- accounts/src/pages/Login.tsx | 40 +- accounts/src/pages/Register.tsx | 34 +- accounts/src/pages/ResendToken.tsx | 52 +- accounts/src/pages/ResetPassword.tsx | 8 +- accounts/src/pages/SsoLogin.tsx | 16 +- accounts/src/pages/VerifyAuthToken.tsx | 38 +- accounts/src/pages/VerifyBackupCode.tsx | 24 +- admin-dashboard/src/App.tsx | 4 +- admin-dashboard/src/components/404.tsx | 2 +- admin-dashboard/src/components/Clipboard.tsx | 6 +- .../src/components/ContextModal.tsx | 14 +- admin-dashboard/src/components/Dashboard.tsx | 52 +- admin-dashboard/src/components/Modal.tsx | 30 +- admin-dashboard/src/components/Modalize.tsx | 2 +- .../src/components/NotRequiredAuth.tsx | 6 +- .../src/components/OutsideCLick.tsx | 2 +- admin-dashboard/src/components/PublicPage.tsx | 6 +- .../src/components/RequiredAuth.tsx | 12 +- .../src/components/adminNote/AdminNote.tsx | 2 +- .../src/components/adminNote/AdminNotes.tsx | 14 +- .../auditLogs/AuditLogsJsonViewModal.tsx | 18 +- .../components/auditLogs/AuditLogsList.tsx | 134 +- .../auditLogs/DeleteConfirmationModal.tsx | 12 +- .../src/components/basic/AlertPanel.tsx | 8 +- .../src/components/basic/BeforeLoad.tsx | 10 +- .../src/components/basic/DropDownMenu.tsx | 4 +- .../src/components/basic/ErrorBoundary.tsx | 8 +- .../src/components/basic/RenderSelect.tsx | 14 +- .../basic/react-select-oneuptime/index.tsx | 4 +- .../callLogs/CallLogsContentViewModal.tsx | 10 +- .../callLogs/CallLogsErrorViewModal.tsx | 8 +- .../src/components/callLogs/CallLogsList.tsx | 176 +- .../callLogs/DeleteConfirmationModal.tsx | 12 +- .../emailLogs/DeleteConfirmationModal.tsx | 12 +- .../emailLogs/EmailLogsContentViewModal.tsx | 10 +- .../emailLogs/EmailLogsErrorViewModal.tsx | 8 +- .../components/emailLogs/EmailLogsList.tsx | 134 +- .../src/components/license/LicenseSetting.tsx | 30 +- .../components/license/UnLicensedAlert.tsx | 2 +- .../src/components/modals/About.tsx | 12 +- .../components/modals/ConfirmBalanceTopUp.tsx | 20 +- .../src/components/modals/MessageBox.tsx | 16 +- .../src/components/multiSelect/DropDown.tsx | 29 +- .../multiSelect/MultiSelectMonitor.tsx | 2 +- .../components/multiSelect/RFReactSelect.tsx | 2 +- .../src/components/multiSelect/SelectItem.tsx | 20 +- .../src/components/multiSelect/SelectList.tsx | 22 +- .../components/multiSelect/SelectPanel.tsx | 32 +- .../src/components/multiSelect/index.tsx | 40 +- .../src/components/nav/SideNav.tsx | 28 +- .../src/components/nav/SideNavItem.tsx | 26 +- admin-dashboard/src/components/nav/TopNav.tsx | 34 +- .../notification/NotificationMenu.tsx | 31 +- .../src/components/probe/ProbeAddModal.tsx | 30 +- .../src/components/probe/ProbeDeleteModal.tsx | 12 +- .../src/components/probe/ProbeList.tsx | 73 +- .../src/components/profile/ProfileMenu.tsx | 24 +- .../src/components/project/DeleteDomain.tsx | 22 +- .../project/ProjectAlertLimitBox.tsx | 16 +- .../src/components/project/ProjectBalance.tsx | 32 +- .../components/project/ProjectBlockBox.tsx | 20 +- .../components/project/ProjectBlockModal.tsx | 18 +- .../components/project/ProjectDeleteBox.tsx | 20 +- .../components/project/ProjectDeleteModal.tsx | 18 +- .../src/components/project/ProjectDetails.tsx | 102 +- .../src/components/project/ProjectDomain.tsx | 56 +- .../src/components/project/ProjectList.tsx | 159 +- .../project/ProjectRemoveUserModal.tsx | 22 +- .../components/project/ProjectResetDomain.tsx | 24 +- .../components/project/ProjectRestoreBox.tsx | 12 +- .../components/project/ProjectUnblockBox.tsx | 12 +- .../project/ProjectUnverifyDomain.tsx | 24 +- .../src/components/project/ProjectUpgrade.tsx | 54 +- .../project/ProjectUserAddModal.tsx | 44 +- .../src/components/project/ProjectUsers.tsx | 500 ++-- .../project/ProjectVerifyDomain.tsx | 24 +- .../src/components/project/RadioInput.tsx | 2 +- .../src/components/search/SearchForm.tsx | 4 +- .../src/components/settings/MessageModal.tsx | 4 +- .../src/components/settings/auditLog.tsx | 12 +- .../src/components/settings/callLog.tsx | 12 +- .../src/components/settings/emailLog.tsx | 12 +- .../src/components/settings/smsLog.tsx | 12 +- .../src/components/settings/smtp.tsx | 58 +- .../src/components/settings/smtpTestModal.tsx | 6 +- .../src/components/settings/sso.tsx | 40 +- .../settings/sso/SsoDeleteModal.tsx | 10 +- .../src/components/settings/sso/SsoModal.tsx | 48 +- .../components/settings/ssoDefaultRoles.tsx | 34 +- .../settings/ssoDefaultRoles/BoxHeader.tsx | 2 +- .../ssoDefaultRoles/DefaultRoleModal.tsx | 74 +- .../ssoDefaultRoles/RoleDeleteModal.tsx | 10 +- .../ssoDefaultRoles/TableEmptyRow.tsx | 2 +- .../settings/ssoDefaultRoles/TableHeader.tsx | 2 +- .../src/components/settings/twilio.tsx | 20 +- .../smsLogs/DeleteConfirmationModal.tsx | 12 +- .../smsLogs/SmsLogsContentViewModal.tsx | 10 +- .../smsLogs/SmsLogsErrorViewModal.tsx | 8 +- .../src/components/smsLogs/SmsLogsList.tsx | 162 +- .../src/components/user/HistroyList.tsx | 188 +- .../src/components/user/MessageModal.tsx | 4 +- .../src/components/user/UserAddModal.tsx | 56 +- .../user/UserAdminModeDisableBox.tsx | 10 +- .../user/UserAdminModeEnableBox.tsx | 20 +- .../user/UserAdminModeEnableModal.tsx | 22 +- .../src/components/user/UserBlockBox.tsx | 18 +- .../src/components/user/UserBlockModal.tsx | 18 +- .../src/components/user/UserDeleteBox.tsx | 20 +- .../src/components/user/UserDeleteModal.tsx | 18 +- .../src/components/user/UserHistory.tsx | 20 +- .../src/components/user/UserList.tsx | 9 +- .../src/components/user/UserProject.tsx | 24 +- .../src/components/user/UserRestoreBox.tsx | 12 +- .../src/components/user/UserSetting.tsx | 98 +- .../src/components/user/UserUnblockBox.tsx | 12 +- admin-dashboard/src/config.tsx | 58 +- .../src/containers/BackboneModals.tsx | 12 +- admin-dashboard/src/index.tsx | 4 +- admin-dashboard/src/pages/AuditLogs.tsx | 40 +- admin-dashboard/src/pages/CallLogs.tsx | 36 +- admin-dashboard/src/pages/EmailLogs.tsx | 38 +- admin-dashboard/src/pages/License.tsx | 8 +- admin-dashboard/src/pages/Probes.tsx | 28 +- admin-dashboard/src/pages/Project.tsx | 130 +- admin-dashboard/src/pages/Projects.tsx | 30 +- admin-dashboard/src/pages/SmsLogs.tsx | 36 +- admin-dashboard/src/pages/User.tsx | 58 +- admin-dashboard/src/pages/Users.tsx | 107 +- common-ui/components/basic/Button.tsx | 10 +- common-ui/components/basic/Icon.tsx | 4 +- common-ui/src/components/basic/Button.tsx | 10 +- common-ui/src/components/basic/Icon.tsx | 4 +- dashboard/src/App.tsx | 10 +- dashboard/src/components/404.tsx | 2 +- dashboard/src/components/Checkbox.tsx | 2 +- dashboard/src/components/Clipboard.tsx | 6 +- dashboard/src/components/ContextModal.tsx | 14 +- dashboard/src/components/Dashboard.tsx | 62 +- dashboard/src/components/FeedbackModal.tsx | 32 +- dashboard/src/components/Modal.tsx | 38 +- dashboard/src/components/Modalize.tsx | 2 +- dashboard/src/components/NotRequiredAuth.tsx | 6 +- .../src/components/OnCallScheduleModal.tsx | 22 +- dashboard/src/components/OutsideCLick.tsx | 2 +- dashboard/src/components/PublicPage.tsx | 6 +- dashboard/src/components/RequiredAuth.tsx | 12 +- .../src/components/alert/AlertCharges.tsx | 20 +- .../src/components/alert/AlertChargesList.tsx | 110 +- dashboard/src/components/alert/AlertTable.tsx | 66 +- .../application/ApplicationLogDetail.tsx | 148 +- .../application/ApplicationLogDetailView.tsx | 34 +- .../application/ApplicationLogHeader.tsx | 54 +- .../application/ApplicationLogList.tsx | 2 +- .../ApplicationLogViewDeleteBox.tsx | 26 +- .../components/application/LibraryList.tsx | 40 +- .../src/components/application/LogList.tsx | 81 +- .../src/components/application/LogTail.tsx | 18 +- .../application/NewApplicationLog.tsx | 84 +- dashboard/src/components/areachart/index.tsx | 175 +- .../components/auth/ChangePasswordForm.tsx | 38 +- .../src/components/auth/UnVerifiedEmail.tsx | 58 +- .../automationScript/AutomatedTabularList.tsx | 2 +- .../automationScript/DeleteScriptBox.tsx | 4 +- .../components/automationScript/NewScript.tsx | 60 +- .../automationScript/UpdateScript.tsx | 72 +- .../src/components/basic/AceCodeEditor.tsx | 6 +- .../components/basic/AffectedResources.tsx | 2 +- dashboard/src/components/basic/AlertPanel.tsx | 18 +- dashboard/src/components/basic/BeforeLoad.tsx | 8 +- dashboard/src/components/basic/Button.tsx | 20 +- dashboard/src/components/basic/CodeEditor.tsx | 14 +- dashboard/src/components/basic/Color.tsx | 10 +- .../components/basic/ComponentSelector.tsx | 12 +- .../components/basic/DateTimeRangePicker.tsx | 6 +- .../src/components/basic/DateTimeSelector.tsx | 4 +- .../src/components/basic/DateTimeWrapper.tsx | 6 +- .../src/components/basic/DropDownMenu.tsx | 4 +- .../src/components/basic/ErrorBoundary.tsx | 6 +- .../basic/ExternalStatusPagesTable.tsx | 8 +- .../src/components/basic/FilterSelect.tsx | 4 +- dashboard/src/components/basic/Modal.tsx | 24 +- .../components/basic/MultiSelectDropDown.tsx | 10 +- .../src/components/basic/Notification.tsx | 24 +- .../src/components/basic/PricingPlan.tsx | 8 +- .../src/components/basic/PricingPlanModal.tsx | 63 +- .../src/components/basic/QuickTipBox.tsx | 4 +- .../components/basic/RenderBasedOnRole.tsx | 12 +- .../src/components/basic/RenderCodeEditor.tsx | 4 +- .../src/components/basic/RenderHeaders.tsx | 2 +- .../src/components/basic/RenderOptions.tsx | 284 +- .../src/components/basic/RenderSelect.tsx | 14 +- dashboard/src/components/basic/SearchBox.tsx | 10 +- dashboard/src/components/basic/Select.tsx | 4 +- .../src/components/basic/SubProjectAlert.tsx | 6 +- .../components/basic/SubProjectDropDown.tsx | 4 +- .../components/basic/SubProjectSelector.tsx | 14 +- .../components/basic/TeamMemberSelector.tsx | 110 +- .../src/components/basic/TimeSelector.tsx | 4 +- .../src/components/basic/TimezoneSelector.tsx | 14 +- dashboard/src/components/basic/Tooltip.tsx | 10 +- .../src/components/basic/TooltipModal.tsx | 8 +- .../src/components/basic/WeekSelector.tsx | 6 +- .../src/components/basic/performanceChart.tsx | 18 +- .../src/components/blockchart/BlockChart.tsx | 40 +- .../components/breadCrumb/BreadCrumbItem.tsx | 44 +- .../src/components/breadCrumb/BreadCrumbs.tsx | 4 +- .../callrouting/AddScheduleModal.tsx | 212 +- .../components/callrouting/CallRoutingLog.tsx | 96 +- .../callrouting/ConfirmNumberDeleteModal.tsx | 16 +- .../callrouting/RoutingNumberBox.tsx | 6 +- .../callrouting/RoutingNumberButton.tsx | 12 +- .../callrouting/RoutingNumberList.tsx | 70 +- .../callrouting/RoutingNumberModal.tsx | 148 +- .../callrouting/ScheduleComponent.tsx | 141 +- .../src/components/common/ErrorWarning.tsx | 2 +- .../components/component/ComponentDetail.tsx | 76 +- .../components/component/ComponentIssue.tsx | 20 +- .../components/component/ComponentList.tsx | 2 +- .../components/component/ComponentSummary.tsx | 8 +- .../src/components/component/NewComponent.tsx | 122 +- .../component/ResourceTabularList.tsx | 104 +- .../credential/DeleteCredentialModal.tsx | 28 +- .../credential/DockerCredentialList.tsx | 14 +- .../credential/DockerCredentialModal.tsx | 58 +- .../credential/GitCredentialList.tsx | 14 +- .../credential/GitCredentialModal.tsx | 54 +- .../src/components/credential/GitSshList.tsx | 14 +- .../src/components/credential/GitSshModal.tsx | 50 +- .../src/components/domains/CreateDomain.tsx | 38 +- .../src/components/domains/DeleteDomain.tsx | 26 +- dashboard/src/components/domains/Domains.tsx | 54 +- .../src/components/domains/EditDomain.tsx | 32 +- .../src/components/domains/VerifyDomain.tsx | 30 +- .../emailTemplates/EmailSmtpBox.tsx | 92 +- .../emailTemplates/EmailTemplatesBox.tsx | 74 +- .../emailTemplates/TemplatesFormBox.tsx | 52 +- .../errorTracker/ErrorEventDetail.tsx | 80 +- .../errorTracker/ErrorEventHeader.tsx | 127 +- .../errorTracker/ErrorEventList.tsx | 2 +- .../errorTracker/ErrorEventMiniTag.tsx | 10 +- .../errorTracker/ErrorEventStackTrace.tsx | 27 +- .../errorTracker/ErrorEventTagDetail.tsx | 2 +- .../errorTracker/ErrorEventTimeline.tsx | 462 ++-- .../errorTracker/ErrorTrackerDetail.tsx | 162 +- .../errorTracker/ErrorTrackerDetailView.tsx | 86 +- .../errorTracker/ErrorTrackerHeader.tsx | 68 +- .../errorTracker/ErrorTrackerIssue.tsx | 49 +- .../ErrorTrackerIssueTimeline.tsx | 105 +- .../errorTracker/ErrorTrackerList.tsx | 2 +- .../ErrorTrackerViewDeleteBox.tsx | 14 +- .../errorTracker/NewErrorTracker.tsx | 78 +- .../components/incident/HideIncidentBox.tsx | 10 +- .../src/components/incident/IncidentAlert.tsx | 114 +- .../incident/IncidentBasicSettings.tsx | 40 +- .../components/incident/IncidentCreated.tsx | 16 +- .../incident/IncidentCustomFields.tsx | 56 +- .../components/incident/IncidentDeleteBox.tsx | 26 +- .../components/incident/IncidentInternal.tsx | 68 +- .../incident/IncidentInvestigation.tsx | 64 +- .../src/components/incident/IncidentList.tsx | 271 +- .../incident/IncidentMessageThread.tsx | 642 +++-- .../incident/IncidentNoteTemplates.tsx | 216 +- .../incident/IncidentPrioritiesList.tsx | 10 +- .../incident/IncidentProjectBox.tsx | 4 +- .../components/incident/IncidentStatus.tsx | 2408 ++++++++--------- .../components/incident/IncidentTemplates.tsx | 374 ++- .../incident/IncidentTimelineBox.tsx | 26 +- .../incident/IncidentTimelineList.tsx | 108 +- .../DeleteIncidentCommunicationSlaModal.tsx | 20 +- .../EditIncidentCommunicationSlaModal.tsx | 134 +- .../IncidentCommunicationSla.tsx | 404 ++- .../IncidentCommunicationSlaModal.tsx | 142 +- dashboard/src/components/invoice/Invoice.tsx | 22 +- .../src/components/invoice/InvoiceList.tsx | 40 +- dashboard/src/components/modals/About.tsx | 14 +- dashboard/src/components/modals/AddCard.tsx | 60 +- .../modals/AddExternalStatusPagesModal.tsx | 44 +- .../components/modals/AddResourceCategory.tsx | 46 +- dashboard/src/components/modals/AddSeats.tsx | 28 +- .../src/components/modals/AddSiteUrl.tsx | 48 +- .../src/components/modals/AlertBilling.tsx | 20 +- .../src/components/modals/AlertDetails.tsx | 230 +- .../src/components/modals/BackupCodes.tsx | 48 +- .../src/components/modals/CancelSchedule.tsx | 14 +- .../modals/ChangeMonitorComponent.tsx | 52 +- .../components/modals/ConfirmBalanceTopUp.tsx | 20 +- .../components/modals/ConfirmChangeRole.tsx | 18 +- .../modals/ConfirmErrorTrackerIssueAction.tsx | 30 +- .../modals/ConfirmResetBrandColors.tsx | 40 +- .../components/modals/ConfirmResetLayout.tsx | 22 +- .../components/modals/ConfirmScanModal.tsx | 22 +- .../components/modals/ConfirmationDialog.tsx | 22 +- .../components/modals/CreateAnnouncement.tsx | 60 +- .../components/modals/CreateCustomField.tsx | 40 +- .../src/components/modals/CreateIncident.tsx | 202 +- .../modals/CreateIncidentNoteTemplate.tsx | 40 +- .../modals/CreateIncidentPriority.tsx | 60 +- .../modals/CreateIncidentTemplate.tsx | 44 +- .../modals/CreateIncomingRequest.tsx | 364 ++- .../modals/CreateManualIncident.tsx | 90 +- .../modals/CreateMonitorCustomField.tsx | 40 +- .../modals/CreateMsTeamsWebhook.tsx | 128 +- .../src/components/modals/CreateSchedule.tsx | 124 +- .../components/modals/CreateSlackWebhook.tsx | 130 +- .../modals/CreateStatusPageCategory.tsx | 26 +- .../components/modals/CreateSubscriber.tsx | 232 +- .../src/components/modals/CreateWebHook.tsx | 126 +- .../src/components/modals/DeleteAccount.tsx | 42 +- .../components/modals/DeleteAnnouncement.tsx | 28 +- .../modals/DeleteAnnouncementLog.tsx | 22 +- .../modals/DeleteApplicationLog.tsx | 26 +- .../modals/DeleteApplicationSecurity.tsx | 26 +- .../modals/DeleteAutomatedScript.tsx | 2 +- .../src/components/modals/DeleteCard.tsx | 24 +- .../src/components/modals/DeleteComponent.tsx | 28 +- .../modals/DeleteContainerSecurity.tsx | 26 +- .../components/modals/DeleteCustomField.tsx | 22 +- .../components/modals/DeleteErrorTracker.tsx | 26 +- .../modals/DeleteErrorTrackerIssue.tsx | 26 +- .../src/components/modals/DeleteIncident.tsx | 16 +- .../modals/DeleteIncidentMessage.tsx | 26 +- .../modals/DeleteIncidentNoteTemplate.tsx | 28 +- .../modals/DeleteIncidentTemplate.tsx | 28 +- .../modals/DeleteIncomingRequest.tsx | 22 +- .../src/components/modals/DeleteMonitor.tsx | 26 +- .../modals/DeleteMonitorCustomField.tsx | 22 +- .../modals/DeleteMsTeamsWebhook.tsx | 16 +- .../src/components/modals/DeleteSchedule.tsx | 22 +- .../src/components/modals/DeleteSiteUrl.tsx | 22 +- .../components/modals/DeleteSlackWebhook.tsx | 16 +- .../components/modals/DeleteSubscriber.tsx | 20 +- .../src/components/modals/DeleteWebhook.tsx | 16 +- .../src/components/modals/DisableMonitor.tsx | 40 +- .../src/components/modals/DisabledMessage.tsx | 12 +- .../components/modals/EditAnnouncement.tsx | 68 +- .../modals/EditApplicationSecurity.tsx | 110 +- .../src/components/modals/EditComponent.tsx | 50 +- .../modals/EditContainerSecurity.tsx | 68 +- .../src/components/modals/EditCustomField.tsx | 48 +- .../modals/EditExternalStatusPageModal.tsx | 46 +- .../src/components/modals/EditIncident.tsx | 38 +- .../modals/EditIncidentNoteTemplate.tsx | 40 +- .../modals/EditIncidentPriority.tsx | 62 +- .../modals/EditIncidentTemplate.tsx | 44 +- .../components/modals/EditIncomingRequest.tsx | 450 ++- .../modals/EditMonitorCustomField.tsx | 48 +- .../components/modals/EditMsTeamsWebhook.tsx | 128 +- .../modals/EditResourceCategory.tsx | 58 +- .../src/components/modals/EditSchedule.tsx | 160 +- .../components/modals/EditSlackWebhook.tsx | 128 +- .../modals/EditStatusPageCategory.tsx | 22 +- .../src/components/modals/EditWebhook.tsx | 126 +- .../modals/ErrorEventIssueMember.tsx | 60 +- .../src/components/modals/FooterLink.tsx | 50 +- .../components/modals/HideAnnouncement.tsx | 36 +- .../components/modals/IncidentHeaderModal.tsx | 39 +- .../modals/IncomingRequestEnabled.tsx | 22 +- .../components/modals/IncomingRequestUrl.tsx | 12 +- .../src/components/modals/KubeDeployment.tsx | 22 +- .../components/modals/KubeDeploymentData.tsx | 24 +- .../src/components/modals/KubeJobData.tsx | 24 +- dashboard/src/components/modals/KubeJobs.tsx | 22 +- .../src/components/modals/KubePodData.tsx | 30 +- dashboard/src/components/modals/KubePods.tsx | 26 +- .../src/components/modals/KubeStatefulset.tsx | 22 +- .../components/modals/KubeStatefulsetData.tsx | 24 +- .../src/components/modals/MessageBox.tsx | 16 +- .../src/components/modals/MonitorUrl.tsx | 17 +- .../components/modals/NewIncidentMessage.tsx | 117 +- .../components/modals/NoMonitorSubscriber.tsx | 10 +- .../src/components/modals/ProbeDetail.tsx | 22 +- .../modals/RemoveExternalStatusPage.tsx | 22 +- .../components/modals/RemoveFooterLink.tsx | 16 +- .../modals/RemoveIncidentPriority.tsx | 26 +- .../modals/RemoveResourceCategory.tsx | 18 +- .../modals/RemoveStatusPageCategory.tsx | 22 +- .../components/modals/RemoveSubProject.tsx | 30 +- .../components/modals/RemoveTeamUserModal.tsx | 22 +- .../components/modals/RemovedFromProject.tsx | 10 +- .../modals/RemovedFromSubProject.tsx | 10 +- .../src/components/modals/ResetAPIKey.tsx | 20 +- .../src/components/modals/ResetCssModal.tsx | 16 +- .../components/modals/ResetSmsTemplate.tsx | 20 +- .../modals/ResetStatusBubbleIdModal.tsx | 16 +- .../components/modals/RunAutomationScript.tsx | 24 +- .../components/modals/ScheduleHeaderModal.tsx | 18 +- .../modals/SetDefaultIncidentPriority.tsx | 24 +- .../components/modals/SubProjectApiKey.tsx | 53 +- .../modals/SubscriberAdvanceOptions.tsx | 42 +- .../src/components/modals/TwoFactorAuth.tsx | 30 +- .../src/components/modals/Unauthorised.tsx | 12 +- .../src/components/modals/UploadFile.tsx | 60 +- .../modals/ViewApplicationLogKey.tsx | 78 +- .../components/modals/ViewErrorTrackerKey.tsx | 78 +- .../src/components/modals/ViewJsonLogs.tsx | 22 +- .../src/components/modals/ViewScriptLogs.tsx | 22 +- .../src/components/modals/deleteSlackTeam.tsx | 16 +- .../components/modals/inviteTeamMember.tsx | 92 +- .../modals/projectTeamMemberNotification.tsx | 16 +- .../src/components/modals/removeGroup.tsx | 12 +- .../src/components/monitor/ApiAdvance.tsx | 30 +- .../src/components/monitor/ConsoleLogView.tsx | 4 +- .../src/components/monitor/MonitorChart.tsx | 309 ++- .../monitor/MonitorCustomFields.tsx | 48 +- .../src/components/monitor/MonitorDetail.tsx | 186 +- .../monitor/MonitorLighthouseLogsList.tsx | 130 +- .../src/components/monitor/MonitorList.tsx | 6 +- .../components/monitor/MonitorLogsList.tsx | 393 ++- .../components/monitor/MonitorTabularList.tsx | 184 +- .../src/components/monitor/MonitorTitle.tsx | 40 +- .../monitor/MonitorViewChangeComponentBox.tsx | 36 +- .../monitor/MonitorViewDeleteBox.tsx | 28 +- .../monitor/MonitorViewDisableBox.tsx | 32 +- .../components/monitor/MonitorViewHeader.tsx | 95 +- .../monitor/MonitorViewIncidentBox.tsx | 64 +- .../monitor/MonitorViewLighthouseLogsBox.tsx | 104 +- .../components/monitor/MonitorViewLogsBox.tsx | 114 +- .../monitor/MonitorViewSubscriberBox.tsx | 52 +- .../src/components/monitor/NewMonitor.tsx | 594 ++-- dashboard/src/components/monitor/ProbeBar.tsx | 14 +- .../components/monitor/ResponseComponent.tsx | 77 +- .../src/components/monitor/ResponseParent.tsx | 635 +++-- .../monitor/ThirdPartyVariables.tsx | 34 +- .../monitorSla/BreachedMonitorSla.tsx | 2 +- .../monitorSla/DeleteMonitorSlaModal.tsx | 20 +- .../monitorSla/EditMonitorSlaModal.tsx | 136 +- .../src/components/monitorSla/MonitorSla.tsx | 102 +- .../components/monitorSla/MonitorSlaModal.tsx | 122 +- .../src/components/multiSelect/DropDown.tsx | 29 +- .../multiSelect/MultiSelectField.tsx | 4 +- .../multiSelect/MultiSelectMonitor.tsx | 2 +- .../components/multiSelect/RFReactSelect.tsx | 2 +- .../src/components/multiSelect/SelectItem.tsx | 20 +- .../src/components/multiSelect/SelectList.tsx | 22 +- .../components/multiSelect/SelectPanel.tsx | 32 +- .../src/components/multiSelect/index.tsx | 40 +- dashboard/src/components/nav/Search.tsx | 136 +- dashboard/src/components/nav/SideNav.tsx | 94 +- dashboard/src/components/nav/SideNavItem.tsx | 174 +- dashboard/src/components/nav/TopNav.tsx | 248 +- .../notification/NotificationMenu.tsx | 48 +- .../src/components/onCall/OnCallData.tsx | 4 +- .../src/components/onCall/OnCallSchedule.tsx | 13 +- .../src/components/onCall/OnCallTableRows.tsx | 40 +- .../paymentCard/CustomerBalance.tsx | 60 +- .../components/paymentCard/PaymentCard.tsx | 54 +- .../performanceTracker/ChartComponent.tsx | 96 +- .../DeletePerformanceMetric.tsx | 28 +- .../DeletePerformanceTracker.tsx | 18 +- .../NewPerformanceTracker.tsx | 62 +- .../PerformanceTrackerHeader.tsx | 30 +- .../PerformanceTrackerList.tsx | 26 +- .../performanceTracker/PerformanceView.tsx | 14 +- .../performanceTracker/QuickStart.tsx | 64 +- .../performanceTracker/TableComponent.tsx | 138 +- .../performanceTracker/TrackerInfo.tsx | 22 +- .../TransactionMetricsTable.tsx | 10 +- .../WebTransactionsChart.tsx | 10 +- dashboard/src/components/probe/ProbeList.tsx | 142 +- .../src/components/probe/ProbeStatus.tsx | 2 +- .../src/components/profile/ProfileMenu.tsx | 38 +- .../profileSettings/ChangePassword.tsx | 60 +- .../profileSettings/DeleteAccountBox.tsx | 14 +- .../components/profileSettings/Profile.tsx | 298 +- .../components/project/CreateProjectModal.tsx | 24 +- .../src/components/project/DeleteCaution.tsx | 26 +- .../components/project/DeleteMessaging.tsx | 10 +- .../components/project/DeleteProjectModal.tsx | 32 +- .../components/project/DeleteRequesModal.tsx | 12 +- .../src/components/project/ProjectForm.tsx | 60 +- .../components/project/ProjectSwitcher.tsx | 26 +- .../project/ProjectSwitchingModal.tsx | 6 +- .../src/components/project/RadioInput.tsx | 2 +- .../src/components/project/UpgradeForm.tsx | 8 +- .../components/project/UpgradePlanFields.tsx | 10 +- .../components/project/UpgradePlanModal.tsx | 28 +- .../src/components/reports/Incidents.tsx | 30 +- dashboard/src/components/reports/Members.tsx | 105 +- dashboard/src/components/reports/Monitors.tsx | 132 +- .../src/components/reports/ResolveTime.tsx | 30 +- .../src/components/schedule/DeleteBox.tsx | 30 +- .../schedule/DeleteScheduleModal.tsx | 18 +- .../components/schedule/EscalationSummary.tsx | 16 +- .../schedule/EscalationSummarySingle.tsx | 378 +-- .../components/schedule/EscalationsList.tsx | 2 +- .../src/components/schedule/MonitorBox.tsx | 10 +- .../src/components/schedule/MonitorInputs.tsx | 300 +- .../components/schedule/OnCallAlertBox.tsx | 130 +- .../components/schedule/RenameScheduleBox.tsx | 38 +- .../components/schedule/RenderEscalation.tsx | 8 +- .../src/components/schedule/RenderMember.tsx | 38 +- .../src/components/schedule/RenderMembers.tsx | 8 +- .../schedule/RenderRotationFrequency.tsx | 14 +- .../schedule/RenderRotationSwitchTime.tsx | 2 +- .../schedule/RenderSingleEscalation.tsx | 20 +- .../src/components/schedule/RenderTeams.tsx | 2 +- .../components/schedule/ScheduleCalender.tsx | 4 +- .../src/components/schedule/ScheduleForm.tsx | 46 +- .../src/components/schedule/ScheduleInput.tsx | 24 +- .../schedule/ScheduleProjectBox.tsx | 55 +- dashboard/src/components/schedule/UserBox.tsx | 40 +- .../src/components/schedule/UserInputs.tsx | 2 +- .../scheduledEvent/AddNoteModal.tsx | 62 +- .../scheduledEvent/DeleteNoteModal.tsx | 24 +- .../scheduledEvent/EditNoteModal.tsx | 66 +- .../components/scheduledEvent/EventBox.tsx | 84 +- .../scheduledEvent/OngoingScheduledEvent.tsx | 2 +- .../scheduledEvent/ScheduleEventDeleteBox.tsx | 18 +- .../scheduledEvent/ScheduledEvent.tsx | 48 +- .../ScheduledEventDescription.tsx | 54 +- .../scheduledEvent/ScheduledEventNote.tsx | 985 ++++--- .../src/components/search/SearchInput.tsx | 30 +- .../security/ApplicationSecurity.tsx | 2 +- .../security/ApplicationSecurityDeleteBox.tsx | 18 +- .../security/ApplicationSecurityDetail.tsx | 116 +- .../security/ApplicationSecurityForm.tsx | 110 +- .../components/security/ContainerSecurity.tsx | 2 +- .../security/ContainerSecurityDeleteBox.tsx | 18 +- .../security/ContainerSecurityDetail.tsx | 112 +- .../security/ContainerSecurityForm.tsx | 68 +- .../src/components/security/SecurityInfo.tsx | 66 +- .../src/components/security/SecurityLog.tsx | 84 +- .../src/components/settings/APISettings.tsx | 42 +- .../settings/AdvancedIncidentNotification.tsx | 84 +- .../settings/AlertAdvanceOption.tsx | 56 +- .../settings/AlertDisabledWarning.tsx | 10 +- .../src/components/settings/ChangePlan.tsx | 56 +- .../src/components/settings/DeleteProject.tsx | 8 +- .../src/components/settings/ExitProject.tsx | 30 +- .../components/settings/ExitProjectModal.tsx | 18 +- .../src/components/settings/GroupForm.tsx | 130 +- .../src/components/settings/GroupList.tsx | 120 +- .../src/components/settings/GroupTable.tsx | 32 +- .../components/settings/ProjectSettings.tsx | 30 +- .../settings/ResourceCategories.tsx | 121 +- dashboard/src/components/settings/Sso.tsx | 44 +- .../components/settings/SsoDeleteModal.tsx | 10 +- .../src/components/settings/SsoModal.tsx | 60 +- .../components/settings/SubProjectForm.tsx | 56 +- .../components/settings/SubProjectTable.tsx | 110 +- .../src/components/settings/SubProjects.tsx | 103 +- dashboard/src/components/slack/Slack.tsx | 10 +- .../src/components/slack/SlackTeamItem.tsx | 20 +- .../src/components/slack/SlackTeamList.tsx | 32 +- .../components/smsTemplates/SmsSmtpBox.tsx | 74 +- .../smsTemplates/SmsTemplatesBox.tsx | 74 +- .../smsTemplates/SmsTemplatesFormBox.tsx | 60 +- .../status-page/AddMoreDomainModal.tsx | 66 +- .../status-page/AnnouncementLog.tsx | 49 +- .../components/status-page/Announcements.tsx | 53 +- .../src/components/status-page/Basic.tsx | 74 +- .../src/components/status-page/Branding.tsx | 232 +- .../components/status-page/CheckboxGroup.tsx | 8 +- .../components/status-page/CustomStyles.tsx | 34 +- .../src/components/status-page/DeleteBox.tsx | 26 +- .../status-page/DeleteDomainModal.tsx | 12 +- .../status-page/DeleteStatusPageModal.tsx | 18 +- .../status-page/DuplicateStatusPage.tsx | 24 +- .../DuplicateStatusPageConfirmation.tsx | 20 +- .../status-page/DuplicateStatusPageForm.tsx | 56 +- .../status-page/EditMoreDomainModal.tsx | 74 +- .../components/status-page/EmbeddedBubble.tsx | 52 +- .../status-page/ExternalStatusPages.tsx | 16 +- .../src/components/status-page/Header.tsx | 8 +- .../src/components/status-page/Links.tsx | 80 +- .../src/components/status-page/Monitors.tsx | 100 +- .../status-page/MonitorsWithCategory.tsx | 96 +- .../status-page/PrivateStatusPage.tsx | 70 +- .../components/status-page/RenderMonitor.tsx | 19 +- .../components/status-page/RenderMonitors.tsx | 2 +- .../src/components/status-page/RowData.tsx | 10 +- .../src/components/status-page/Setting.tsx | 86 +- .../status-page/StatusPageCategory.tsx | 93 +- .../components/status-page/StatusPageForm.tsx | 48 +- .../status-page/StatusPageLanguage.tsx | 36 +- .../status-page/StatusPageLayout.tsx | 40 +- .../status-page/StatusPageSubscriber.tsx | 111 +- .../src/components/status-page/Themes.tsx | 25 +- .../status-page/VerifyDomainModal.tsx | 22 +- .../components/subscriber/subscriberAlert.tsx | 119 +- .../components/subscriber/subscriberList.tsx | 85 +- .../subscriberAlert/SubscriberAlertTable.tsx | 116 +- .../src/components/table/NoItemsMessage.tsx | 4 +- dashboard/src/components/table/Table.tsx | 58 +- .../components/table/TableActionButtons.tsx | 6 +- .../src/components/table/TableColumn.tsx | 16 +- .../src/components/table/TableColumns.tsx | 6 +- .../src/components/table/TableDescription.tsx | 4 +- .../src/components/table/TableFooter.tsx | 30 +- .../src/components/table/TableHeader.tsx | 10 +- dashboard/src/components/table/TableItem.tsx | 8 +- .../components/table/TableItemColumnData.tsx | 10 +- dashboard/src/components/table/TableItems.tsx | 14 +- .../src/components/table/TableLoader.tsx | 4 +- .../table/TablePaginationButtons.tsx | 28 +- .../components/table/TablePaginationCount.tsx | 14 +- dashboard/src/components/table/TableTitle.tsx | 4 +- dashboard/src/components/team/TeamMember.tsx | 146 +- .../components/team/TeamMemberProjectBox.tsx | 54 +- .../components/tutorial/CustomTutorial.tsx | 4 +- .../src/components/tutorial/Tutorial.tsx | 36 +- .../src/components/tutorial/TutorialBox.tsx | 4 +- .../webHooks/IncomingRequestBox.tsx | 4 +- .../webHooks/IncomingRequestButton.tsx | 8 +- .../webHooks/IncomingRequestList.tsx | 333 ++- .../src/components/webHooks/MSTeamsBox.tsx | 12 +- .../src/components/webHooks/MSTeamsButton.tsx | 8 +- .../src/components/webHooks/MSTeamsItem.tsx | 49 +- .../src/components/webHooks/MSTeamsList.tsx | 68 +- .../src/components/webHooks/RadioInput.tsx | 2 +- .../src/components/webHooks/SlackBox.tsx | 12 +- .../src/components/webHooks/SlackButton.tsx | 8 +- .../src/components/webHooks/SlackItem.tsx | 49 +- .../src/components/webHooks/SlackList.tsx | 62 +- .../src/components/webHooks/WebHookBox.tsx | 12 +- .../src/components/webHooks/WebHookButton.tsx | 8 +- .../src/components/webHooks/WebHookItem.tsx | 51 +- .../src/components/webHooks/WebHookList.tsx | 64 +- .../src/components/webHooks/WebHookRow.tsx | 8 +- dashboard/src/components/zapier/ZapierBox.tsx | 4 +- dashboard/src/config.tsx | 72 +- dashboard/src/containers/BackboneModals.tsx | 12 +- dashboard/src/index.tsx | 10 +- dashboard/src/pages/Advanced.tsx | 16 +- dashboard/src/pages/AlertLog.tsx | 60 +- dashboard/src/pages/Application.tsx | 94 +- dashboard/src/pages/ApplicationDetail.tsx | 4 +- dashboard/src/pages/ApplicationLog.tsx | 90 +- dashboard/src/pages/ApplicationLogView.tsx | 104 +- dashboard/src/pages/AutomatedScripView.tsx | 14 +- dashboard/src/pages/AutomationScript.tsx | 42 +- dashboard/src/pages/Billing.tsx | 26 +- dashboard/src/pages/CallRouting.tsx | 36 +- dashboard/src/pages/ChangePassword.tsx | 12 +- dashboard/src/pages/ChangePasswordSetting.tsx | 4 +- dashboard/src/pages/Component.tsx | 102 +- dashboard/src/pages/ComponentSettings.tsx | 42 +- .../src/pages/ComponentSettingsAdvanced.tsx | 36 +- dashboard/src/pages/Consulting.tsx | 18 +- dashboard/src/pages/Container.tsx | 96 +- dashboard/src/pages/ContainerDetail.tsx | 4 +- dashboard/src/pages/DeleteAccountPage.tsx | 4 +- dashboard/src/pages/DockerCredential.tsx | 32 +- dashboard/src/pages/DomainSettings.tsx | 28 +- dashboard/src/pages/EmailTemplates.tsx | 24 +- dashboard/src/pages/ErrorEventView.tsx | 100 +- dashboard/src/pages/ErrorTracking.tsx | 102 +- dashboard/src/pages/ErrorTrackingView.tsx | 70 +- dashboard/src/pages/GitCredential.tsx | 32 +- dashboard/src/pages/Group.tsx | 36 +- dashboard/src/pages/Home.tsx | 166 +- dashboard/src/pages/Incident.tsx | 258 +- dashboard/src/pages/IncidentLog.tsx | 156 +- dashboard/src/pages/IncidentSettings.tsx | 90 +- dashboard/src/pages/Integrations.tsx | 26 +- dashboard/src/pages/Monitor.tsx | 168 +- dashboard/src/pages/MonitorSettings.tsx | 36 +- dashboard/src/pages/MonitorView.tsx | 422 +-- dashboard/src/pages/OnCall.tsx | 76 +- dashboard/src/pages/OneUptimeApi.tsx | 18 +- dashboard/src/pages/PerformanceTracker.tsx | 90 +- .../src/pages/PerformanceTrackerView.tsx | 80 +- dashboard/src/pages/Probe.tsx | 48 +- dashboard/src/pages/Profile.tsx | 4 +- dashboard/src/pages/ProfileBilling.tsx | 12 +- dashboard/src/pages/Reports.tsx | 94 +- dashboard/src/pages/Resources.tsx | 22 +- dashboard/src/pages/Schedule.tsx | 62 +- dashboard/src/pages/ScheduledEvent.tsx | 18 +- dashboard/src/pages/ScheduledEventDetail.tsx | 74 +- dashboard/src/pages/Settings.tsx | 14 +- dashboard/src/pages/SmsTemplates.tsx | 24 +- dashboard/src/pages/Sso.tsx | 24 +- dashboard/src/pages/StatusPage.tsx | 170 +- dashboard/src/pages/StatusPages.tsx | 24 +- dashboard/src/pages/TeamMemberProfile.tsx | 8 +- dashboard/src/pages/TeamMembers.tsx | 46 +- dashboard/src/pages/WebhookSettings.tsx | 20 +- dashboard/src/pages/WebsiteMonitorIssues.tsx | 32 +- dashboard/src/pages/base/index.tsx | 26 +- dashboard/src/pages/status-page/list.tsx | 14 +- home/package.json | 2 +- probe/package.json | 2 +- script-runner/package.json | 2 +- status-page/src/App.tsx | 2 +- status-page/src/components/Announcement.tsx | 20 +- .../src/components/AnnouncementLogs.tsx | 24 +- status-page/src/components/BlockChart.tsx | 128 +- .../components/Collapsible/Collapsible.tsx | 186 +- status-page/src/components/Events.tsx | 26 +- status-page/src/components/EventsMain.tsx | 140 +- .../src/components/ExternalStatusPages.tsx | 16 +- status-page/src/components/Footer.tsx | 8 +- status-page/src/components/Incident.tsx | 287 +- status-page/src/components/LanguageBox.tsx | 20 +- .../src/components/LineChartsContainer.tsx | 22 +- status-page/src/components/Main.tsx | 614 ++--- status-page/src/components/MonitorInfo.tsx | 144 +- status-page/src/components/NewThemeEvent.tsx | 78 +- .../src/components/NewThemeSubscriber.tsx | 14 +- status-page/src/components/NoMonitor.tsx | 2 +- status-page/src/components/Notes.tsx | 49 +- status-page/src/components/NotesMain.tsx | 326 +-- .../src/components/OngoingSchedule.tsx | 22 +- status-page/src/components/PastEvent.tsx | 138 +- status-page/src/components/ScheduledEvent.tsx | 268 +- status-page/src/components/SelectLanguage.tsx | 8 +- .../src/components/SingleAnnouncement.tsx | 16 +- status-page/src/components/Subscribe/Call.tsx | 70 +- .../src/components/Subscribe/Message.tsx | 60 +- .../src/components/Subscribe/Monitors.tsx | 262 +- .../src/components/Subscribe/SubscribeBox.tsx | 72 +- .../src/components/Subscribe/Webhook.tsx | 64 +- status-page/src/components/UptimeLegend.tsx | 2 +- .../src/components/areachart/index.tsx | 81 +- .../components/basic/AffectedResources.tsx | 6 +- .../src/components/basic/ErrorBoundary.tsx | 6 +- status-page/src/index.tsx | 2 +- 736 files changed, 20889 insertions(+), 21263 deletions(-) diff --git a/accounts/package.json b/accounts/package.json index 93da6e2dd5..1f1b5a3c60 100755 --- a/accounts/package.json +++ b/accounts/package.json @@ -45,6 +45,7 @@ "dev": "PORT=3003 react-scripts --openssl-legacy-provider start", "build": "react-scripts --openssl-legacy-provider build && npm run build-sw", "build-sw": "node ./src/sw-build.js", + "compile": "tsc", "test": "jest --forceExit --runInBand ./src/test/*.test.js", "enterprise-test": "jest --forceExit --runInBand ./src/test/*.test.enterprise.js", "start": "node index.ts", diff --git a/accounts/src/App.tsx b/accounts/src/App.tsx index c9b614af9c..51839b250a 100755 --- a/accounts/src/App.tsx +++ b/accounts/src/App.tsx @@ -1,5 +1,5 @@ import React, { Suspense, useEffect } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Router, Route, Redirect, Switch } from 'react-router-dom'; import { history, isServer } from './store'; import { connect } from 'react-redux'; @@ -13,7 +13,7 @@ import { User, } from './config'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message + import queryString from 'query-string'; import ReactGA from 'react-ga'; import Cookies from 'universal-cookie'; @@ -45,10 +45,10 @@ if (userIsLoggedIn) { window.location = cookies.get('admin-data') ? ADMIN_DASHBOARD_URL : isStatusPageLogin - ? `${statusPageURL}?userId=${userId}&accessToken=${jwtAccessToken}` - : redirectTo - ? redirectTo - : DASHBOARD_URL; + ? `${statusPageURL}?userId=${userId}&accessToken=${jwtAccessToken}` + : redirectTo + ? redirectTo + : DASHBOARD_URL; } const App = ({ @@ -86,7 +86,7 @@ const App = ({ .map((route, index) => { return ( { class Modal extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; this.onClose = this.onClose.bind(this); this.onConfirm = this.onConfirm.bind(this); } onClose = (value: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.item.onClose) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.item.onClose(value); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.onClose(this.props.item); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.onClose(this.props.item); } }; onConfirm = (value: $TSFixMe) => { const _this = this; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.item.onConfirm) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.item.onConfirm(value).then( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + () => _this.props.onClose(_this.props.item), - () => {} + () => { } ); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.onClose(this.props.item); } }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'zIndex' does not exist on type 'Readonly... Remove this comment to see the full error message + const { zIndex } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { extraClasses } = this.props.item; const mainClass = `${extraClasses || ''} modal-dialog-view`; @@ -69,7 +69,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => { >
{ ); } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Modal.propTypes = { onConfirm: PropTypes.func, item: PropTypes.object.isRequired, @@ -91,7 +91,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => { zIndex: PropTypes.number.isRequired, }; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Modal.displayName = 'Modal'; return Modal; diff --git a/accounts/src/components/auth/CardForm.tsx b/accounts/src/components/auth/CardForm.tsx index df2376dbb9..ba9d426536 100755 --- a/accounts/src/components/auth/CardForm.tsx +++ b/accounts/src/components/auth/CardForm.tsx @@ -1,11 +1,11 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import RenderCountrySelector from '../basic/CountrySelector'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { RenderField } from '../basic/RenderField'; import { PricingPlan, Validate, env } from '../../config'; @@ -13,7 +13,7 @@ import { ButtonSpinner } from '../basic/Loader.js'; import { openModal, closeModal } from '../../actions/modal'; import ExtraCharge from '../modals/ExtraCharge'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { CardNumberElement, @@ -22,7 +22,7 @@ import { injectStripe, StripeProvider, Elements, - // @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + } from '@stripe/react-stripe-js'; import { addCard, @@ -91,7 +91,7 @@ class CardForm extends Component { handleClick = () => { const { registerModal } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: registerModal, onClose: () => '', @@ -101,20 +101,20 @@ class CardForm extends Component { handleSubmit = (values: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'stripe' does not exist on type 'Readonly... Remove this comment to see the full error message + stripe, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'addCard' does not exist on type 'Readonl... Remove this comment to see the full error message + addCard, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'signUpRequest' does not exist on type 'R... Remove this comment to see the full error message + signUpRequest, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'signupUser' does not exist on type 'Read... Remove this comment to see the full error message + signupUser, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'signupSuccess' does not exist on type 'R... Remove this comment to see the full error message + signupSuccess, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'signupError' does not exist on type 'Rea... Remove this comment to see the full error message + signupError, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + const { user, planId } = this.props.register; const { email, companyName } = user; if (stripe) { @@ -165,11 +165,11 @@ class CardForm extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'planId' does not exist on type 'Readonly... Remove this comment to see the full error message + this.plan = PricingPlan.getPlanById(this.props.planId); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + const { handleSubmit } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + const registerError = this.props.register.error; let header; if (registerError) { @@ -191,7 +191,7 @@ class CardForm extends Component {

Your card will be charged $1.00 to check its billability.{' '} - // @ts-expect-error ts-migrate(2322) FIXME: Type '() => any' is not assignable to type 'Key | ... Remove this comment to see the full error message + uuidv4()}> - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {!this.props.register.requesting && ( Create OneUptime Account )} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.register.requesting && ( )} @@ -545,34 +545,34 @@ class CardForm extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + CardForm.displayName = 'CardForm'; const validate = function (values: $TSFixMe) { const errors = {}; if (!Validate.text(values.cardName)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'cardName' does not exist on type '{}'. + errors.cardName = 'Name is required.'; } if (!Validate.text(values.city)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'city' does not exist on type '{}'. + errors.city = 'City is required.'; } if (!Validate.text(values.zipCode)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'zipCode' does not exist on type '{}'. + errors.zipCode = 'Zip Code or Postal Code is required.'; } if (!Validate.text(values.country)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'country' does not exist on type '{}'. + errors.country = 'Country is required.'; } if (!Validate.postalCode(values.zipCode)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'zipCode' does not exist on type '{}'. + errors.zipCode = 'Postal Code or Zip Code is invalid.'; } @@ -613,7 +613,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + CardForm.propTypes = { openModal: PropTypes.func, handleSubmit: PropTypes.func.isRequired, @@ -646,5 +646,5 @@ export default class CardFormHOC extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + CardFormHOC.displayName = 'CardFormHOC'; diff --git a/accounts/src/components/auth/ChangePasswordForm.tsx b/accounts/src/components/auth/ChangePasswordForm.tsx index 59bf49f380..cc78b6829a 100755 --- a/accounts/src/components/auth/ChangePasswordForm.tsx +++ b/accounts/src/components/auth/ChangePasswordForm.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { connect } from 'react-redux'; import { Validate } from '../../config'; @@ -13,7 +13,7 @@ import { } from '../../actions/changePassword'; import { bindActionCreators } from 'redux'; import { RenderField } from '../basic/RenderField'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; const errorStyle = { @@ -21,14 +21,14 @@ const errorStyle = { }; export class ChangePasswordForm extends Component { submitForm = (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'token' does not exist on type 'Readonly<... Remove this comment to see the full error message + values.token = this.props.token || ''; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePassword' does not exist on type '... Remove this comment to see the full error message + this.props.changePassword(values); }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message + const changePasswordStateError = this.props.changePasswordState.error; let header; if (changePasswordStateError) { @@ -40,7 +40,7 @@ export class ChangePasswordForm extends Component {

@@ -51,7 +51,7 @@ export class ChangePasswordForm extends Component {

- // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message + {this.props.changePasswordState.success && (

{' '} @@ -62,7 +62,7 @@ export class ChangePasswordForm extends Component { {' '}

)} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message + {!this.props.changePasswordState.success && (

{' '} @@ -70,7 +70,7 @@ export class ChangePasswordForm extends Component {

)} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message + {!this.props.changePasswordState.success && (
{' '} @@ -109,21 +109,21 @@ export class ChangePasswordForm extends Component { type="submit" className="button blue medium" disabled={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message + this.props.changePasswordState .requesting } > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message + {!this.props.changePasswordState .requesting && ( - Change Password - )} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message + Change Password + )} + {this.props.changePasswordState .requesting && ( - - )} + + )}

{' '}
@@ -136,28 +136,28 @@ export class ChangePasswordForm extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ChangePasswordForm.displayName = 'ChangePasswordForm'; function validate(values: $TSFixMe) { const errors = {}; if (!Validate.text(values.password)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'. + errors.password = 'Password is required.'; } if ( Validate.text(values.password) && !Validate.isStrongPassword(values.password) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'. + errors.password = 'Password should be atleast 8 characters long'; } if (!Validate.text(values.confirmPassword)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmPassword' does not exist on type ... Remove this comment to see the full error message + errors.confirmPassword = 'Confirm Password is required.'; } if (!Validate.compare(values.password, values.confirmPassword)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmPassword' does not exist on type ... Remove this comment to see the full error message + errors.confirmPassword = 'Password and confirm password should match.'; } return errors; @@ -186,7 +186,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ChangePasswordForm.propTypes = { changePassword: PropTypes.func.isRequired, handleSubmit: PropTypes.func.isRequired, diff --git a/accounts/src/components/auth/CompanyForm.tsx b/accounts/src/components/auth/CompanyForm.tsx index 32cc1e405c..2557dec718 100755 --- a/accounts/src/components/auth/CompanyForm.tsx +++ b/accounts/src/components/auth/CompanyForm.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import CountrySelector from '../basic/CountrySelector'; import CompanySizeSelector from '../basic/CompanySizeSelector'; @@ -22,11 +22,11 @@ class CompanyForm extends Component {

{' '} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.register.error ? ( {' '} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.register.error} ) : ( @@ -36,9 +36,9 @@ class CompanyForm extends Component {

@@ -142,14 +142,14 @@ class CompanyForm extends Component { type="submit" className="button blue medium" id="create-account-button" - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + disabled={this.props.register.requesting} > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {!this.props.register.requesting && ( Create OneUptime Account )} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.register.requesting && ( )} @@ -163,34 +163,34 @@ class CompanyForm extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + CompanyForm.displayName = 'CompanyForm'; -const validate = function(values: $TSFixMe) { +const validate = function (values: $TSFixMe) { const error = {}; if (!Validate.text(values.companyName)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'companyName' does not exist on type '{}'... Remove this comment to see the full error message + error.companyName = 'Company name is required.'; } if (!Validate.text(values.companyRole)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'companyRole' does not exist on type '{}'... Remove this comment to see the full error message + error.companyRole = 'Job Title is required.'; } if (!Validate.text(values.companyPhoneNumber)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'companyPhoneNumber' does not exist on ty... Remove this comment to see the full error message + error.companyPhoneNumber = 'Phone Number is required.'; } if (!Validate.text(values.comapnySize)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'comapnySize' does not exist on type '{}'... Remove this comment to see the full error message + error.comapnySize = 'Phone Number is required.'; } if (!Validate.text(values.reference)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'reference' does not exist on type '{}'. + error.reference = 'This is required.'; } @@ -214,7 +214,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + CompanyForm.propTypes = { handleSubmit: PropTypes.func.isRequired, register: PropTypes.object.isRequired, diff --git a/accounts/src/components/auth/LoginForm.tsx b/accounts/src/components/auth/LoginForm.tsx index 8244174c33..0fc16a30c8 100755 --- a/accounts/src/components/auth/LoginForm.tsx +++ b/accounts/src/components/auth/LoginForm.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { RenderField } from '../basic/RenderField'; import { connect } from 'react-redux'; @@ -14,7 +14,7 @@ import { } from '../../actions/login'; import { bindActionCreators } from 'redux'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message + import queryString from 'query-string'; import { removeQuery } from '../../store'; @@ -27,7 +27,7 @@ export class LoginForm extends Component { }; componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + const query = queryString.parse(this.props.location.search).status; let serverResponse = ''; if (query === 'already-verified') { @@ -42,14 +42,14 @@ export class LoginForm extends Component { removeQuery('status'); } handleClick(data: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeLogin' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.changeLogin(data); } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + const { handleSubmit } = this.props; const { serverResponse } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + const loginError = this.props.login.error; let header; if (loginError) { @@ -69,7 +69,7 @@ export class LoginForm extends Component {
@@ -91,7 +91,7 @@ export class LoginForm extends Component { />

- // @ts-expect-error ts-migrate(2339) FIXME: Property 'loginMethod' does not exist on type 'Rea... Remove this comment to see the full error message + {this.props.loginMethod === 'standard' ? (

@@ -116,14 +116,14 @@ export class LoginForm extends Component { type="submit" className="button blue medium" id="login-button" - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + disabled={this.props.login.requesting} > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + {!this.props.login.requesting && ( Sign in )} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + {this.props.login.requesting && ( )} @@ -131,7 +131,7 @@ export class LoginForm extends Component {

- // @ts-expect-error ts-migrate(2339) FIXME: Property 'loginMethod' does not exist on type 'Rea... Remove this comment to see the full error message + {this.props.loginMethod === 'standard' ? ( { const thisObj = this; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + const token = queryString.parse(thisObj.props.location.search).token; values.token = token; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'saveUserState' does not exist on type 'R... Remove this comment to see the full error message + this.props.saveUserState(values); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isUserInvited' does not exist on type 'R... Remove this comment to see the full error message + this.props.isUserInvited(values).then( function (value: $TSFixMe) { if (value.data) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'signupUser' does not exist on type 'Read... Remove this comment to see the full error message + thisObj.props.signupUser({ ...values, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'planId' does not exist on type 'Readonly... Remove this comment to see the full error message + planId: thisObj.props.planId, token, }); } else { if (!IS_SAAS_SERVICE) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'signupUser' does not exist on type 'Read... Remove this comment to see the full error message + thisObj.props.signupUser(values); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incrementStep' does not exist on type 'R... Remove this comment to see the full error message + thisObj.props.incrementStep(); } } @@ -62,26 +62,26 @@ export class RegisterForm extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + const { step } = this.props.register; return (

{step === 1 && ( void; error: ... Remove this comment to see the full error message + submitForm={this.userFormSubmitted} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + error={this.props.register.error} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location={this.props.location} /> )} {step === 2 && ( )} @@ -91,7 +91,7 @@ export class RegisterForm extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + RegisterForm.displayName = 'RegisterForm'; const registerForm = reduxForm({ @@ -116,7 +116,7 @@ function mapStateToProps(state: $TSFixMe) { register: state.register, }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + RegisterForm.propTypes = { saveUserState: PropTypes.func.isRequired, isUserInvited: PropTypes.func.isRequired, diff --git a/accounts/src/components/auth/ResetPasswordForm.tsx b/accounts/src/components/auth/ResetPasswordForm.tsx index 5fae6d5447..01f648f133 100755 --- a/accounts/src/components/auth/ResetPasswordForm.tsx +++ b/accounts/src/components/auth/ResetPasswordForm.tsx @@ -1,9 +1,9 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { Validate } from '../../config'; import { ButtonSpinner } from '../basic/Loader.js'; @@ -22,12 +22,12 @@ const errorStyle = { export class ResetPasswordForm extends Component { submitForm = (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPassword' does not exist on type 'R... Remove this comment to see the full error message + this.props.resetPassword(values); }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message + const resetPasswordError = this.props.resetPasswordState.error; let header; if (resetPasswordError) { @@ -45,7 +45,7 @@ export class ResetPasswordForm extends Component {
@@ -53,7 +53,7 @@ export class ResetPasswordForm extends Component {

{header}

- // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message + {this.props.resetPasswordState.success && (

)} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message + {!this.props.resetPasswordState.success && (

{' '} @@ -75,7 +75,7 @@ export class ResetPasswordForm extends Component {

)} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message + {!this.props.resetPasswordState.success && (
{' '} @@ -100,17 +100,17 @@ export class ResetPasswordForm extends Component { className="button blue medium" disabled={ this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message + .resetPasswordState .requesting } > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message + {!this.props.resetPasswordState .requesting && ( Reset Password )} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message + {this.props.resetPasswordState .requesting && ( @@ -128,16 +128,16 @@ export class ResetPasswordForm extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ResetPasswordForm.displayName = 'ResetPasswordForm'; function validate(values: $TSFixMe) { const errors = {}; if (!Validate.text(values.email)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'. + errors.email = 'Email is required.'; } else if (!Validate.email(values.email)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'. + errors.email = 'Email is invalid.'; } return errors; @@ -166,7 +166,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ResetPasswordForm.propTypes = { handleSubmit: PropTypes.func.isRequired, resetPasswordState: PropTypes.object.isRequired, diff --git a/accounts/src/components/auth/UserForm.tsx b/accounts/src/components/auth/UserForm.tsx index 01685ef386..4b982fdb78 100755 --- a/accounts/src/components/auth/UserForm.tsx +++ b/accounts/src/components/auth/UserForm.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; @@ -8,7 +8,7 @@ import { Validate } from '../../config'; import { RenderField } from '../basic/RenderField'; import { ButtonSpinner } from '../basic/Loader.js'; import { removeQuery } from '../../store'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message + import queryString from 'query-string'; import { getEmailFromToken } from '../../actions/register'; @@ -19,7 +19,7 @@ class UserForm extends Component { }; componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + const query = queryString.parse(this.props.location.search); if (query && query.status === 'user-not-found') { @@ -28,9 +28,9 @@ class UserForm extends Component { }); } - // @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. + removeQuery(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getEmailFromToken' does not exist on typ... Remove this comment to see the full error message + this.props.getEmailFromToken(query.token); } @@ -46,10 +46,10 @@ class UserForm extends Component { ) : ( {' '} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.register.error ? ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.register.error} ) : ( @@ -60,9 +60,9 @@ class UserForm extends Component {
@@ -90,13 +90,13 @@ class UserForm extends Component { placeholder="jeff@example.com" required="required" value={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.register.user.email || '' } disabled={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message + this.props.initialValues && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message + this.props.initialValues.email } /> @@ -120,7 +120,7 @@ class UserForm extends Component { placeholder="Jeff Smith" required="required" value={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.register.user.name || '' } /> @@ -201,7 +201,7 @@ class UserForm extends Component { className="password-strength-input" required="required" value={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.register.user.password || '' } @@ -228,7 +228,7 @@ class UserForm extends Component { placeholder="Confirm Password" required="required" value={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.register.user .confirmPassword || '' } @@ -247,26 +247,26 @@ class UserForm extends Component { className="button blue medium" id="create-account-button" disabled={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.register && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + ((this.props.register.isUserInvited && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.register.isUserInvited .requesting) || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.register.requesting) } > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.register && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message - ((this.props.register.isUserInvited && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.register.isUserInvited - .requesting) || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.register.requesting) ? ( + + ((this.props.register.isUserInvited && + + this.props.register.isUserInvited + .requesting) || + + this.props.register.requesting) ? ( ) : ( Sign Up @@ -280,65 +280,65 @@ class UserForm extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + UserForm.displayName = 'UserForm'; -const validate = function(values: $TSFixMe) { +const validate = function (values: $TSFixMe) { const error = {}; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + if (!Validate.text(values.name)) error.name = 'Name is required.'; if (Validate.text(values.name) && !Validate.isValidName(values.name)) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + error.name = 'Name is not valid.'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'. + if (!Validate.text(values.email)) error.email = 'Email is required.'; if (Validate.text(values.email) && !Validate.email(values.email)) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'. + error.email = 'Email is not valid.'; if ( !Validate.isValidBusinessEmail(values.email) && Validate.email(values.email) ) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'. + error.email = 'Please enter a business email address.'; if (!Validate.text(values.companyName)) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'companyName' does not exist on type '{}'... Remove this comment to see the full error message + error.companyName = 'Company name is required.'; if (!Validate.text(values.companyPhoneNumber)) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'companyPhoneNumber' does not exist on ty... Remove this comment to see the full error message + error.companyPhoneNumber = 'Phone number is required.'; if ( Validate.text(values.companyPhoneNumber) && !Validate.isValidNumber(values.companyPhoneNumber) ) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'companyPhoneNumber' does not exist on ty... Remove this comment to see the full error message + error.companyPhoneNumber = 'Phone number is invalid.'; if (!Validate.text(values.password)) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'. + error.password = 'Password is required.'; if ( Validate.text(values.password) && !Validate.isStrongPassword(values.password) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'. + error.password = 'Password should be atleast 8 characters long'; } if (!Validate.text(values.confirmPassword)) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmPassword' does not exist on type ... Remove this comment to see the full error message + error.confirmPassword = 'Confirm Password is required.'; if (!Validate.compare(values.password, values.confirmPassword)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmPassword' does not exist on type ... Remove this comment to see the full error message + error.confirmPassword = 'Password and confirm password should match.'; } @@ -362,7 +362,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + UserForm.propTypes = { submitForm: PropTypes.func.isRequired, handleSubmit: PropTypes.func.isRequired, diff --git a/accounts/src/components/basic/ErrorBoundary.tsx b/accounts/src/components/basic/ErrorBoundary.tsx index 9653817dab..688a169e50 100755 --- a/accounts/src/components/basic/ErrorBoundary.tsx +++ b/accounts/src/components/basic/ErrorBoundary.tsx @@ -13,7 +13,7 @@ class ErrorBoundary extends Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hasError' does not exist on type 'Readon... Remove this comment to see the full error message + if (this.state.hasError || this.state.error) { return (
( Spinner.displayName = 'Spinner'; export const ButtonSpinner = (props: $TSFixMe) =>
{ switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + return this.props.closeModal({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modalId' does not exist on type 'Readonl... Remove this comment to see the full error message + id: this.props.modalId, }); default: @@ -73,9 +73,9 @@ class ExtraCharge extends React.Component { className="bs-Button bs-DeprecatedButton bs-Button--grey" type="button" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + this.props.closeModal({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modalId' does not exist on type 'Readonl... Remove this comment to see the full error message + id: this.props.modalId, }) } @@ -94,13 +94,13 @@ class ExtraCharge extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ExtraCharge.propTypes = { closeModal: PropTypes.func, modalId: PropTypes.string, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ExtraCharge.displayName = 'ExtraCharge'; const mapStateToProps = (state: $TSFixMe) => { diff --git a/accounts/src/config.tsx b/accounts/src/config.tsx index 89f7ff261c..0313db57d5 100755 --- a/accounts/src/config.tsx +++ b/accounts/src/config.tsx @@ -1,10 +1,10 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'sane... Remove this comment to see the full error message + import isEmail from 'sane-email-validation'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'vali... Remove this comment to see the full error message + import validUrl from 'valid-url'; import valid from 'card-validator'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'file... Remove this comment to see the full error message + import FileSaver from 'file-saver'; // import { emaildomains } from './constants/emaildomains'; @@ -33,7 +33,7 @@ if ( } export const env = (value: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property '_env' does not exist on type 'Window & t... Remove this comment to see the full error message + const { _env } = window; return ( (_env && _env[`REACT_APP_${value}`]) || diff --git a/accounts/src/containers/BackboneModals.tsx b/accounts/src/containers/BackboneModals.tsx index 8a6a5ef76d..f6b25cde22 100755 --- a/accounts/src/containers/BackboneModals.tsx +++ b/accounts/src/containers/BackboneModals.tsx @@ -7,7 +7,7 @@ import { closeModal } from '../actions/modal'; export class Modals extends Component { render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modals' does not exist on type 'Readonly... Remove this comment to see the full error message + const modals = this.props.modals.map((item: $TSFixMe, i: $TSFixMe) => { const ModalComponent = Modal(item.content); return ( @@ -18,11 +18,11 @@ export class Modals extends Component { // onClose: item => this.props.closeModal(item) // }) this.props.closeModal(item)} /> ); @@ -31,18 +31,18 @@ export class Modals extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Modals.propTypes = { modals: PropTypes.array.isRequired, closeModal: PropTypes.func.isRequired, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Modals.displayName = 'BlackBoneModals'; export default connect( (state) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modal' does not exist on type 'DefaultRo... Remove this comment to see the full error message + return state.modal; }, (dispatch) => { diff --git a/accounts/src/index.tsx b/accounts/src/index.tsx index 29aec286a8..a7ef99f8a7 100755 --- a/accounts/src/index.tsx +++ b/accounts/src/index.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { Provider } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Frontload } from 'react-frontload'; import ReactGA from 'react-ga'; import ErrorBoundary from './components/basic/ErrorBoundary'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { render } from 'react-dom'; import store, { history, isServer } from './store'; import App from './App'; @@ -17,11 +17,11 @@ if (!isServer) { const target = document.getElementById('root'); render( - // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + - // @ts-expect-error ts-migrate(2739) FIXME: Type '{}' is missing the following properties from... Remove this comment to see the full error message + @@ -30,5 +30,5 @@ render( ); // this will enable the app to work offline and load faster -// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. + serviceWorker.register(); diff --git a/accounts/src/pages/ChangePassword.tsx b/accounts/src/pages/ChangePassword.tsx index 0cf271a041..1f013e9296 100755 --- a/accounts/src/pages/ChangePassword.tsx +++ b/accounts/src/pages/ChangePassword.tsx @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; import ChangePasswordForm from '../components/auth/ChangePasswordForm'; @@ -10,9 +10,9 @@ class ChangePasswordPage extends React.Component { token: $TSFixMe; constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'match' does not exist on type 'Readonly<... Remove this comment to see the full error message + this.token = this.props.match.params.token; //if token is not present. Redirect to login page. @@ -27,7 +27,7 @@ class ChangePasswordPage extends React.Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message + const { masterAdminExists, requestingMasterAdmin } = this.props; return ( @@ -39,7 +39,7 @@ class ChangePasswordPage extends React.Component {
{/* RESET PASSWORD BOX */} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ token: any; }' is not assignable to type '... Remove this comment to see the full error message +

@@ -86,14 +86,14 @@ const mapDispatchToProps = () => { return null; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ChangePasswordPage.propTypes = { match: PropTypes.object.isRequired, masterAdminExists: PropTypes.bool, requestingMasterAdmin: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ChangePasswordPage.displayName = 'ChangePasswordPage'; export default connect(mapStateToProps, mapDispatchToProps)(ChangePasswordPage); diff --git a/accounts/src/pages/Login.tsx b/accounts/src/pages/Login.tsx index 95db7189f0..e0ae6ad4a2 100755 --- a/accounts/src/pages/Login.tsx +++ b/accounts/src/pages/Login.tsx @@ -1,10 +1,10 @@ import React from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import LoginForm from '../components/auth/LoginForm'; import { loginUser, loginUserSso, loginError } from '../actions/login'; @@ -19,7 +19,7 @@ import { changeLogin } from '../actions/login'; class LoginPage extends React.Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } @@ -27,26 +27,26 @@ class LoginPage extends React.Component { document.body.id = 'login'; document.body.style.overflow = 'auto'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + if (this.props.location?.pathname?.includes('/sso/')) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeLogin' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.changeLogin('sso'); } } submitHandler = (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'loginMethod' does not exist on type 'Rea... Remove this comment to see the full error message + if (this.props.loginMethod === 'sso') { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'loginUserSso' does not exist on type 'Re... Remove this comment to see the full error message + this.props.loginUserSso(values); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'loginUser' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.loginUser(values); } }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + const { login, masterAdminExists, requestingMasterAdmin } = this.props; if (login.success && !login.user.tokens) { @@ -65,24 +65,22 @@ class LoginPage extends React.Component {

{/* LOGIN BOX */} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + {!this.props.login.success && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + this.props.login.error && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + this.props.login.error === 'Verify your email first.' ? (
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenRequest' does not exist on ty... Remove this comment to see the full error message + {this.props.resendTokenRequest .requesting ? ( @@ -100,12 +98,12 @@ class LoginPage extends React.Component { login.user && login.user.email ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendToken' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.resendToken( login.user ); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenReset' does not exist on type... Remove this comment to see the full error message + this.props.resendTokenReset(); history.push( '/accounts/user-verify/resend' @@ -124,7 +122,7 @@ class LoginPage extends React.Component {
) : ( @@ -197,7 +195,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( dispatch ); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + LoginPage.propTypes = { loginUser: PropTypes.func.isRequired, loginUserSso: PropTypes.func.isRequired, @@ -214,7 +212,7 @@ LoginPage.propTypes = { changeLogin: PropTypes.func, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + LoginPage.displayName = 'LoginPage'; export default connect(mapStateToProps, mapDispatchToProps)(LoginPage); diff --git a/accounts/src/pages/Register.tsx b/accounts/src/pages/Register.tsx index 181c2d5ba2..61e61b11fc 100755 --- a/accounts/src/pages/Register.tsx +++ b/accounts/src/pages/Register.tsx @@ -1,11 +1,11 @@ import React from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import RegisterForm from '../components/auth/RegisterForm'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message + import queryString from 'query-string'; import { PricingPlan, IS_SAAS_SERVICE } from '../config'; import MessageBox from '../components/MessageBox'; @@ -16,7 +16,7 @@ class RegisterPage extends React.Component { componentWillUnmount() { document.body.id = ''; document.body.className = ''; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'signUpReset' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.signUpReset(); } @@ -25,21 +25,21 @@ class RegisterPage extends React.Component { document.body.className = 'register-page'; document.body.style.overflow = 'auto'; this.planId = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + queryString.parse(this.props.location.search).planId || null; if (!this.planId) { this.planId = PricingPlan.getPlans()[0].planId; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'savePlanId' does not exist on type 'Read... Remove this comment to see the full error message + this.props.savePlanId(this.planId); } componentDidUpdate() { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message + this.props.masterAdminExists && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + !this.props.register.success && !IS_SAAS_SERVICE ) { @@ -48,7 +48,7 @@ class RegisterPage extends React.Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + const { register } = this.props; return ( @@ -61,21 +61,21 @@ class RegisterPage extends React.Component {
{/* REGISTRATION BOX */} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.register.success && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message - !this.props.masterAdminExists && - !register.user.cardRegistered && - !register.user.token ? ( + + !this.props.masterAdminExists && + !register.user.cardRegistered && + !register.user.token ? ( ) : ( )} @@ -129,7 +129,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => { ); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + RegisterPage.propTypes = { location: PropTypes.object.isRequired, register: PropTypes.object, @@ -139,7 +139,7 @@ RegisterPage.propTypes = { masterAdminExists: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + RegisterPage.displayName = 'RegisterPage'; export default connect(mapStateToProps, mapDispatchToProps)(RegisterPage); diff --git a/accounts/src/pages/ResendToken.tsx b/accounts/src/pages/ResendToken.tsx index dd65f07a54..b3b9eadd97 100755 --- a/accounts/src/pages/ResendToken.tsx +++ b/accounts/src/pages/ResendToken.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { connect } from 'react-redux'; import { Validate } from '../config'; @@ -8,9 +8,9 @@ import { ButtonSpinner } from '../components/basic/Loader'; import { resendToken } from '../actions/resendToken'; import { bindActionCreators } from 'redux'; import { RenderField } from '../components/basic/RenderField'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message + import queryString from 'query-string'; import { removeQuery } from '../store'; @@ -23,14 +23,14 @@ export class ResendTokenForm extends Component { }; submitForm = (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendToken' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.resendToken(values); }; componentDidMount() { document.body.id = 'login'; document.body.style.overflow = 'auto'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + const query = queryString.parse(this.props.location.search).status; if (query === 'link-expired') { this.setState({ @@ -41,16 +41,16 @@ export class ResendTokenForm extends Component { serverResponse: 'Invalid Verification link.', }); } - // @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. + removeQuery(); } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message + const { masterAdminExists, requestingMasterAdmin } = this.props; const { serverResponse } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message + const { success } = this.props.resendTokenState; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message + const resendTokenError = this.props.resendTokenState.error; let header; @@ -82,7 +82,7 @@ export class ResendTokenForm extends Component {
@@ -91,7 +91,7 @@ export class ResendTokenForm extends Component {

{header}

- // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message + {this.props.resendTokenState.success && (

)} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message + {!this.props.resendTokenState.success && (

{' '} @@ -113,7 +113,7 @@ export class ResendTokenForm extends Component {

)} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message + {!this.props.resendTokenState.success && (
{' '} @@ -136,23 +136,23 @@ export class ResendTokenForm extends Component { type="submit" className="button blue medium" disabled={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message + this.props.resendTokenState .requesting } > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message + {!this.props.resendTokenState .requesting && ( - - Send Verification Link - - )} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message + + Send Verification Link + + )} + {this.props.resendTokenState .requesting && ( - - )} + + )}

{' '}
@@ -187,16 +187,16 @@ export class ResendTokenForm extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ResendTokenForm.displayName = 'ResendTokenForm'; function validate(values: $TSFixMe) { const errors = {}; if (!Validate.text(values.email)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'. + errors.email = 'Email is required.'; } else if (!Validate.email(values.email)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'. + errors.email = 'Email is invalid.'; } return errors; @@ -224,7 +224,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ResendTokenForm.propTypes = { handleSubmit: PropTypes.func.isRequired, resendTokenState: PropTypes.object.isRequired, diff --git a/accounts/src/pages/ResetPassword.tsx b/accounts/src/pages/ResetPassword.tsx index e84854af4c..7f80618deb 100755 --- a/accounts/src/pages/ResetPassword.tsx +++ b/accounts/src/pages/ResetPassword.tsx @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; import ResetPasswordForm from '../components/auth/ResetPasswordForm'; @@ -12,7 +12,7 @@ class ResetPasswordPage extends React.Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message + const { masterAdminExists, requestingMasterAdmin } = this.props; return ( @@ -59,7 +59,7 @@ class ResetPasswordPage extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ResetPasswordPage.displayName = 'ResetPasswordPage'; const mapStateToProps = (state: $TSFixMe) => { @@ -69,7 +69,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ResetPasswordPage.propTypes = { masterAdminExists: PropTypes.bool, requestingMasterAdmin: PropTypes.bool, diff --git a/accounts/src/pages/SsoLogin.tsx b/accounts/src/pages/SsoLogin.tsx index 82bbe5620f..cc4c069db9 100644 --- a/accounts/src/pages/SsoLogin.tsx +++ b/accounts/src/pages/SsoLogin.tsx @@ -1,5 +1,5 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message + import qs from 'query-string'; import PropTypes from 'prop-types'; import store from '../store'; @@ -8,7 +8,7 @@ import { DASHBOARD_URL, ADMIN_DASHBOARD_URL } from '../config'; class SsoLoginPage extends React.Component { componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + const query = qs.parse(this.props.location.search); const user = { id: query.id, @@ -27,7 +27,7 @@ class SsoLoginPage extends React.Component { const { statusPageLogin, statusPageURL } = state.login; if (statusPageLogin) { const newURL = `${statusPageURL}?userId=${user.id}&accessToken=${user.tokens.jwtAccessToken}`; - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message + return (window.location = newURL); } @@ -48,13 +48,13 @@ class SsoLoginPage extends React.Component { } if (user.redirect) { - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message + return (window.location = `${user.redirect}?accessToken=${user.tokens.jwtAccessToken}`); } else if (user.role === 'master-admin') { - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message + window.location = ADMIN_DASHBOARD_URL; } else { - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message + window.location = DASHBOARD_URL; } } @@ -63,10 +63,10 @@ class SsoLoginPage extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + SsoLoginPage.displayName = 'SsoLoginPage'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + SsoLoginPage.propTypes = { location: PropTypes.object.isRequired, }; diff --git a/accounts/src/pages/VerifyAuthToken.tsx b/accounts/src/pages/VerifyAuthToken.tsx index 219f2475b3..0742bf636f 100644 --- a/accounts/src/pages/VerifyAuthToken.tsx +++ b/accounts/src/pages/VerifyAuthToken.tsx @@ -1,13 +1,13 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { connect } from 'react-redux'; import { ButtonSpinner } from '../components/basic/Loader'; import { verifyAuthToken } from '../actions/login'; import { bindActionCreators } from 'redux'; import { RenderField } from '../components/basic/RenderField'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import { ACCOUNTS_URL } from '../config'; @@ -17,7 +17,7 @@ const errorStyle = { color: '#c23d4b' }; export class VerifyAuthToken extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } @@ -27,18 +27,18 @@ export class VerifyAuthToken extends Component { } submitForm = (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + const email = this.props.login.user.email; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'verifyAuthToken' does not exist on type ... Remove this comment to see the full error message + this.props.verifyAuthToken({ ...values, email }); }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + if (!this.props.login.user.email) - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message + window.location = ACCOUNTS_URL + '/login'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + const { error } = this.props.login.authToken; let header; @@ -58,7 +58,7 @@ export class VerifyAuthToken extends Component {
@@ -91,21 +91,21 @@ export class VerifyAuthToken extends Component { type="submit" className="button blue medium" disabled={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + this.props.login.authToken .requesting } > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + {!this.props.login.authToken .requesting && ( - Verify token - )} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + Verify token + )} + {this.props.login.authToken .requesting && ( - - )} + + )}

@@ -146,13 +146,13 @@ export class VerifyAuthToken extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + VerifyAuthToken.displayName = 'VerifyAuthToken'; function validate(values: $TSFixMe) { const errors = {}; if (!values.token) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'token' does not exist on type '{}'. + errors.token = 'Please provide token.'; } return errors; @@ -169,7 +169,7 @@ const mapStateToProps = (state: $TSFixMe) => { const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ verifyAuthToken }, dispatch); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + VerifyAuthToken.propTypes = { handleSubmit: PropTypes.func.isRequired, verifyAuthToken: PropTypes.func.isRequired, diff --git a/accounts/src/pages/VerifyBackupCode.tsx b/accounts/src/pages/VerifyBackupCode.tsx index 56dd394d36..0327a874cd 100644 --- a/accounts/src/pages/VerifyBackupCode.tsx +++ b/accounts/src/pages/VerifyBackupCode.tsx @@ -1,13 +1,13 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { connect } from 'react-redux'; import { ButtonSpinner } from '../components/basic/Loader'; import { verifyBackupCode } from '../actions/login'; import { bindActionCreators } from 'redux'; import { RenderField } from '../components/basic/RenderField'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import { ACCOUNTS_URL } from '../config'; @@ -16,7 +16,7 @@ const errorStyle = { color: '#c23d4b' }; export class VerifyBackupCode extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } @@ -26,18 +26,18 @@ export class VerifyBackupCode extends Component { } submitForm = (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + const email = this.props.login.user.email; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'verifyBackupCode' does not exist on type... Remove this comment to see the full error message + this.props.verifyBackupCode({ ...values, email }); }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + if (!this.props.login.user.email) - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message + window.location = ACCOUNTS_URL + '/login'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message + const { backupCode } = this.props.login; let header; @@ -57,7 +57,7 @@ export class VerifyBackupCode extends Component {
@@ -137,13 +137,13 @@ export class VerifyBackupCode extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + VerifyBackupCode.displayName = 'VerifyBackupCode'; function validate(values: $TSFixMe) { const errors = {}; if (!values.code) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'code' does not exist on type '{}'. + errors.code = 'Please provide a backup code.'; } return errors; @@ -160,7 +160,7 @@ const mapStateToProps = (state: $TSFixMe) => { const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ verifyBackupCode }, dispatch); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + VerifyBackupCode.propTypes = { handleSubmit: PropTypes.func.isRequired, verifyBackupCode: PropTypes.func, diff --git a/admin-dashboard/src/App.tsx b/admin-dashboard/src/App.tsx index ca026b8948..08c94d3c45 100644 --- a/admin-dashboard/src/App.tsx +++ b/admin-dashboard/src/App.tsx @@ -1,5 +1,5 @@ import React, { Suspense } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Router, Route, Redirect, Switch } from 'react-router-dom'; import { history } from './store'; import { connect } from 'react-redux'; @@ -20,7 +20,7 @@ if (userData !== undefined) { User.setEmail(userData.email); User.setName(userData.name); } else { - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message + window.location = ACCOUNTS_URL; } diff --git a/admin-dashboard/src/components/404.tsx b/admin-dashboard/src/components/404.tsx index 68974c8bea..9fbdfa3985 100644 --- a/admin-dashboard/src/components/404.tsx +++ b/admin-dashboard/src/components/404.tsx @@ -35,7 +35,7 @@ class NotFound extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + NotFound.displayName = 'NotFound'; export default NotFound; diff --git a/admin-dashboard/src/components/Clipboard.tsx b/admin-dashboard/src/components/Clipboard.tsx index be72e5979a..55a0c13cc7 100644 --- a/admin-dashboard/src/components/Clipboard.tsx +++ b/admin-dashboard/src/components/Clipboard.tsx @@ -20,7 +20,7 @@ class ClipboardWrap extends React.Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'value' does not exist on type 'Readonly<... Remove this comment to see the full error message + const { value } = this.props; return ( @@ -56,10 +56,10 @@ class ClipboardWrap extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ClipboardWrap.displayName = 'ClipboardWrap'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ClipboardWrap.propTypes = { value: PropTypes.string, }; diff --git a/admin-dashboard/src/components/ContextModal.tsx b/admin-dashboard/src/components/ContextModal.tsx index e7acb57dca..fa4713dfc6 100644 --- a/admin-dashboard/src/components/ContextModal.tsx +++ b/admin-dashboard/src/components/ContextModal.tsx @@ -1,12 +1,12 @@ import React from 'react'; -export default function(Cm: $TSFixMe) { +export default function (Cm: $TSFixMe) { return (props: $TSFixMe) => ( -
-
- -
+
+
+
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'Ele... Remove this comment to see the full error message - ).displayName = 'ContextModal'; +
+ + ).displayName = 'ContextModal'; } diff --git a/admin-dashboard/src/components/Dashboard.tsx b/admin-dashboard/src/components/Dashboard.tsx index f10b7657e9..97b40660fb 100644 --- a/admin-dashboard/src/components/Dashboard.tsx +++ b/admin-dashboard/src/components/Dashboard.tsx @@ -4,11 +4,11 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import SideNav from './nav/SideNav'; import TopNav from './nav/TopNav'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link, withRouter } from 'react-router-dom'; import ShouldRender from './basic/ShouldRender'; import ProfileMenu from './profile/ProfileMenu'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; import { hideProfileMenu } from '../actions/profile'; import NotificationMenu from './notification/NotificationMenu'; @@ -25,15 +25,15 @@ import { loadDashboard } from '../actions/dashboard'; export class DashboardApp extends Component { componentDidMount = async () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchLicense' does not exist on type 'Re... Remove this comment to see the full error message + fetchLicense, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + user, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'license' does not exist on type 'Readonl... Remove this comment to see the full error message + license, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSettings' does not exist on type 'R... Remove this comment to see the full error message + fetchSettings, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'loadDashboard' does not exist on type 'R... Remove this comment to see the full error message + loadDashboard, } = this.props; if ( @@ -58,25 +58,25 @@ export class DashboardApp extends Component { }; showProjectForm = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showForm' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.showForm(); }; hideProfileMenu = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideProfileMenu' does not exist on type ... Remove this comment to see the full error message + this.props.hideProfileMenu(); }; closeNotificationMenu = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeNotificationMenu' does not exist on... Remove this comment to see the full error message + this.props.closeNotificationMenu(); }; handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeNotificationMenu' does not exist on... Remove this comment to see the full error message + this.props.closeNotificationMenu(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideProfileMenu' does not exist on type ... Remove this comment to see the full error message + this.props.hideProfileMenu(); return true; default: @@ -85,36 +85,36 @@ export class DashboardApp extends Component { }; closeModal = () => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + this.props.closeModal({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentModal' does not exist on type 'Re... Remove this comment to see the full error message + id: this.props.currentModal ? this.props.currentModal.id : '', }); render() { const { children, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'license' does not exist on type 'Readonl... Remove this comment to see the full error message + license, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'settings' does not exist on type 'Readon... Remove this comment to see the full error message + settings, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'twilio' does not exist on type 'Readonly... Remove this comment to see the full error message + twilio, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'smtp' does not exist on type 'Readonly<{... Remove this comment to see the full error message + smtp, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'dashboardLoadState' does not exist on ty... Remove this comment to see the full error message + dashboardLoadState, } = this.props; return ( - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ visible: any; }' is not assignable to type... Remove this comment to see the full error message + @@ -149,7 +149,7 @@ export class DashboardApp extends Component { } > @@ -176,7 +176,7 @@ export class DashboardApp extends Component { } > @@ -263,10 +263,10 @@ export class DashboardApp extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + DashboardApp.displayName = 'DashboardApp'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + DashboardApp.propTypes = { profile: PropTypes.object.isRequired, notification: PropTypes.object.isRequired, @@ -317,7 +317,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( dispatch ); -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + DashboardApp.contextTypes = {}; export default withRouter( diff --git a/admin-dashboard/src/components/Modal.tsx b/admin-dashboard/src/components/Modal.tsx index e430118ade..fcf1b11fb3 100644 --- a/admin-dashboard/src/components/Modal.tsx +++ b/admin-dashboard/src/components/Modal.tsx @@ -5,42 +5,42 @@ const composableComponent = (ComposedComponent: $TSFixMe) => { class Modal extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; this.onClose = this.onClose.bind(this); this.onConfirm = this.onConfirm.bind(this); } onClose = (value: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.item.onClose) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.item.onClose(value); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.onClose(this.props.item); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.onClose(this.props.item); } }; onConfirm = (value: $TSFixMe) => { const _this = this; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.item.onConfirm) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.item.onConfirm(value).then( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + () => _this.props.onClose(_this.props.item), - () => {} + () => { } ); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.onClose(this.props.item); } }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'zIndex' does not exist on type 'Readonly... Remove this comment to see the full error message + const { zIndex } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { extraClasses } = this.props.item; const mainClass = `${extraClasses || ''} modal-dialog-view`; @@ -69,7 +69,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => { >
{ ); } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Modal.propTypes = { onConfirm: PropTypes.func, item: PropTypes.object.isRequired, @@ -91,7 +91,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => { zIndex: PropTypes.number.isRequired, }; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Modal.displayName = 'Modal'; return Modal; diff --git a/admin-dashboard/src/components/Modalize.tsx b/admin-dashboard/src/components/Modalize.tsx index d3fa7fabdd..3e901f4fbf 100644 --- a/admin-dashboard/src/components/Modalize.tsx +++ b/admin-dashboard/src/components/Modalize.tsx @@ -16,7 +16,7 @@ export function Modalize({
diff --git a/admin-dashboard/src/components/NotRequiredAuth.tsx b/admin-dashboard/src/components/NotRequiredAuth.tsx index 8fd5028608..e93d8faac4 100644 --- a/admin-dashboard/src/components/NotRequiredAuth.tsx +++ b/admin-dashboard/src/components/NotRequiredAuth.tsx @@ -3,12 +3,12 @@ import { connect } from 'react-redux'; import { User } from '../config'; import { history } from '../store'; -export default function(ComposedComponent: $TSFixMe) { +export default function (ComposedComponent: $TSFixMe) { class NotAuthentication extends Component { isAuthenticated: $TSFixMe; constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; this.isAuthenticated = User.isLoggedIn(); @@ -35,7 +35,7 @@ export default function(ComposedComponent: $TSFixMe) { return {}; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + NotAuthentication.displayName = 'NotAuthentication'; return connect(mapStateToProps)(NotAuthentication); diff --git a/admin-dashboard/src/components/OutsideCLick.tsx b/admin-dashboard/src/components/OutsideCLick.tsx index 4e8419c2a9..f822eb7a53 100644 --- a/admin-dashboard/src/components/OutsideCLick.tsx +++ b/admin-dashboard/src/components/OutsideCLick.tsx @@ -48,7 +48,7 @@ export default (ComposedComponent: $TSFixMe, extras: $TSFixMe) => { } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + OutsideCkick.displayName = 'OutsideCkick'; return OutsideCkick; diff --git a/admin-dashboard/src/components/PublicPage.tsx b/admin-dashboard/src/components/PublicPage.tsx index fae3de26e0..987ccf338d 100644 --- a/admin-dashboard/src/components/PublicPage.tsx +++ b/admin-dashboard/src/components/PublicPage.tsx @@ -1,5 +1,5 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Route, Redirect, Switch } from 'react-router-dom'; import routes from '../routes'; @@ -8,12 +8,12 @@ const { allRoutes } = routes; const PublicPage = () => ( {allRoutes - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isPublic' does not exist on type '{ titl... Remove this comment to see the full error message + .filter(route => route.isPublic) .map((route, index) => ( { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'addNote' does not exist on type 'Readonl... Remove this comment to see the full error message + await this.props.addNote(this.props.id, values.adminNotes); }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + const { handleSubmit, requesting } = this.props; return (
@@ -98,7 +98,7 @@ export class AdminNotes extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + AdminNotes.displayName = 'AdminNotes'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({}, dispatch); @@ -107,7 +107,7 @@ const mapStateToProps = () => { return {}; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + AdminNotes.propTypes = { requesting: PropTypes.bool, addNote: PropTypes.func.isRequired, diff --git a/admin-dashboard/src/components/auditLogs/AuditLogsJsonViewModal.tsx b/admin-dashboard/src/components/auditLogs/AuditLogsJsonViewModal.tsx index 0ee310470b..645756470c 100644 --- a/admin-dashboard/src/components/auditLogs/AuditLogsJsonViewModal.tsx +++ b/admin-dashboard/src/components/auditLogs/AuditLogsJsonViewModal.tsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import ShouldRender from '../basic/ShouldRender'; import ReactJson from 'react-json-view'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; class AuditLogsJsonViewModal extends Component { @@ -18,7 +18,7 @@ class AuditLogsJsonViewModal extends Component { handleKeyboard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message + return this.props.closeThisDialog(); default: return false; @@ -27,15 +27,15 @@ class AuditLogsJsonViewModal extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + isRequesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message + error, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message + closeThisDialog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'reqLog' does not exist on type 'Readonly... Remove this comment to see the full error message + reqLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resLog' does not exist on type 'Readonly... Remove this comment to see the full error message + resLog, } = this.props; @@ -161,7 +161,7 @@ class AuditLogsJsonViewModal extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + AuditLogsJsonViewModal.displayName = 'AuditLogsJsonViewModal'; const mapStateToProps = (state: $TSFixMe) => { @@ -177,7 +177,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + AuditLogsJsonViewModal.propTypes = { isRequesting: PropTypes.oneOfType([ PropTypes.bool, diff --git a/admin-dashboard/src/components/auditLogs/AuditLogsList.tsx b/admin-dashboard/src/components/auditLogs/AuditLogsList.tsx index a10a86bd46..c4541ae94d 100644 --- a/admin-dashboard/src/components/auditLogs/AuditLogsList.tsx +++ b/admin-dashboard/src/components/auditLogs/AuditLogsList.tsx @@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { ListLoader } from '../basic/Loader'; import { openModal, closeModal } from '../../actions/modal'; @@ -17,9 +17,9 @@ export class AuditLogsList extends Component { } handleDelete = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + const { openModal } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteModalId' does not exist on type 'R... Remove this comment to see the full error message + const { deleteModalId } = this.state; openModal({ id: deleteModalId, @@ -30,7 +30,7 @@ export class AuditLogsList extends Component { handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + return this.props.closeModal({ id: this.state.deleteModalId }); default: return false; @@ -39,64 +39,64 @@ export class AuditLogsList extends Component { render() { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs.skip && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + typeof this.props.auditLogs.skip === 'string' ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs.skip = parseInt(this.props.auditLogs.skip, 10); } if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs.limit && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + typeof this.props.auditLogs.limit === 'string' ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs.limit = parseInt( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs.limit, 10 ); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + if (!this.props.auditLogs.skip) this.props.auditLogs.skip = 0; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + if (!this.props.auditLogs.limit) this.props.auditLogs.limit = 0; let canNext = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message - this.props.auditLogs.count && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message - this.props.auditLogs.count > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + + this.props.auditLogs.count && + + this.props.auditLogs.count > + this.props.auditLogs.skip + this.props.auditLogs.limit ? true : false; let canPrev = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs && this.props.auditLogs.skip <= 0 ? false : true; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.auditLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + (this.props.requesting || !this.props.auditLogs.auditLogs) ) { canNext = false; canPrev = false; } const numberOfPages = Math.ceil( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + parseInt(this.props.auditLogs && this.props.auditLogs.count) / 10 ); return ( @@ -148,7 +148,7 @@ export class AuditLogsList extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + {this.props.requesting ? ( @@ -169,13 +169,13 @@ export class AuditLogsList extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + ) : this.props.auditLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message - this.props.auditLogs.auditLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message - this.props.auditLogs.auditLogs.length > 0 ? ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + + this.props.auditLogs.auditLogs && + + this.props.auditLogs.auditLogs.length > 0 ? ( + this.props.auditLogs.auditLogs.map((auditLog: $TSFixMe) => { return ( {auditLog.projectId ? auditLog - .projectId - .name + .projectId + .name : 'N/A'}
@@ -211,8 +211,8 @@ export class AuditLogsList extends Component { {auditLog.userId ? auditLog - .userId - .name + .userId + .name : 'N/A'}
@@ -230,12 +230,12 @@ export class AuditLogsList extends Component {
{auditLog.request && - auditLog - .request - .apiSection + auditLog + .request + .apiSection ? auditLog - .request - .apiSection + .request + .apiSection : ''}
@@ -255,7 +255,7 @@ export class AuditLogsList extends Component {
@@ -328,22 +328,22 @@ export class AuditLogsList extends Component { > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + Page {this.props.page} of{' '} {numberOfPages} ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message + {this.props.auditLogs.count} {' '} Log 0} > s @@ -360,11 +360,11 @@ export class AuditLogsList extends Component {
@@ -444,25 +442,21 @@ export class CallLogsList extends Component { id="log-count" className="Text-color--inherit Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap" > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.callLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.callLogs.count - ? `Page ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.page - } of ${numberOfPages} (${this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message - .callLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.callLogs.count} Log${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.callLogs && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.callLogs.count === 1 - ? '' - : 's' - })` + + this.props.callLogs.count + ? `Page ${this.props.page + } of ${numberOfPages} (${this.props + + .callLogs && + + this.props.callLogs.count} Log${this.props.callLogs && + + this.props.callLogs.count === 1 + ? '' + : 's' + })` : null} @@ -474,11 +468,11 @@ export class CallLogsList extends Component {
@@ -447,22 +445,22 @@ export class EmailLogsList extends Component { > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + Page {this.props.page} of{' '} {numberOfPages} ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message + {this.props.emailLogs.count} {' '} Log 0} > s @@ -479,11 +477,11 @@ export class EmailLogsList extends Component {
@@ -194,57 +194,55 @@ export class ProjectDetails extends Component { > {
{this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message + .project !== - null + null ? this - .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message - .project - .deleted + .props + + .project + .deleted ? 'Deleted' : this - .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message - .project - .isBlocked - ? 'Blocked' - : 'Active' + .props + + .project + .isBlocked + ? 'Blocked' + : 'Active' : 'LOADING...'} @@ -270,7 +268,7 @@ export class ProjectDetails extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ProjectDetails.displayName = 'ProjectDetails'; const mapStateToProps = (state: $TSFixMe) => { @@ -283,12 +281,12 @@ const mapStateToProps = (state: $TSFixMe) => { const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({}, dispatch); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ProjectDetails.propTypes = { project: PropTypes.object.isRequired, }; -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + ProjectDetails.contextTypes = {}; export default connect(mapStateToProps, mapDispatchToProps)(ProjectDetails); diff --git a/admin-dashboard/src/components/project/ProjectDomain.tsx b/admin-dashboard/src/components/project/ProjectDomain.tsx index 98cc2d1cae..94cf41a4e4 100644 --- a/admin-dashboard/src/components/project/ProjectDomain.tsx +++ b/admin-dashboard/src/components/project/ProjectDomain.tsx @@ -6,7 +6,7 @@ import { bindActionCreators } from 'redux'; import { openModal } from '../../actions/modal'; import DeleteDomain from './DeleteDomain'; import DataPathHoC from '../DataPathHoC'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { ListLoader } from '../basic/Loader'; import ShouldRender from '../basic/ShouldRender'; @@ -17,7 +17,7 @@ import ProjectResetDomain from './ProjectResetDomain'; class ProjectDomain extends Component { limit: $TSFixMe; constructor() { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 1-2 arguments, but got 0. + super(); this.limit = 10; this.state = { @@ -26,28 +26,28 @@ class ProjectDomain extends Component { } componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const projectId = this.props.projectId; if (projectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message + this.props.fetchProjectDomains(this.props.projectId, 0, this.limit); } } componentDidUpdate(prevProps: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + if (prevProps.projectId !== this.props.projectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const projectId = this.props.projectId; if (projectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message + this.props.fetchProjectDomains(projectId, 0, this.limit); } } } prevClicked = (projectId: $TSFixMe, skip: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message + const { fetchProjectDomains } = this.props; fetchProjectDomains( projectId, @@ -57,7 +57,7 @@ class ProjectDomain extends Component { }; nextClicked = (projectId: $TSFixMe, skip: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message + const { fetchProjectDomains } = this.props; fetchProjectDomains( projectId, @@ -68,21 +68,21 @@ class ProjectDomain extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectDomain' does not exist on type 'R... Remove this comment to see the full error message + projectDomain: { domains }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + openModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'limit' does not exist on type 'Readonly<... Remove this comment to see the full error message + limit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + skip, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message + count, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message + error, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + requesting, } = this.props; const footerBorderTopStyle = { margin: 0, padding: 0 }; @@ -284,7 +284,7 @@ class ProjectDomain extends Component { { removeUserModalId: this .state - // @ts-expect-error ts-migrate(2339) FIXME: Property 'removeUserModalId' does not exist on typ... Remove this comment to see the full error message + .removeUserModalId, domainId: eachDomain._id, @@ -335,8 +335,8 @@ class ProjectDomain extends Component { > {(!domains || domains.length === 0) && - !requesting && - !error + !requesting && + !error ? 'You have no domain at this time' : null} @@ -354,14 +354,14 @@ class ProjectDomain extends Component { id="customFieldCount" className="Text-color--inherit Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap" > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message + {this.props.count - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message + ? this.props.count + - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - (this.props.count > 1 - ? ' Domains' - : ' Domain') + + (this.props.count > 1 + ? ' Domains' + : ' Domain') : '0 Domain'} @@ -427,7 +427,7 @@ class ProjectDomain extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ProjectDomain.displayName = 'ProjectDomain'; const mapStateToProps = (state: $TSFixMe) => ({ @@ -439,7 +439,7 @@ const mapStateToProps = (state: $TSFixMe) => ({ skip: state.project.projectDomain.skip }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ProjectDomain.propTypes = { projectId: PropTypes.string, fetchProjectDomains: PropTypes.func, diff --git a/admin-dashboard/src/components/project/ProjectList.tsx b/admin-dashboard/src/components/project/ProjectList.tsx index ca68af3bdd..d1118e1dbf 100644 --- a/admin-dashboard/src/components/project/ProjectList.tsx +++ b/admin-dashboard/src/components/project/ProjectList.tsx @@ -9,58 +9,58 @@ import { history } from '../../store'; export class ProjectList extends Component { render() { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects.skip && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + typeof this.props.projects.skip === 'string' ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects.skip = parseInt(this.props.projects.skip, 10); } if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects.limit && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + typeof this.props.projects.limit === 'string' ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects.limit = parseInt(this.props.projects.limit, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + if (!this.props.projects.skip) this.props.projects.skip = 0; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + if (!this.props.projects.limit) this.props.projects.limit = 0; let canNext = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects.count && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects.count > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + + this.props.projects.count && + + this.props.projects.count > + this.props.projects.skip + this.props.projects.limit ? true : false; let canPrev = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects && this.props.projects.skip <= 0 ? false : true; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + (this.props.requesting || !this.props.projects.projects) ) { canNext = false; canPrev = false; } const numberOfPages = Math.ceil( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + parseInt(this.props.projects && this.props.projects.count) / 10 ); return ( @@ -149,7 +149,7 @@ export class ProjectList extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + {this.props.requesting ? ( @@ -182,13 +182,13 @@ export class ProjectList extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + ) : this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects.projects.length > 0 ? ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + + this.props.projects.projects && + + this.props.projects.projects.length > 0 ? ( + this.props.projects.projects.map( (project: $TSFixMe, index: $TSFixMe) => { const projectOwner = @@ -206,9 +206,8 @@ export class ProjectList extends Component { ) { usersDetail = `${projectOwner.name} and 1 other`; } else { - usersDetail = `${ - projectOwner.name - } and ${project.users.length - + usersDetail = `${projectOwner.name + } and ${project.users.length - 1} others`; } } else { @@ -223,7 +222,7 @@ export class ProjectList extends Component { onClick={() => { history.push( '/admin/projects/' + - project.slug + project.slug ); }} > @@ -389,21 +388,21 @@ export class ProjectList extends Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - (!this.props.projects.projects || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - !this.props.projects.projects.length) && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message - !this.props.requesting && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - !this.props.projects.error + + (!this.props.projects.projects || + + !this.props.projects.projects.length) && + + !this.props.requesting && + + !this.props.projects.error ? "We don't have any projects yet" : null} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + {this.props.projects && this.props.projects.error - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + ? this.props.projects.error : null}
@@ -413,39 +412,33 @@ export class ProjectList extends Component { {numberOfPages > 0 - ? `Page ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.page - } of ${numberOfPages} (${this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - .projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects - .count} Project${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects.count === 1 - ? '' - : 's' - })` - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + ? `Page ${this.props.page + } of ${numberOfPages} (${this.props + + .projects && + + this.props.projects + .count} Project${this.props.projects && + + this.props.projects.count === 1 + ? '' + : 's' + })` + : this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects.count - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - ? `${this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects - .count} Project${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message - this.props.projects.count === 1 - ? '' - : 's' - }` - : null} + + this.props.projects.count + + ? `${this.props.projects && + + this.props.projects + .count} Project${this.props.projects && + + this.props.projects.count === 1 + ? '' + : 's' + }` + : null} @@ -456,11 +449,11 @@ export class ProjectList extends Component { + + - - -
- +
+ +
-
- ); - } else { - return null; - } - }); + ); + } else { + return null; + } + }); }; render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message + count, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateUsers' does not exist on type 'Rea... Remove this comment to see the full error message + updateUsers, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteError' does not exist on type 'Rea... Remove this comment to see the full error message + deleteError, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'canPaginateBackward' does not exist on t... Remove this comment to see the full error message + canPaginateBackward, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'canPaginateForward' does not exist on ty... Remove this comment to see the full error message + canPaginateForward, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + paginate, } = this.props; const numberOfPages = Math.ceil(parseInt(count) / 10); @@ -345,7 +342,7 @@ class ProjectUser extends Component { > @@ -358,7 +355,7 @@ class ProjectUser extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectName' does not exist on type 'Rea... Remove this comment to see the full error message + {this.props.projectName} @@ -370,7 +367,7 @@ class ProjectUser extends Component { >
@@ -490,11 +484,10 @@ class ProjectUser extends Component {
@@ -469,22 +467,22 @@ export class SmsLogsList extends Component { > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + Page {this.props.page} of{' '} {numberOfPages} ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'smsLogs' does not exist on type 'Readonl... Remove this comment to see the full error message + {this.props.smsLogs.count} {' '} Log 0} > s @@ -501,11 +499,11 @@ export class SmsLogsList extends Component {
{ return bindActionCreators({ fetchUserloginHistory }, dispatch); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + UserHistory.propTypes = { fetchUserloginHistory: PropTypes.func.isRequired, userId: PropTypes.string, diff --git a/admin-dashboard/src/components/user/UserList.tsx b/admin-dashboard/src/components/user/UserList.tsx index a13e248b33..9c9b0b4d6f 100644 --- a/admin-dashboard/src/components/user/UserList.tsx +++ b/admin-dashboard/src/components/user/UserList.tsx @@ -1,5 +1,5 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import moment from 'moment'; @@ -32,11 +32,10 @@ const UserList = ({
- {`${ - user.projects && user.projects[0] + {`${user.projects && user.projects[0] ? user.projects[0].name : 'Not Added Yet' - }`}{' '} + }`}{' '} {user.projects && user.projects.length - 1 > 0 ? user.projects.length - 1 > 1 ? `and ${user.projects.length - 1} others` @@ -69,7 +68,7 @@ const UserList = ({ {user.name ? 'Online ' + - moment(user.lastActive).fromNow() + moment(user.lastActive).fromNow() : 'Invitation Sent'} diff --git a/admin-dashboard/src/components/user/UserProject.tsx b/admin-dashboard/src/components/user/UserProject.tsx index 8660fe82a7..e19f61d5b5 100644 --- a/admin-dashboard/src/components/user/UserProject.tsx +++ b/admin-dashboard/src/components/user/UserProject.tsx @@ -7,29 +7,29 @@ import { fetchUserProjects } from '../../actions/project'; class UserProject extends React.Component { constructor() { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 1-2 arguments, but got 0. + super(); this.state = { page: 1 }; } prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'userId' does not exist on type 'Readonly... Remove this comment to see the full error message + const { userId } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUserProjects' does not exist on typ... Remove this comment to see the full error message + this.props.fetchUserProjects( userId, (skip || 0) > (limit || 10) ? skip - limit : 0, 10 ); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'userId' does not exist on type 'Readonly... Remove this comment to see the full error message + const { userId } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUserProjects' does not exist on typ... Remove this comment to see the full error message + this.props.fetchUserProjects(userId, skip + limit, 10); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; render() { @@ -56,13 +56,13 @@ class UserProject extends React.Component {
@@ -72,7 +72,7 @@ class UserProject extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + UserProject.displayName = 'UserProject'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -87,7 +87,7 @@ const mapStateToProps = (state: $TSFixMe) => { projects: state.project.userProjects, }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + UserProject.propTypes = { fetchUserProjects: PropTypes.func.isRequired, userId: PropTypes.string, diff --git a/admin-dashboard/src/components/user/UserRestoreBox.tsx b/admin-dashboard/src/components/user/UserRestoreBox.tsx index e0a25e4d5f..7e2dec545d 100644 --- a/admin-dashboard/src/components/user/UserRestoreBox.tsx +++ b/admin-dashboard/src/components/user/UserRestoreBox.tsx @@ -10,18 +10,18 @@ import { openModal, closeModal } from '../../actions/modal'; export class UserRestoreBox extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } handleClick = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'restoreUser' does not exist on type 'Rea... Remove this comment to see the full error message + const { restoreUser, userId } = this.props; return restoreUser(userId); }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + const { isRequesting } = this.props; return ( @@ -65,7 +65,7 @@ export class UserRestoreBox extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + UserRestoreBox.displayName = 'UserRestoreBox'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ restoreUser, openModal, closeModal }, dispatch); @@ -84,7 +84,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + UserRestoreBox.propTypes = { isRequesting: PropTypes.oneOf([null, undefined, true, false]), userId: PropTypes.oneOfType([ @@ -94,7 +94,7 @@ UserRestoreBox.propTypes = { restoreUser: PropTypes.func.isRequired, }; -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + UserRestoreBox.contextTypes = {}; export default connect(mapStateToProps, mapDispatchToProps)(UserRestoreBox); diff --git a/admin-dashboard/src/components/user/UserSetting.tsx b/admin-dashboard/src/components/user/UserSetting.tsx index 9b929becc6..608d483892 100644 --- a/admin-dashboard/src/components/user/UserSetting.tsx +++ b/admin-dashboard/src/components/user/UserSetting.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import ShouldRender from '../basic/ShouldRender'; import PropTypes from 'prop-types'; @@ -12,7 +12,7 @@ import MessageModal from './MessageModal'; export class UserSetting extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; this.state = { messageModalId: uuidv4(), @@ -20,34 +20,34 @@ export class UserSetting extends Component { } handleChange = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { user, updateTwoFactorAuthToken, setTwoFactorAuth } = this.props; if (user) { return !user.twoFactorAuthEnabled && user.role === 'user' - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + ? this.props.openModal({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'messageModalId' does not exist on type '... Remove this comment to see the full error message - id: this.state.messageModalId, - content: MessageModal, - }) + + id: this.state.messageModalId, + content: MessageModal, + }) : !user.twoFactorAuthEnabled && user.role !== 'user' - ? updateTwoFactorAuthToken(user._id, { - twoFactorAuthEnabled: true, - email: user.email, - }).then(() => { - setTwoFactorAuth(true); - }) - : updateTwoFactorAuthToken(user._id, { - twoFactorAuthEnabled: false, - email: user.email, - }).then(() => { - setTwoFactorAuth(false); - }); + ? updateTwoFactorAuthToken(user._id, { + twoFactorAuthEnabled: true, + email: user.email, + }).then(() => { + setTwoFactorAuth(true); + }) + : updateTwoFactorAuthToken(user._id, { + twoFactorAuthEnabled: false, + email: user.email, + }).then(() => { + setTwoFactorAuth(false); + }); } }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + let { twoFactorAuthEnabled } = this.props.user; if (twoFactorAuthEnabled === undefined) { twoFactorAuthEnabled = false; @@ -60,7 +60,7 @@ export class UserSetting extends Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + {this.props.user.deleted ? (
Deleted
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + ) : this.props.user.isBlocked ? (
Blocked
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + ) : this.props.user.isAdminMode ? (
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + {this.props.user !== undefined && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.user.name - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + + this.props.user.name + ? this.props.user.name : 'LOADING...'} @@ -174,15 +174,15 @@ export class UserSetting extends Component { }} > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + {this.props.user !== null && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.user.email - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + + this.props.user.email + ? this.props.user.email : 'LOADING...'} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + {!this.props.user.isVerified ? (
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + {this.props.user !== null && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.user.companyName - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + + this.props.user.companyName + ? this.props.user - .companyName + .companyName : 'LOADING...'}
@@ -265,20 +265,20 @@ export class UserSetting extends Component { }} > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + {this.props.user !== null && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.user - .companyPhoneNumber - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + + this.props.user + .companyPhoneNumber + ? this.props.user - .companyPhoneNumber + .companyPhoneNumber : 'LOADING...'}
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message +
@@ -364,7 +364,7 @@ export class UserSetting extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + UserSetting.displayName = 'UserSetting'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -382,7 +382,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + UserSetting.propTypes = { user: PropTypes.object.isRequired, updateTwoFactorAuthToken: PropTypes.func, @@ -391,7 +391,7 @@ UserSetting.propTypes = { isVerified: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + UserSetting.contextTypes = {}; export default connect(mapStateToProps, mapDispatchToProps)(UserSetting); diff --git a/admin-dashboard/src/components/user/UserUnblockBox.tsx b/admin-dashboard/src/components/user/UserUnblockBox.tsx index cc7ec3172b..b451de1ff8 100644 --- a/admin-dashboard/src/components/user/UserUnblockBox.tsx +++ b/admin-dashboard/src/components/user/UserUnblockBox.tsx @@ -10,18 +10,18 @@ import { openModal, closeModal } from '../../actions/modal'; export class UserUnblockBox extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } handleClick = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'unblockUser' does not exist on type 'Rea... Remove this comment to see the full error message + const { unblockUser, userId } = this.props; return unblockUser(userId); }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + const { isRequesting } = this.props; return ( @@ -65,7 +65,7 @@ export class UserUnblockBox extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + UserUnblockBox.displayName = 'UserUnblockBox'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ unblockUser, openModal, closeModal }, dispatch); @@ -83,7 +83,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + UserUnblockBox.propTypes = { isRequesting: PropTypes.oneOf([null, undefined, true, false]), userId: PropTypes.oneOfType([ @@ -93,7 +93,7 @@ UserUnblockBox.propTypes = { unblockUser: PropTypes.func.isRequired, }; -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + UserUnblockBox.contextTypes = {}; export default connect(mapStateToProps, mapDispatchToProps)(UserUnblockBox); diff --git a/admin-dashboard/src/config.tsx b/admin-dashboard/src/config.tsx index 69a4f6e192..925f0dfd3e 100644 --- a/admin-dashboard/src/config.tsx +++ b/admin-dashboard/src/config.tsx @@ -1,17 +1,17 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'sane... Remove this comment to see the full error message + import isEmail from 'sane-email-validation'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'vali... Remove this comment to see the full error message + import validUrl from 'valid-url'; import valid from 'card-validator'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'file... Remove this comment to see the full error message + import FileSaver from 'file-saver'; -// @ts-expect-error ts-migrate(2614) FIXME: Module '"./constants/emaildomains"' has no exporte... Remove this comment to see the full error message + import { emaildomains } from './constants/emaildomains'; import booleanParser from './utils/booleanParser'; export const env = (value: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property '_env' does not exist on type 'Window & t... Remove this comment to see the full error message + const { _env } = window; return ( (_env && _env[`REACT_APP_${value}`]) || @@ -283,7 +283,7 @@ export const ValidateField = { ? undefined : 'Please enter a valid number', - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + email: (email: $TSFixMe) => this.text(email) && isEmail(email) ? undefined : 'Please enter a valid email', @@ -498,23 +498,23 @@ export const makeCriteria = (val: $TSFixMe) => { for (let i = 0; i < val.length; i++) { const val3 = {}; if (val[i].responseType && val[i].responseType.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'responseType' does not exist on type '{}... Remove this comment to see the full error message + val3.responseType = val[i].responseType; } if (val[i].filter && val[i].filter.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type '{}'. + val3.filter = val[i].filter; } if (val[i].field1 && val[i].field1.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field1' does not exist on type '{}'. + val3.field1 = val[i].field1; } if (val[i].field2 && val[i].field2.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field2' does not exist on type '{}'. + val3.field2 = val[i].field2; } if (val[i].collection && val[i].collection.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'collection' does not exist on type '{}'. + val3.collection = makeCriteria(val[i].collection); } if (val[0].match && val[0].match.length && val[0].match === 'all') { @@ -524,9 +524,9 @@ export const makeCriteria = (val: $TSFixMe) => { or.push(val3); } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'and' does not exist on type '{}'. + val2.and = and; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'or' does not exist on type '{}'. + val2.or = or; return val2; } @@ -537,35 +537,35 @@ export const mapCriteria = (val: $TSFixMe) => { for (let i = 0; i < val.and.length; i++) { const val3 = {}; if (val.and[i].responseType && val.and[i].responseType.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'responseType' does not exist on type '{}... Remove this comment to see the full error message + val3.responseType = val.and[i].responseType; } if (val.and[i].filter && val.and[i].filter.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type '{}'. + val3.filter = val.and[i].filter; } if (val.and[i].field1 && val.and[i].field1.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field1' does not exist on type '{}'. + val3.field1 = val.and[i].field1; } if (val.and[i].field2 && val.and[i].field2.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field2' does not exist on type '{}'. + val3.field2 = val.and[i].field2; } if ( val.and[i].collection && (val.and[i].collection.and || val.and[i].collection.or) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field3' does not exist on type '{}'. + val3.field3 = true; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'collection' does not exist on type '{}'. + val3.collection = mapCriteria(val.and[i].collection); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field3' does not exist on type '{}'. + val3.field3 = false; } if (i === 0) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'match' does not exist on type '{}'. + val3.match = 'all'; } val2.push(val3); @@ -575,35 +575,35 @@ export const mapCriteria = (val: $TSFixMe) => { for (let i = 0; i < val.or.length; i++) { const val3 = {}; if (val.or[i].responseType && val.or[i].responseType.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'responseType' does not exist on type '{}... Remove this comment to see the full error message + val3.responseType = val.or[i].responseType; } if (val.or[i].filter && val.or[i].filter.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type '{}'. + val3.filter = val.or[i].filter; } if (val.or[i].field1 && val.or[i].field1.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field1' does not exist on type '{}'. + val3.field1 = val.or[i].field1; } if (val.or[i].field2 && val.or[i].field2.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field2' does not exist on type '{}'. + val3.field2 = val.or[i].field2; } if ( val.or[i].collection && (val.or[i].collection.and || val.or[i].collection.or) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field3' does not exist on type '{}'. + val3.field3 = true; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'collection' does not exist on type '{}'. + val3.collection = mapCriteria(val.or[i].collection); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'field3' does not exist on type '{}'. + val3.field3 = false; } if (i === 0) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'match' does not exist on type '{}'. + val3.match = 'any'; } val2.push(val3); diff --git a/admin-dashboard/src/containers/BackboneModals.tsx b/admin-dashboard/src/containers/BackboneModals.tsx index 8a6a5ef76d..f6b25cde22 100644 --- a/admin-dashboard/src/containers/BackboneModals.tsx +++ b/admin-dashboard/src/containers/BackboneModals.tsx @@ -7,7 +7,7 @@ import { closeModal } from '../actions/modal'; export class Modals extends Component { render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modals' does not exist on type 'Readonly... Remove this comment to see the full error message + const modals = this.props.modals.map((item: $TSFixMe, i: $TSFixMe) => { const ModalComponent = Modal(item.content); return ( @@ -18,11 +18,11 @@ export class Modals extends Component { // onClose: item => this.props.closeModal(item) // }) this.props.closeModal(item)} /> ); @@ -31,18 +31,18 @@ export class Modals extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Modals.propTypes = { modals: PropTypes.array.isRequired, closeModal: PropTypes.func.isRequired, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Modals.displayName = 'BlackBoneModals'; export default connect( (state) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modal' does not exist on type 'DefaultRo... Remove this comment to see the full error message + return state.modal; }, (dispatch) => { diff --git a/admin-dashboard/src/index.tsx b/admin-dashboard/src/index.tsx index f0bb2d9339..40bfccb969 100644 --- a/admin-dashboard/src/index.tsx +++ b/admin-dashboard/src/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Provider } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { render } from 'react-dom'; import store, { history } from './store'; import App from './App'; @@ -10,7 +10,7 @@ import ErrorBoundary from './components/basic/ErrorBoundary'; const target = document.getElementById('root'); render( - // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + diff --git a/admin-dashboard/src/pages/AuditLogs.tsx b/admin-dashboard/src/pages/AuditLogs.tsx index 7060878de0..d9e1a6a171 100644 --- a/admin-dashboard/src/pages/AuditLogs.tsx +++ b/admin-dashboard/src/pages/AuditLogs.tsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'loda... Remove this comment to see the full error message + import * as _ from 'lodash'; import AuditLogsList from '../components/auditLogs/AuditLogsList'; @@ -12,7 +12,7 @@ import { fetchAuditLogStatus, } from '../actions/auditLogs'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import AlertPanel from '../components/basic/AlertPanel'; import ShouldRender from '../components/basic/ShouldRender'; @@ -28,9 +28,9 @@ class AuditLogs extends React.Component { } prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchAuditLogs' does not exist on type '... Remove this comment to see the full error message + const { fetchAuditLogs, searchAuditLogs } = this.props; if (searchBox && searchBox !== '') { @@ -42,14 +42,14 @@ class AuditLogs extends React.Component { } else { fetchAuditLogs((skip || 0) > (limit || 10) ? skip - limit : 0, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchAuditLogs' does not exist on type '... Remove this comment to see the full error message + const { fetchAuditLogs, searchAuditLogs } = this.props; if (searchBox && searchBox !== '') { @@ -57,20 +57,20 @@ class AuditLogs extends React.Component { } else { fetchAuditLogs(skip + limit, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchAuditLogs' does not exist on type '... Remove this comment to see the full error message + this.props.fetchAuditLogs(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchAuditLogStatus' does not exist on t... Remove this comment to see the full error message + this.props.fetchAuditLogStatus(); } onChange = (e: $TSFixMe) => { const value = e.target.value; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchAuditLogs' does not exist on type ... Remove this comment to see the full error message + const { searchAuditLogs } = this.props; this.setState({ searchBox: value }); @@ -79,7 +79,7 @@ class AuditLogs extends React.Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogStatus' does not exist on type '... Remove this comment to see the full error message + const { auditLogStatus } = this.props; return (
@@ -176,18 +176,18 @@ class AuditLogs extends React.Component {
@@ -201,7 +201,7 @@ class AuditLogs extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + AuditLogs.displayName = 'AuditLogs'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -234,7 +234,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + AuditLogs.propTypes = { fetchAuditLogs: PropTypes.func.isRequired, searchAuditLogs: PropTypes.func.isRequired, diff --git a/admin-dashboard/src/pages/CallLogs.tsx b/admin-dashboard/src/pages/CallLogs.tsx index 14c793be91..db0db8cecf 100644 --- a/admin-dashboard/src/pages/CallLogs.tsx +++ b/admin-dashboard/src/pages/CallLogs.tsx @@ -10,7 +10,7 @@ import { fetchCallLogStatus, } from '../actions/callLogs'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import AlertPanel from '../components/basic/AlertPanel'; import ShouldRender from '../components/basic/ShouldRender'; @@ -26,9 +26,9 @@ class CallLogs extends React.Component { } prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCallLogs' does not exist on type 'R... Remove this comment to see the full error message + const { fetchCallLogs, searchCallLogs } = this.props; if (searchBox && searchBox !== '') { @@ -40,14 +40,14 @@ class CallLogs extends React.Component { } else { fetchCallLogs((skip || 0) > (limit || 10) ? skip - limit : 0, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCallLogs' does not exist on type 'R... Remove this comment to see the full error message + const { fetchCallLogs, searchCallLogs } = this.props; if (searchBox && searchBox !== '') { @@ -55,20 +55,20 @@ class CallLogs extends React.Component { } else { fetchCallLogs(skip + limit, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCallLogs' does not exist on type 'R... Remove this comment to see the full error message + this.props.fetchCallLogs(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCallLogStatus' does not exist on ty... Remove this comment to see the full error message + this.props.fetchCallLogStatus(); } onChange = (e: $TSFixMe) => { const value = e.target.value; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchCallLogs' does not exist on type '... Remove this comment to see the full error message + const { searchCallLogs } = this.props; this.setState({ searchBox: value }); @@ -77,7 +77,7 @@ class CallLogs extends React.Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogStatus' does not exist on type 'R... Remove this comment to see the full error message + const { callLogStatus } = this.props; return (
@@ -172,15 +172,15 @@ class CallLogs extends React.Component {
@@ -194,7 +194,7 @@ class CallLogs extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + CallLogs.displayName = 'CallLogs'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -226,7 +226,7 @@ const mapStateToProps = (state: $TSFixMe) => { changeCallLogStatus, }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + CallLogs.propTypes = { fetchCallLogs: PropTypes.func.isRequired, searchCallLogs: PropTypes.func.isRequired, diff --git a/admin-dashboard/src/pages/EmailLogs.tsx b/admin-dashboard/src/pages/EmailLogs.tsx index 80ca4b56f1..3a9955ce4f 100644 --- a/admin-dashboard/src/pages/EmailLogs.tsx +++ b/admin-dashboard/src/pages/EmailLogs.tsx @@ -10,7 +10,7 @@ import { fetchEmailLogStatus, } from '../actions/emailLogs'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import AlertPanel from '../components/basic/AlertPanel'; import ShouldRender from '../components/basic/ShouldRender'; @@ -26,9 +26,9 @@ class EmailLogs extends React.Component { } prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchEmailLogs' does not exist on type '... Remove this comment to see the full error message + const { fetchEmailLogs, searchEmailLogs } = this.props; if (searchBox && searchBox !== '') { @@ -40,14 +40,14 @@ class EmailLogs extends React.Component { } else { fetchEmailLogs((skip || 0) > (limit || 10) ? skip - limit : 0, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchEmailLogs' does not exist on type '... Remove this comment to see the full error message + const { fetchEmailLogs, searchEmailLogs } = this.props; if (searchBox && searchBox !== '') { @@ -55,20 +55,20 @@ class EmailLogs extends React.Component { } else { fetchEmailLogs(skip + limit, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchEmailLogs' does not exist on type '... Remove this comment to see the full error message + this.props.fetchEmailLogs(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchEmailLogStatus' does not exist on t... Remove this comment to see the full error message + this.props.fetchEmailLogStatus(); } onChange = (e: $TSFixMe) => { const value = e.target.value; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchEmailLogs' does not exist on type ... Remove this comment to see the full error message + const { searchEmailLogs } = this.props; this.setState({ searchBox: value }); @@ -77,7 +77,7 @@ class EmailLogs extends React.Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogStatus' does not exist on type '... Remove this comment to see the full error message + const { emailLogStatus } = this.props; return (
@@ -173,18 +173,18 @@ class EmailLogs extends React.Component {
@@ -198,7 +198,7 @@ class EmailLogs extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + EmailLogs.displayName = 'EmailLogs'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -230,7 +230,7 @@ const mapStateToProps = (state: $TSFixMe) => { changeEmailLogStatus, }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + EmailLogs.propTypes = { fetchEmailLogs: PropTypes.func.isRequired, searchEmailLogs: PropTypes.func.isRequired, diff --git a/admin-dashboard/src/pages/License.tsx b/admin-dashboard/src/pages/License.tsx index 99b870b016..47eef05a9a 100644 --- a/admin-dashboard/src/pages/License.tsx +++ b/admin-dashboard/src/pages/License.tsx @@ -7,7 +7,7 @@ import { fetchLicense } from '../actions/license'; class License extends Component { componentDidMount = async () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchLicense' does not exist on type 'Re... Remove this comment to see the full error message + await this.props.fetchLicense(); }; @@ -39,15 +39,15 @@ class License extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + License.displayName = 'License'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ fetchLicense }, dispatch); -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + License.contextTypes = {}; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + License.propTypes = { fetchLicense: PropTypes.func.isRequired, }; diff --git a/admin-dashboard/src/pages/Probes.tsx b/admin-dashboard/src/pages/Probes.tsx index b921db9957..be04476e25 100644 --- a/admin-dashboard/src/pages/Probes.tsx +++ b/admin-dashboard/src/pages/Probes.tsx @@ -6,7 +6,7 @@ import ProbeList from '../components/probe/ProbeList'; import { getProbes } from '../actions/probe'; import ShouldRender from '../components/basic/ShouldRender'; import { FormLoader } from '../components/basic/Loader'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { openModal, closeModal } from '../actions/modal'; import ProbeAddModal from '../components/probe/ProbeAddModal'; @@ -21,7 +21,7 @@ class Probes extends React.Component { componentDidMount() { window.addEventListener('keydown', this.handleKeyboard); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getProbes' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.getProbes(0, 10); } @@ -30,9 +30,9 @@ class Probes extends React.Component { } handleKeyboard = (event: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modalId' does not exist on type 'Readonl... Remove this comment to see the full error message + const { modalId, modalList } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'addModalId' does not exist on type 'Read... Remove this comment to see the full error message + const { addModalId } = this.state; if (event.target.localName === 'body' && event.key) { @@ -51,26 +51,26 @@ class Probes extends React.Component { }; prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getProbes' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.getProbes( (skip || 0) > (limit || 10) ? skip - limit : 0, 10 ); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getProbes' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.getProbes(skip + limit, 10); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; handleClick = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'addModalId' does not exist on type 'Read... Remove this comment to see the full error message + const { addModalId } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: addModalId, onConfirm: () => true, @@ -174,10 +174,10 @@ class Probes extends React.Component { vo... Remove this comment to see the full error message + prevClicked={this.prevClicked} nextClicked={this.nextClicked} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + page={this.state.page} /> @@ -191,7 +191,7 @@ class Probes extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Probes.displayName = 'Probes'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -205,7 +205,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Probes.propTypes = { getProbes: PropTypes.func.isRequired, openModal: PropTypes.func, diff --git a/admin-dashboard/src/pages/Project.tsx b/admin-dashboard/src/pages/Project.tsx index aba141e848..09bceec416 100644 --- a/admin-dashboard/src/pages/Project.tsx +++ b/admin-dashboard/src/pages/Project.tsx @@ -20,15 +20,15 @@ import ProjectDomain from '../components/project/ProjectDomain'; class Project extends Component { componentDidMount = async () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProject' does not exist on type 'Re... Remove this comment to see the full error message + this.props.fetchProject(this.props.slug); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message + if (this.props.project._id) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectTeam' does not exist on type... Remove this comment to see the full error message + this.props.fetchProjectTeam(this.props.project._id); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProject' does not exist on type 'Re... Remove this comment to see the full error message + const { fetchProject, slug, fetchProjectTeam, project } = this.props; fetchProject(slug); if (project._id) { @@ -37,11 +37,11 @@ class Project extends Component { }; componentDidUpdate(prevProps: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message + if (prevProps.project._id !== this.props.project._id) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message + if (this.props.project._id) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectTeam' does not exist on type... Remove this comment to see the full error message + this.props.fetchProjectTeam(this.props.project._id); } } @@ -61,90 +61,90 @@ class Project extends Component {
1 + + this.props.projectUsers + .page > 1 ? true : false } canPaginateForward={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectUsers' does not exist on type 'Re... Remove this comment to see the full error message + this.props.projectUsers && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectUsers' does not exist on type 'Re... Remove this comment to see the full error message - this.props.projectUsers - .team && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectUsers' does not exist on type 'Re... Remove this comment to see the full error message - this.props.projectUsers.team - .count > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectUsers' does not exist on type 'Re... Remove this comment to see the full error message + + this.props.projectUsers + .team && + + this.props.projectUsers.team + .count > + this.props.projectUsers .page * - 10 + 10 ? true : false } @@ -152,39 +152,39 @@ class Project extends Component {
@@ -209,9 +209,9 @@ class Project extends Component { @@ -236,9 +236,9 @@ class Project extends Component { @@ -248,9 +248,9 @@ class Project extends Component { @@ -294,10 +294,10 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + Project.contextTypes = {}; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Project.propTypes = { addProjectNote: PropTypes.func.isRequired, initialValues: PropTypes.object, @@ -309,7 +309,7 @@ Project.propTypes = { slug: PropTypes.string, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Project.displayName = 'Project'; export default connect(mapStateToProps, mapDispatchToProps)(Project); diff --git a/admin-dashboard/src/pages/Projects.tsx b/admin-dashboard/src/pages/Projects.tsx index 3f43963806..81673daebe 100644 --- a/admin-dashboard/src/pages/Projects.tsx +++ b/admin-dashboard/src/pages/Projects.tsx @@ -4,7 +4,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import ProjectList from '../components/project/ProjectList'; import { fetchProjects, searchProjects } from '../actions/project'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'loda... Remove this comment to see the full error message + import * as _ from 'lodash'; class Projects extends React.Component { handleKeyBoard: $TSFixMe; @@ -18,9 +18,9 @@ class Projects extends React.Component { } prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjects' does not exist on type 'R... Remove this comment to see the full error message + const { fetchProjects, searchProjects } = this.props; if (searchBox && searchBox !== '') { @@ -32,14 +32,14 @@ class Projects extends React.Component { } else { fetchProjects((skip || 0) > (limit || 10) ? skip - limit : 0, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjects' does not exist on type 'R... Remove this comment to see the full error message + const { fetchProjects, searchProjects } = this.props; if (searchBox && searchBox !== '') { @@ -47,18 +47,18 @@ class Projects extends React.Component { } else { fetchProjects(skip + limit, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; componentDidMount = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjects' does not exist on type 'R... Remove this comment to see the full error message + this.props.fetchProjects(); }; onChange = (e: $TSFixMe) => { const value = e.target.value; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchProjects' does not exist on type '... Remove this comment to see the full error message + const { searchProjects } = this.props; this.setState({ searchBox: value }); @@ -134,15 +134,15 @@ class Projects extends React.Component { @@ -156,7 +156,7 @@ class Projects extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Projects.displayName = 'Projects'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -179,7 +179,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Projects.propTypes = { fetchProjects: PropTypes.func.isRequired, searchProjects: PropTypes.func.isRequired, diff --git a/admin-dashboard/src/pages/SmsLogs.tsx b/admin-dashboard/src/pages/SmsLogs.tsx index 104774b299..7d7b0d288c 100644 --- a/admin-dashboard/src/pages/SmsLogs.tsx +++ b/admin-dashboard/src/pages/SmsLogs.tsx @@ -10,7 +10,7 @@ import { fetchSmsLogStatus, } from '../actions/smsLogs'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Link } from 'react-router-dom'; import AlertPanel from '../components/basic/AlertPanel'; import ShouldRender from '../components/basic/ShouldRender'; @@ -26,9 +26,9 @@ class SmsLogs extends React.Component { } prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSmsLogs' does not exist on type 'Re... Remove this comment to see the full error message + const { fetchSmsLogs, searchSmsLogs } = this.props; if (searchBox && searchBox !== '') { @@ -40,14 +40,14 @@ class SmsLogs extends React.Component { } else { fetchSmsLogs((skip || 0) > (limit || 10) ? skip - limit : 0, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSmsLogs' does not exist on type 'Re... Remove this comment to see the full error message + const { fetchSmsLogs, searchSmsLogs } = this.props; if (searchBox && searchBox !== '') { @@ -55,20 +55,20 @@ class SmsLogs extends React.Component { } else { fetchSmsLogs(skip + limit, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; componentDidMount = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSmsLogs' does not exist on type 'Re... Remove this comment to see the full error message + this.props.fetchSmsLogs(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSmsLogStatus' does not exist on typ... Remove this comment to see the full error message + this.props.fetchSmsLogStatus(); }; onChange = (e: $TSFixMe) => { const value = e.target.value; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchSmsLogs' does not exist on type 'R... Remove this comment to see the full error message + const { searchSmsLogs } = this.props; this.setState({ searchBox: value }); @@ -77,7 +77,7 @@ class SmsLogs extends React.Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'smsLogStatus' does not exist on type 'Re... Remove this comment to see the full error message + const { smsLogStatus } = this.props; return (
@@ -171,15 +171,15 @@ class SmsLogs extends React.Component {
@@ -193,7 +193,7 @@ class SmsLogs extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + SmsLogs.displayName = 'SmsLogs'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -226,7 +226,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + SmsLogs.propTypes = { fetchSmsLogs: PropTypes.func.isRequired, searchSmsLogs: PropTypes.func.isRequired, diff --git a/admin-dashboard/src/pages/User.tsx b/admin-dashboard/src/pages/User.tsx index ffbbf8cf64..3b1dad82ad 100644 --- a/admin-dashboard/src/pages/User.tsx +++ b/admin-dashboard/src/pages/User.tsx @@ -3,7 +3,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ShouldRender from '../components/basic/ShouldRender'; -// @ts-expect-error ts-migrate(2613) FIXME: Module '"/home/nawazdhandala/Projects/OneUptime/ap... Remove this comment to see the full error message + import UserSetting from '../components/user/UserSetting'; import UserProject from '../components/user/UserProject'; import UserHistory from '../components/user/UserHistory'; @@ -20,11 +20,11 @@ import { User as LsUser } from '../config'; class User extends Component { componentDidMount = async () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUserProjects' does not exist on typ... Remove this comment to see the full error message + await this.props.fetchUserProjects(this.props.match.params.userId); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUser' does not exist on type 'Reado... Remove this comment to see the full error message + await this.props.fetchUser(this.props.match.params.userId); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUserloginHistory' does not exist on... Remove this comment to see the full error message + await this.props.fetchUserloginHistory(this.props.match.params.userId); }; @@ -46,18 +46,18 @@ class User extends Component {
@@ -65,7 +65,7 @@ class User extends Component {
@@ -162,9 +162,9 @@ class User extends Component { @@ -203,10 +203,10 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + User.contextTypes = {}; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + User.propTypes = { match: PropTypes.object.isRequired, fetchUserProjects: PropTypes.func.isRequired, @@ -218,7 +218,7 @@ User.propTypes = { fetchUserloginHistory: PropTypes.func, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + User.displayName = 'User'; export default connect(mapStateToProps, mapDispatchToProps)(User); diff --git a/admin-dashboard/src/pages/Users.tsx b/admin-dashboard/src/pages/Users.tsx index 2e85411686..92be4ecbbf 100644 --- a/admin-dashboard/src/pages/Users.tsx +++ b/admin-dashboard/src/pages/Users.tsx @@ -6,11 +6,11 @@ import UserList from '../components/user/UserList'; import { fetchUsers, searchUsers } from '../actions/user'; import { ListLoader } from '../components/basic/Loader'; import ShouldRender from '../components/basic/ShouldRender'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { openModal, closeModal } from '../actions/modal'; import UserAddModal from '../components/user/UserAddModal'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'loda... Remove this comment to see the full error message + import * as _ from 'lodash'; class Users extends Component { @@ -26,7 +26,7 @@ class Users extends Component { componentDidMount() { window.addEventListener('keydown', this.handleKeyboard); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUsers' does not exist on type 'Read... Remove this comment to see the full error message + this.props.fetchUsers(); } @@ -35,9 +35,9 @@ class Users extends Component { } handleKeyboard = (event: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modalId' does not exist on type 'Readonl... Remove this comment to see the full error message + const { modalId } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'addModalId' does not exist on type 'Read... Remove this comment to see the full error message + const { addModalId } = this.state; if (event.target.localName === 'body' && event.key) { @@ -56,9 +56,9 @@ class Users extends Component { }; prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUsers' does not exist on type 'Read... Remove this comment to see the full error message + const { fetchUsers, searchUsers } = this.props; if (searchBox && searchBox !== '') { @@ -70,14 +70,14 @@ class Users extends Component { } else { fetchUsers((skip || 0) > (limit || 10) ? skip - limit : 0, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchBox' does not exist on type 'Reado... Remove this comment to see the full error message + const { searchBox } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUsers' does not exist on type 'Read... Remove this comment to see the full error message + const { fetchUsers, searchUsers } = this.props; if (searchBox && searchBox !== '') { @@ -85,13 +85,13 @@ class Users extends Component { } else { fetchUsers(skip + limit, 10); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; onChange = (e: $TSFixMe) => { const value = e.target.value; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'searchUsers' does not exist on type 'Rea... Remove this comment to see the full error message + const { searchUsers } = this.props; this.setState({ searchBox: value }); @@ -100,9 +100,9 @@ class Users extends Component { }; handleClick = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'addModalId' does not exist on type 'Read... Remove this comment to see the full error message + const { addModalId } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: addModalId, onConfirm: () => true, @@ -111,29 +111,29 @@ class Users extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'users' does not exist on type 'Readonly<... Remove this comment to see the full error message + const { users, user, requesting } = this.props; let canNext = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.user.users && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.user.users.count && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.user.users.count > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + + this.props.user.users.count && + + this.props.user.users.count > + this.props.user.users.skip + this.props.user.users.limit ? true : false; let canPrev = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.user.users && this.props.user.users.skip <= 0 ? false : true; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.user.users && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + (this.props.user.users.requesting || !this.props.user.users) ) { canNext = false; @@ -289,32 +289,27 @@ class Users extends Component {
{numberOfPages > 0 - ? `Page ${ - this.state - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - .page - } of ${numberOfPages} (${ - user.users - .count - } OneUptime User${ - user.users - .count === - 1 - ? '' - : 's' - })` + ? `Page ${this.state + + .page + } of ${numberOfPages} (${user.users + .count + } OneUptime User${user.users + .count === + 1 + ? '' + : 's' + })` : user.users - .count && - `${ - user.users - .count - } OneUptime User${ - user.users - .count === - 1 - ? '' - : 's' - }`} + .count && + `${user.users + .count + } OneUptime User${user.users + .count === + 1 + ? '' + : 's' + }`}
@@ -326,13 +321,13 @@ class Users extends Component { this.prevClicked( this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + .user .users .skip, this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + .user .users .limit @@ -366,13 +361,13 @@ class Users extends Component { this.nextClicked( this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + .user .users .skip, this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message + .user .users .limit @@ -435,10 +430,10 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + Users.contextTypes = {}; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Users.propTypes = { user: PropTypes.object.isRequired, users: PropTypes.array, @@ -449,7 +444,7 @@ Users.propTypes = { modalId: PropTypes.string, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Users.displayName = 'Users'; export default connect(mapStateToProps, mapDispatchToProps)(Users); diff --git a/common-ui/components/basic/Button.tsx b/common-ui/components/basic/Button.tsx index 89f8a0f11f..f7f0208360 100644 --- a/common-ui/components/basic/Button.tsx +++ b/common-ui/components/basic/Button.tsx @@ -7,21 +7,21 @@ export default class Button extends Component { } componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shortcutKey' does not exist on type 'Rea... Remove this comment to see the full error message + if (this.props.shortcutKey) { window.addEventListener('keydown', this.handleKeyboard.bind(this)); } } componentWillUnmount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shortcutKey' does not exist on type 'Rea... Remove this comment to see the full error message + if (this.props.shortcutKey) { window.removeEventListener('keydown', this.handleKeyboard.bind(this)); } } handleKeyboard(event: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shortcutKey' does not exist on type 'Rea... Remove this comment to see the full error message + const { shortcutKey, onClick } = this.props; if (event.target.localName === 'body' && event.key) { @@ -37,7 +37,7 @@ export default class Button extends Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'title' does not exist on type 'Readonly<... Remove this comment to see the full error message + const { title, shortcutKey, id, onClick, disabled } = this.props; return ( @@ -67,7 +67,7 @@ export default class Button extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Button.propTypes = { title: PropTypes.string.isRequired, onClick: PropTypes.func, diff --git a/common-ui/components/basic/Icon.tsx b/common-ui/components/basic/Icon.tsx index 2352069d20..d037598255 100644 --- a/common-ui/components/basic/Icon.tsx +++ b/common-ui/components/basic/Icon.tsx @@ -1,8 +1,8 @@ import React from 'react' -// @ts-expect-error ts-migrate(2307) FIXME: Cannot find module '@fortawesome/react-fontawesome... Remove this comment to see the full error message + import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name 'Icon'. + export default Icon = ({ icon, size diff --git a/common-ui/src/components/basic/Button.tsx b/common-ui/src/components/basic/Button.tsx index f8c52fdb4c..193ea21930 100644 --- a/common-ui/src/components/basic/Button.tsx +++ b/common-ui/src/components/basic/Button.tsx @@ -7,21 +7,21 @@ export default class Button extends Component { } componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shortcutKey' does not exist on type 'Rea... Remove this comment to see the full error message + if (this.props.shortcutKey) { window.addEventListener('keydown', this.handleKeyboard.bind(this)); } } componentWillUnmount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shortcutKey' does not exist on type 'Rea... Remove this comment to see the full error message + if (this.props.shortcutKey) { window.removeEventListener('keydown', this.handleKeyboard.bind(this)); } } handleKeyboard(event: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shortcutKey' does not exist on type 'Rea... Remove this comment to see the full error message + const { shortcutKey, onClick } = this.props; if (event.target.localName === 'body' && event.key) { @@ -37,7 +37,7 @@ export default class Button extends Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'title' does not exist on type 'Readonly<... Remove this comment to see the full error message + const { title, shortcutKey, id, onClick, disabled } = this.props; return (
@@ -353,13 +353,13 @@ export class AlertChargesList extends Component { }} > {(!alertCharges || alertCharges.length === 0) && - !isRequesting && - !error + !isRequesting && + !error ? 'No Alert charge' : null} {error && error ? error : null} {error && - error === + error === "You cannot edit the project because you're not an owner." ? 'Alert Charges are available to only owners.' : error} @@ -370,18 +370,14 @@ export class AlertChargesList extends Component { {numberOfPages > 0 - ? `Page ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - !this.state.page - ? 1 - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - : this.state.page - } of ${numberOfPages} (${count} Alert${ - count === 1 ? '' : 's' - })` - : `${count} Alert${ - count === 1 ? '' : 's' - }`} + ? `Page ${!this.state.page + ? 1 + + : this.state.page + } of ${numberOfPages} (${count} Alert${count === 1 ? '' : 's' + })` + : `${count} Alert${count === 1 ? '' : 's' + }`} @@ -465,7 +461,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + AlertChargesList.propTypes = { alertCharges: PropTypes.array, isRequesting: PropTypes.bool, @@ -479,7 +475,7 @@ AlertChargesList.propTypes = { getProjectBalance: PropTypes.func, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + AlertChargesList.displayName = 'AlertChargesList'; export default connect(mapStateToProps, mapDispatchToProps)(AlertChargesList); diff --git a/dashboard/src/components/alert/AlertTable.tsx b/dashboard/src/components/alert/AlertTable.tsx index 2bcd73c41c..c9c48b628d 100755 --- a/dashboard/src/components/alert/AlertTable.tsx +++ b/dashboard/src/components/alert/AlertTable.tsx @@ -103,7 +103,7 @@ function HTD7() { return (
{text} @@ -396,11 +394,11 @@ function TD8({ {isIncidentStatus ? (
{text} @@ -442,31 +440,31 @@ function AlertTableRows({ }: $TSFixMe) { return alerts.length > 0 ? alerts.map((alert: $TSFixMe, index: $TSFixMe) => ( - - - - - - - - - - - )) + + + + + + + + + + + )) : null; } diff --git a/dashboard/src/components/application/ApplicationLogDetail.tsx b/dashboard/src/components/application/ApplicationLogDetail.tsx index 35d970366b..8391b20b20 100644 --- a/dashboard/src/components/application/ApplicationLogDetail.tsx +++ b/dashboard/src/components/application/ApplicationLogDetail.tsx @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { history } from '../../store'; import ShouldRender from '../basic/ShouldRender'; import { openModal, closeModal } from '../../actions/modal'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { bindActionCreators } from 'redux'; @@ -24,30 +24,30 @@ import * as moment from 'moment'; class ApplicationLogDetail extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; this.state = { deleting: false, deleteModalId: uuidv4(), openApplicationLogKeyModalId: uuidv4(), filter: '', - // @ts-expect-error ts-migrate(2349) FIXME: This expression is not callable. + currentDate: moment(), logType: { value: '', label: 'All Logs' }, }; } deleteApplicationLog = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteApplicationLog' does not exist on ... Remove this comment to see the full error message + const promise = this.props.deleteApplicationLog( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + this.props.currentProject._id, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + this.props.index ); history.push( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProject.slug}/component/${this.props.componentSlug}/application-log` ); @@ -55,19 +55,19 @@ class ApplicationLogDetail extends Component { }; resetApplicationLogKey = () => { return this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetApplicationLogKey' does not exist o... Remove this comment to see the full error message + .resetApplicationLogKey( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + this.props.currentProject._id, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + this.props.index ) .then(() => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + this.props.closeModal({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openApplicationLogKeyModalId' does not e... Remove this comment to see the full error message + id: this.state.openApplicationLogKeyModalId, }); }); @@ -75,56 +75,56 @@ class ApplicationLogDetail extends Component { handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + return this.props.closeModal({ id: this.state.deleteModalId }); default: return false; } }; editApplicationLog = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + const { applicationLog } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editApplicationLogSwitch' does not exist... Remove this comment to see the full error message + this.props.editApplicationLogSwitch(applicationLog._id); }; viewMore = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + const { currentProject, componentSlug, applicationLog } = this.props; history.push( '/dashboard/project/' + - currentProject.slug + - '/component/' + - componentSlug + - '/application-logs/' + - applicationLog.slug + currentProject.slug + + '/component/' + + componentSlug + + '/application-logs/' + + applicationLog.slug ); }; handleStartDateTimeChange = (val: $TSFixMe) => { - // @ts-expect-error ts-migrate(2349) FIXME: This expression is not callable. + const startDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + this.fetchByDateChange(startDate, this.props.endDate); }; handleEndDateTimeChange = (val: $TSFixMe) => { - // @ts-expect-error ts-migrate(2349) FIXME: This expression is not callable. + const endDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + this.fetchByDateChange(this.props.startDate, endDate); }; fetchByDateChange = (startDate: $TSFixMe, endDate: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchLogs' does not exist on type 'Reado... Remove this comment to see the full error message + fetchLogs, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type 'Readonly... Remove this comment to see the full error message + const { filter, logType } = this.state; - // @ts-expect-error ts-migrate(2349) FIXME: This expression is not callable. + if (moment(startDate).isBefore(endDate)) { fetchLogs( currentProject._id, @@ -141,19 +141,19 @@ class ApplicationLogDetail extends Component { }; handleLogTypeChange = (logType: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchLogs' does not exist on type 'Reado... Remove this comment to see the full error message + fetchLogs, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isDetails' does not exist on type 'Reado... Remove this comment to see the full error message + isDetails, } = this.props; // check if it is the details page before actioning @@ -161,7 +161,7 @@ class ApplicationLogDetail extends Component { return; } this.setState({ logType }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type 'Readonly... Remove this comment to see the full error message + const { filter } = this.state; fetchLogs( currentProject._id, @@ -178,20 +178,20 @@ class ApplicationLogDetail extends Component { handleLogFilterChange = (filter: $TSFixMe) => { this.setState({ filter }); const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchLogs' does not exist on type 'Reado... Remove this comment to see the full error message + fetchLogs, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logType' does not exist on type 'Readonl... Remove this comment to see the full error message + const { logType } = this.state; fetchLogs( currentProject._id, @@ -207,20 +207,20 @@ class ApplicationLogDetail extends Component { }; handleNavigationButtonClick = (skip: $TSFixMe, limit: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchLogs' does not exist on type 'Reado... Remove this comment to see the full error message + fetchLogs, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logType' does not exist on type 'Readonl... Remove this comment to see the full error message + const { logType, filter } = this.state; fetchLogs( currentProject._id, @@ -236,13 +236,13 @@ class ApplicationLogDetail extends Component { }; componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchStats' does not exist on type 'Read... Remove this comment to see the full error message + fetchStats, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + componentId, } = this.props; fetchStats(currentProject._id, componentId, applicationLog._id); @@ -255,23 +255,23 @@ class ApplicationLogDetail extends Component { { value: 'info', label: 'Info' }, ]; const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleting' does not exist on type 'Readon... Remove this comment to see the full error message + deleting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteModalId' does not exist on type 'R... Remove this comment to see the full error message + deleteModalId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openApplicationLogKeyModalId' does not e... Remove this comment to see the full error message + openApplicationLogKeyModalId, } = this.state; const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isDetails' does not exist on type 'Reado... Remove this comment to see the full error message + isDetails, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'stats' does not exist on type 'Readonly<... Remove this comment to see the full error message + stats, } = this.props; @@ -284,15 +284,15 @@ class ApplicationLogDetail extends Component {
@@ -328,7 +328,7 @@ class ApplicationLogDetail extends Component { applicationLog={applicationLog} index={applicationLog._id} componentId={componentId} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentSlug' does not exist on type 'R... Remove this comment to see the full error message + componentSlug={this.props.componentSlug} /> @@ -355,7 +355,7 @@ class ApplicationLogDetail extends Component { } } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ApplicationLogDetail.displayName = 'ApplicationLogDetail'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -407,7 +407,7 @@ function mapStateToProps(state: $TSFixMe, ownProps: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ApplicationLogDetail.propTypes = { componentId: PropTypes.string, componentSlug: PropTypes.string, diff --git a/dashboard/src/components/application/ApplicationLogDetailView.tsx b/dashboard/src/components/application/ApplicationLogDetailView.tsx index b002c41fa7..790a00a24b 100644 --- a/dashboard/src/components/application/ApplicationLogDetailView.tsx +++ b/dashboard/src/components/application/ApplicationLogDetailView.tsx @@ -12,7 +12,7 @@ import SearchInput from '../search/SearchInput'; class ApplicationLogDetailView extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; this.state = { display: null, @@ -21,30 +21,30 @@ class ApplicationLogDetailView extends Component { componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchLogs' does not exist on type 'Reado... Remove this comment to see the full error message + fetchLogs, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, } = this.props; fetchLogs(projectId, componentId, applicationLog._id, 0, 10); } render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + componentId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLogId' does not exist on type... Remove this comment to see the full error message + applicationLogId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'stats' does not exist on type 'Readonly<... Remove this comment to see the full error message + stats, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logs' does not exist on type 'Readonly<{... Remove this comment to see the full error message + logs, } = this.props; return ( @@ -54,12 +54,12 @@ class ApplicationLogDetailView extends Component { !(stats && !stats.requesting && stats.stats.all > 0) && logs && logs.logs.length < 1 && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'display' does not exist on type 'Readonl... Remove this comment to see the full error message + !this.state.display } > @@ -94,13 +94,13 @@ class ApplicationLogDetailView extends Component { >
this.setState({ display: val }) } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'display' does not exist on type 'Readonl... Remove this comment to see the full error message + display={this.state.display} />
@@ -121,14 +121,14 @@ class ApplicationLogDetailView extends Component { ); } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ApplicationLogDetailView.displayName = 'ApplicationLogDetailView'; const mapDispatchToProps = (dispatch: $TSFixMe) => { return bindActionCreators({ fetchLogs }, dispatch); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ApplicationLogDetailView.propTypes = { projectId: PropTypes.string, componentId: PropTypes.string, diff --git a/dashboard/src/components/application/ApplicationLogHeader.tsx b/dashboard/src/components/application/ApplicationLogHeader.tsx index 63cf2a6f29..64e042d345 100644 --- a/dashboard/src/components/application/ApplicationLogHeader.tsx +++ b/dashboard/src/components/application/ApplicationLogHeader.tsx @@ -13,7 +13,7 @@ import { HelpIcon } from '../svg'; class ApplicationLogHeader extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; this.state = { showFilters: false, @@ -21,37 +21,37 @@ class ApplicationLogHeader extends Component { } render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'applicationLog' does not exist on type '... Remove this comment to see the full error message + applicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isDetails' does not exist on type 'Reado... Remove this comment to see the full error message + isDetails, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + openModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openApplicationLogKeyModalId' does not e... Remove this comment to see the full error message + openApplicationLogKeyModalId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editApplicationLog' does not exist on ty... Remove this comment to see the full error message + editApplicationLog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'viewMore' does not exist on type 'Readon... Remove this comment to see the full error message + viewMore, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetApplicationLogKey' does not exist o... Remove this comment to see the full error message + resetApplicationLogKey, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type 'Readonly... Remove this comment to see the full error message + filter, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logOptions' does not exist on type 'Read... Remove this comment to see the full error message + logOptions, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentDateRange' does not exist on type... Remove this comment to see the full error message + currentDateRange, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logType' does not exist on type 'Readonl... Remove this comment to see the full error message + logType, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleEndDateTimeChange' does not exist ... Remove this comment to see the full error message + handleEndDateTimeChange, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleStartDateTimeChange' does not exis... Remove this comment to see the full error message + handleStartDateTimeChange, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleLogFilterChange' does not exist on... Remove this comment to see the full error message + handleLogFilterChange, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleLogTypeChange' does not exist on t... Remove this comment to see the full error message + handleLogTypeChange, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'formId' does not exist on type 'Readonly... Remove this comment to see the full error message + formId, } = this.props; @@ -73,9 +73,9 @@ class ApplicationLogHeader extends Component { id={`${applicationLog.name}Badge`} > {applicationLog && - applicationLog.resourceCategory + applicationLog.resourceCategory ? applicationLog - .resourceCategory.name + .resourceCategory.name : ''}
@@ -102,7 +102,7 @@ class ApplicationLogHeader extends Component { id={`help_${applicationLog.name}`} className="bs-Button bs-DeprecatedButton" type="button" - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setShow' does not exist on type 'Readonl... Remove this comment to see the full error message + onClick={this.props.setShow} > @@ -124,14 +124,14 @@ class ApplicationLogHeader extends Component { onClick={() => this.setState( state => ({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showFilters' does not exist on type 'Rea... Remove this comment to see the full error message + showFilters: !state.showFilters, }) ) } > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showFilters' does not exist on type 'Rea... Remove this comment to see the full error message + {this.state.showFilters ? 'Hide Filters' : 'Filter Logs'} @@ -187,7 +187,7 @@ class ApplicationLogHeader extends Component {
{ input: { flex: string; p... Remove this comment to see the full error message + export default withStyles(styles)(DateTimeSelector); diff --git a/dashboard/src/components/basic/DateTimeWrapper.tsx b/dashboard/src/components/basic/DateTimeWrapper.tsx index 92323d4c6c..1305bac3be 100644 --- a/dashboard/src/components/basic/DateTimeWrapper.tsx +++ b/dashboard/src/components/basic/DateTimeWrapper.tsx @@ -58,7 +58,7 @@ const DateTimeWrapper = ({ const handleChange = (option: $TSFixMe) => { setValue(option); if (input.onChange) { - // @ts-expect-error ts-migrate(2349) FIXME: This expression is not callable. + input.onChange(moment(option)); } }; @@ -83,7 +83,7 @@ const DateTimeWrapper = ({ format={'lll'} error={false} invalidDateMessage={false} - // @ts-expect-error ts-migrate(2322) FIXME: Type '"modal"' is not assignable to type 'WrapperV... Remove this comment to see the full error message + variant="modal" onChange={handleChange} KeyboardButtonProps={{ @@ -135,5 +135,5 @@ DateTimeWrapper.propTypes = { maxDate: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), }; -// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '() => { input: { flex: string; p... Remove this comment to see the full error message + export default withStyles(styles)(DateTimeWrapper); diff --git a/dashboard/src/components/basic/DropDownMenu.tsx b/dashboard/src/components/basic/DropDownMenu.tsx index 7a2a54400a..49e6acbe6f 100644 --- a/dashboard/src/components/basic/DropDownMenu.tsx +++ b/dashboard/src/components/basic/DropDownMenu.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useRef, useState } from 'react'; -// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message + import { PropTypes } from 'prop-types'; import ShouldRender from '../basic/ShouldRender'; @@ -13,7 +13,7 @@ const DropDownMenu = ({ const container = useRef(null); const handleClickOutside = (event: $TSFixMe) => { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + if (container.current && !container.current.contains(event.target)) { setOpen(false); } diff --git a/dashboard/src/components/basic/ErrorBoundary.tsx b/dashboard/src/components/basic/ErrorBoundary.tsx index 36c5946df3..9bfdc67901 100755 --- a/dashboard/src/components/basic/ErrorBoundary.tsx +++ b/dashboard/src/components/basic/ErrorBoundary.tsx @@ -14,7 +14,7 @@ class ErrorBoundary extends Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hasError' does not exist on type 'Readon... Remove this comment to see the full error message + if (this.state.hasError || this.state.error) { return (
{ @@ -136,7 +136,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => { ); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ExternalStatusPagesTable.propTypes = { statusPage: PropTypes.object, openModal: PropTypes.func.isRequired, diff --git a/dashboard/src/components/basic/FilterSelect.tsx b/dashboard/src/components/basic/FilterSelect.tsx index d5f09b1cdc..6b4e47a5d4 100644 --- a/dashboard/src/components/basic/FilterSelect.tsx +++ b/dashboard/src/components/basic/FilterSelect.tsx @@ -1,6 +1,6 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import CreatableSelect from 'react-select/creatable'; const FilterSelect = (props: $TSFixMe) => ({ ...provided, backgroundColor: state.isSelected ? 'black' : 'unset', diff --git a/dashboard/src/components/basic/Modal.tsx b/dashboard/src/components/basic/Modal.tsx index ee0cfd5df6..89ae3a15a0 100644 --- a/dashboard/src/components/basic/Modal.tsx +++ b/dashboard/src/components/basic/Modal.tsx @@ -7,9 +7,9 @@ class Modal extends Component { handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message + if (this.props.closeThisDialog) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message + return this.props.closeThisDialog(); break; } @@ -20,13 +20,13 @@ class Modal extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'title' does not exist on type 'Readonly<... Remove this comment to see the full error message + title, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeButtonLabel' does not exist on type... Remove this comment to see the full error message + closeButtonLabel, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'affirmativeButtonLabel' does not exist o... Remove this comment to see the full error message + affirmativeButtonLabel, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isLoading' does not exist on type 'Reado... Remove this comment to see the full error message + isLoading, } = this.props; @@ -54,12 +54,12 @@ class Modal extends Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message + {this.props.closeThisDialog && ( )} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message + {this.props.confirmThisDialog && (
- // @ts-expect-error ts-migrate(2322) FIXME: Type '{ type: any; data: any; name: string; }' is ... Remove this comment to see the full error message +
@@ -777,7 +777,7 @@ export function MonitorChart({ {' '} {checkLogs && - data[0].mainTemp + data[0].mainTemp ? data[0].mainTemp : 0}{' '} °C @@ -803,7 +803,7 @@ export function MonitorChart({ {' '} {checkLogs && - data[0].maxTemp + data[0].maxTemp ? data[0].maxTemp : 0}{' '} °C @@ -817,7 +817,7 @@ export function MonitorChart({
- 0 && ( + 0 && (
@@ -926,13 +926,13 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .podData - .podStat - .totalPods + .kubernetesLog + .podData + .podStat + .totalPods : 0} @@ -971,13 +971,13 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .podData - .podStat - .healthy + .kubernetesLog + .podData + .podStat + .healthy : 0} @@ -1016,13 +1016,13 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .podData - .podStat - .unhealthy + .kubernetesLog + .podData + .podStat + .unhealthy : 0} @@ -1033,7 +1033,7 @@ export function MonitorChart({
- 0 && ( + 0 && (
@@ -1086,13 +1086,13 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .jobData - .jobStat - .totalJobs + .kubernetesLog + .jobData + .jobStat + .totalJobs : 0} @@ -1131,13 +1131,13 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .jobData - .jobStat - .healthy + .kubernetesLog + .jobData + .jobStat + .healthy : 0} @@ -1176,13 +1176,13 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .jobData - .jobStat - .unhealthy + .kubernetesLog + .jobData + .jobStat + .unhealthy : 0} @@ -1193,7 +1193,7 @@ export function MonitorChart({
{checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .deploymentData - .allDeployments - .length + .kubernetesLog + .deploymentData + .allDeployments + .length : 0} @@ -1291,12 +1291,12 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .deploymentData - .healthy + .kubernetesLog + .deploymentData + .healthy : 0} @@ -1336,12 +1336,12 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .deploymentData - .unhealthy + .kubernetesLog + .deploymentData + .unhealthy : 0} @@ -1352,7 +1352,7 @@ export function MonitorChart({
{checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .statefulsetData - .allStatefulset - .length + .kubernetesLog + .statefulsetData + .allStatefulset + .length : 0} @@ -1450,12 +1450,12 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .statefulsetData - .healthy + .kubernetesLog + .statefulsetData + .healthy : 0} @@ -1495,12 +1495,12 @@ export function MonitorChart({ } > {checkLogs && - data[0] - .kubernetesLog + data[0] + .kubernetesLog ? data[0] - .kubernetesLog - .statefulsetData - .unhealthy + .kubernetesLog + .statefulsetData + .unhealthy : 0} @@ -1511,7 +1511,7 @@ export function MonitorChart({
{' '} @@ -1749,9 +1748,9 @@ export function MonitorChart({ {sslCertificate && - sslCertificate.issuer + sslCertificate.issuer ? sslCertificate - .issuer.CN + .issuer.CN : '-'} @@ -1782,7 +1781,7 @@ export function MonitorChart({ {sslCertificate && - sslCertificate.expires + sslCertificate.expires ? sslCertificate.expires : '-'} @@ -1814,7 +1813,7 @@ export function MonitorChart({ {sslCertificate && - sslCertificate.fingerprint + sslCertificate.fingerprint ? sslCertificate.fingerprint : '-'} @@ -1875,7 +1874,7 @@ export function MonitorChart({ id={`lighthouse-performance-${monitor.name}`} > {lighthouseLog && - lighthouseLog.performance + lighthouseLog.performance ? `${lighthouseLog.performance}%` : '-'} @@ -1909,7 +1908,7 @@ export function MonitorChart({ id={`lighthouse-accessibility-${monitor.name}`} > {lighthouseLog && - lighthouseLog.accessibility + lighthouseLog.accessibility ? `${lighthouseLog.accessibility}%` : '-'} @@ -1943,7 +1942,7 @@ export function MonitorChart({ id={`lighthouse-bestPractices-${monitor.name}`} > {lighthouseLog && - lighthouseLog.bestPractices + lighthouseLog.bestPractices ? `${lighthouseLog.bestPractices}%` : '-'} @@ -1977,7 +1976,7 @@ export function MonitorChart({ id={`lighthouse-seo-${monitor.name}`} > {lighthouseLog && - lighthouseLog.seo + lighthouseLog.seo ? `${lighthouseLog.seo}%` : '-'} @@ -2011,7 +2010,7 @@ export function MonitorChart({ id={`lighthouse-pwa-${monitor.name}`} > {lighthouseLog && - lighthouseLog.pwa + lighthouseLog.pwa ? `${lighthouseLog.pwa}%` : '-'} @@ -2085,7 +2084,7 @@ export function MonitorChart({
{ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCustomFields' does not exist on typ... Remove this comment to see the full error message + const { fetchCustomFields } = this.props; fetchCustomFields( projectId, @@ -40,7 +40,7 @@ class MonitorCustomFields extends Component { }; nextClicked = (projectId: $TSFixMe, skip: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCustomFields' does not exist on typ... Remove this comment to see the full error message + const { fetchCustomFields } = this.props; fetchCustomFields( projectId, @@ -51,21 +51,21 @@ class MonitorCustomFields extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'limit' does not exist on type 'Readonly<... Remove this comment to see the full error message + limit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message + count, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + skip, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + openModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'customFields' does not exist on type 'Re... Remove this comment to see the full error message + customFields, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message + error, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + requesting, } = this.props; const footerBorderTopStyle = { margin: 0, padding: 0 }; @@ -94,7 +94,7 @@ class MonitorCustomFields extends Component {
@@ -649,9 +647,9 @@ export class MonitorLighthouseLogsList extends Component { {lighthouseLogs && lighthouseLogs.count ? lighthouseLogs.count + - (lighthouseLogs.count > 1 - ? ' URLs' - : ' URL') + (lighthouseLogs.count > 1 + ? ' URLs' + : ' URL') : null} @@ -663,7 +661,7 @@ export class MonitorLighthouseLogsList extends Component { 1 } > @@ -279,9 +279,9 @@ export class MonitorViewLighthouseLogsBox extends Component { }} >
@@ -291,10 +291,10 @@ export class MonitorViewLogsBox extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + MonitorViewLogsBox.displayName = 'MonitorViewLogsBox'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + MonitorViewLogsBox.propTypes = { currentProject: PropTypes.object, getMonitorLogs: PropTypes.func, @@ -319,7 +319,7 @@ function mapStateToProps(state: $TSFixMe, props: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + MonitorViewLogsBox.contextTypes = {}; export default connect(mapStateToProps, mapDispatchToProps)(MonitorViewLogsBox); diff --git a/dashboard/src/components/monitor/MonitorViewSubscriberBox.tsx b/dashboard/src/components/monitor/MonitorViewSubscriberBox.tsx index bd7bfaa57d..3ee2e7850e 100755 --- a/dashboard/src/components/monitor/MonitorViewSubscriberBox.tsx +++ b/dashboard/src/components/monitor/MonitorViewSubscriberBox.tsx @@ -9,7 +9,7 @@ import CreateSubscriber from '../../components/modals/CreateSubscriber'; import DataPathHoC from '../DataPathHoC'; import ShouldRender from '../basic/ShouldRender'; import { FormLoader } from '../basic/Loader'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { exportCSV } from '../../actions/subscriber'; import RenderIfSubProjectAdmin from '../basic/RenderIfSubProjectAdmin'; @@ -28,16 +28,16 @@ export class MonitorViewSubscriberBox extends Component { prevClicked = () => { const subProjectId = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor.projectId._id || this.props.monitor.projectId; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorsSubscribers' does not exist... Remove this comment to see the full error message + this.props.fetchMonitorsSubscribers( subProjectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor._id, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor.subscribers.skip - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + ? parseInt(this.props.monitor.subscribers.skip, 10) - 5 : 5, 5 @@ -46,16 +46,16 @@ export class MonitorViewSubscriberBox extends Component { nextClicked = () => { const subProjectId = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor.projectId._id || this.props.monitor.projectId; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorsSubscribers' does not exist... Remove this comment to see the full error message + this.props.fetchMonitorsSubscribers( subProjectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor._id, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor.subscribers.skip - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + ? parseInt(this.props.monitor.subscribers.skip, 10) + 5 : 5, 5 @@ -63,16 +63,16 @@ export class MonitorViewSubscriberBox extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createSubscriberModalId' does not exist ... Remove this comment to see the full error message + const { createSubscriberModalId, uploadSubscriberModalId } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'create' does not exist on type 'Readonly... Remove this comment to see the full error message + const creating = this.props.create ? this.props.create : false; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'export' does not exist on type 'Readonly... Remove this comment to see the full error message + const exporting = this.props.export ? this.props.export : false; const subProjectId = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor.projectId._id || this.props.monitor.projectId; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + const { monitorId } = this.props; return ( @@ -90,7 +90,7 @@ export class MonitorViewSubscriberBox extends Component { history.push( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProject.slug}/on-call` ) } @@ -115,14 +115,14 @@ export class MonitorViewSubscriberBox extends Component { disabled={creating} id="addSubscriberButton" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: createSubscriberModalId, onClose: () => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + this.props.closeModal({ id: this.state - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createSubscriberModalId' does not exist ... Remove this comment to see the full error message + .createSubscriberModalId, }), content: DataPathHoC(CreateSubscriber, { @@ -154,11 +154,11 @@ export class MonitorViewSubscriberBox extends Component { type="button" disabled={exporting} onClick={() => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: uploadSubscriberModalId, onClose: () => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + this.props.closeModal({ id: uploadSubscriberModalId, }), @@ -190,7 +190,7 @@ export class MonitorViewSubscriberBox extends Component { type="button" disabled={exporting} onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'exportCSV' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.exportCSV( subProjectId, monitorId, @@ -215,7 +215,7 @@ export class MonitorViewSubscriberBox extends Component {
user.userId === userId ); @@ -133,25 +133,25 @@ class NewMonitor extends Component { : `${API_URL}/incomingHttpRequest/${uuidv4()}`; //load call schedules/duties if (projectMember) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorSlas' does not exist on type... Remove this comment to see the full error message + this.props.fetchMonitorSlas(this.props.currentProject._id); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCommunicationSlas' does not exist o... Remove this comment to see the full error message + this.props.fetchCommunicationSlas(this.props.currentProject._id); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSchedules' does not exist on type '... Remove this comment to see the full error message + this.props.fetchSchedules(this.props.currentProject._id); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchAutomatedScript' does not exist on ... Remove this comment to see the full error message + this.props.fetchAutomatedScript( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + this.props.currentProject._id, 0, 10 ); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorCriteria' does not exist on ... Remove this comment to see the full error message + this.props.fetchMonitorCriteria(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setFileInputKey' does not exist on type ... Remove this comment to see the full error message + this.props.setFileInputKey(new Date()); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setConfigInputKey' does not exist on typ... Remove this comment to see the full error message + this.props.setConfigInputKey(new Date()); this.setHttpRequestLink(link); window.addEventListener('keydown', this.handleKeyBoard); @@ -161,12 +161,12 @@ class NewMonitor extends Component { switch (e.key) { case 'Enter': // prevent form submission while using ace editor - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + if (e.target.name === `script_editor_${this.props.index}`) { return true; } if (document.getElementById('addMonitorButton')) - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + return document.getElementById('addMonitorButton').click(); else return false; default: @@ -175,7 +175,7 @@ class NewMonitor extends Component { }; componentDidUpdate(prevProps: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + const { monitor, editMonitorProp } = this.props; const link = editMonitorProp && editMonitorProp.data @@ -185,7 +185,7 @@ class NewMonitor extends Component { monitor.newMonitor.error === "You can't add any more monitors. Please upgrade plan." ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showUpgradeForm' does not exist on type ... Remove this comment to see the full error message + this.props.showUpgradeForm(); } if ( @@ -198,14 +198,14 @@ class NewMonitor extends Component { this.setHttpRequestLink(link); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (!this.props.edit) { // setup criteria for up, down, and degraded events // update automatically when monitor type is changed const areCriterionInitialValuesEqual = isEqual( prevProps.initialValues, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message + this.props.initialValues ); @@ -225,7 +225,7 @@ class NewMonitor extends Component { [CRITERIA_TYPES.UP, CRITERIA_TYPES.DEGRADED].forEach( criterion => { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.type === 'kubernetes' && criterion.type === 'degraded' ) { @@ -237,7 +237,7 @@ class NewMonitor extends Component { id, type: criterion.type, name: - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + CRITERIA_TYPES[criterion.type.toUpperCase()] .name, }; @@ -267,7 +267,7 @@ class NewMonitor extends Component { return; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'change' does not exist on type 'Readonly... Remove this comment to see the full error message + const { change } = this.props; /** @type {{bodyField:Object[] | undefined, createAlert:boolean, autoAcknowledge: boolean, autoResolve:boolean}} */ @@ -275,23 +275,23 @@ class NewMonitor extends Component { // add filter criteria if the criterion is not default const criterionValues = this.getCriterionInitialValue(criterion.type); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyField' does not exist on type '{}'. + change(criterionFieldName, criterionValues.bodyField); change(`name_${criterionFieldName}`, criterion.name); change( `createAlert_${criterionFieldName}`, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createAlert' does not exist on type '{}'... Remove this comment to see the full error message + criterionValues.createAlert ); change( `autoAcknowledge_${criterionFieldName}`, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoAcknowledge' does not exist on type ... Remove this comment to see the full error message + criterionValues.autoAcknowledge ); change( `autoResolve_${criterionFieldName}`, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoResolve' does not exist on type '{}'... Remove this comment to see the full error message + criterionValues.autoResolve ); } @@ -304,9 +304,9 @@ class NewMonitor extends Component { * @memberof NewMonitor */ getCriterionInitialValue(criterionType: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message + let { initialValues } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { edit, monitor, editMonitorProp } = this.props; if (edit) { @@ -320,56 +320,56 @@ class NewMonitor extends Component { switch (criterionType) { case CRITERIA_TYPES.UP.type: - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyField' does not exist on type '{}'. + initialCriterionValue.bodyField = initialValues.up_1000; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createAlert' does not exist on type '{}'... Remove this comment to see the full error message + initialCriterionValue.createAlert = initialValues.up_1000_createAlert; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoAcknowledge' does not exist on type ... Remove this comment to see the full error message + initialCriterionValue.autoAcknowledge = initialValues.up_1000_autoAcknowledge; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoResolve' does not exist on type '{}'... Remove this comment to see the full error message + initialCriterionValue.autoResolve = initialValues.up_1000_autoResolve; break; case CRITERIA_TYPES.DOWN.type: - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyField' does not exist on type '{}'. + initialCriterionValue.bodyField = initialValues.down_1000; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createAlert' does not exist on type '{}'... Remove this comment to see the full error message + initialCriterionValue.createAlert = initialValues.down_1000_createAlert; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoAcknowledge' does not exist on type ... Remove this comment to see the full error message + initialCriterionValue.autoAcknowledge = initialValues.down_1000_autoAcknowledge; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoResolve' does not exist on type '{}'... Remove this comment to see the full error message + initialCriterionValue.autoResolve = initialValues.down_1000_autoResolve; break; case CRITERIA_TYPES.DEGRADED.type: - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyField' does not exist on type '{}'. + initialCriterionValue.bodyField = initialValues.degraded_1000; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createAlert' does not exist on type '{}'... Remove this comment to see the full error message + initialCriterionValue.createAlert = initialValues.degraded_1000_createAlert; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoAcknowledge' does not exist on type ... Remove this comment to see the full error message + initialCriterionValue.autoAcknowledge = initialValues.degraded_1000_autoAcknowledge; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoResolve' does not exist on type '{}'... Remove this comment to see the full error message + initialCriterionValue.autoResolve = initialValues.degraded_1000_autoResolve; break; default: - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyField' does not exist on type '{}'. + initialCriterionValue.bodyField = initialValues.up_1000; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createAlert' does not exist on type '{}'... Remove this comment to see the full error message + initialCriterionValue.createAlert = initialValues.up_1000_createAlert; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoAcknowledge' does not exist on type ... Remove this comment to see the full error message + initialCriterionValue.autoAcknowledge = initialValues.up_1000_autoAcknowledge; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoResolve' does not exist on type '{}'... Remove this comment to see the full error message + initialCriterionValue.autoResolve = initialValues.up_1000_autoResolve; break; @@ -387,18 +387,18 @@ class NewMonitor extends Component { * @memberof NewMonitor */ removeCriterion(id: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type 'Readon... Remove this comment to see the full error message + const indexOfTargetCriterion = this.state.criteria.findIndex( (criterion: $TSFixMe) => criterion.id === id ); if (indexOfTargetCriterion !== -1) { const newCriteria = [ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type 'Readon... Remove this comment to see the full error message + ...this.state.criteria.slice(0, indexOfTargetCriterion), - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type 'Readon... Remove this comment to see the full error message + ...this.state.criteria.slice( indexOfTargetCriterion + 1, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type 'Readon... Remove this comment to see the full error message + this.state.criteria.length ), ]; @@ -412,7 +412,7 @@ class NewMonitor extends Component { * @returns {string} name computed name */ getDefaultCriterionName(criterion: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type 'Readon... Remove this comment to see the full error message + const criteriaWithSameType = this.state.criteria.reduce( (acc: $TSFixMe, criterionItem: $TSFixMe) => { return ( @@ -426,7 +426,7 @@ class NewMonitor extends Component { 0 ); const defaultCriterionName = - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + CRITERIA_TYPES[criterion.type.toUpperCase()].name; const name = criteriaWithSameType === 0 @@ -442,7 +442,7 @@ class NewMonitor extends Component { * @memberof NewMonitor */ addCriterion(criterion = {}) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'id' does not exist on type '{}'. + if (!criterion.id || !criterion.type) { return; } @@ -456,7 +456,7 @@ class NewMonitor extends Component { this.setState({ ...this.state, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type 'Readon... Remove this comment to see the full error message + criteria: [...this.state.criteria, newCriterion], }); } @@ -466,31 +466,31 @@ class NewMonitor extends Component { const postObj = { data: {}, criteria: {} }; thisObj.setState({ processingMonitor: true }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type '{ d... Remove this comment to see the full error message + postObj.componentId = thisObj.props.componentId; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type '{ dat... Remove this comment to see the full error message + postObj.projectId = this.props.projectId; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCommunicationSla' does not exist... Remove this comment to see the full error message + postObj.incidentCommunicationSla = values.incidentCommunicationSla; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorSla' does not exist on type '{ da... Remove this comment to see the full error message + postObj.monitorSla = values.monitorSla; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.name = values[`name_${this.props.index}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type = values[`type_${this.props.index}`] - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + ? values[`type_${this.props.index}`] - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{... Remove this comment to see the full error message + : this.props.edit - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + ? this.props.editMonitorProp.type - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + : this.props.type; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resourceCategory' does not exist on type... Remove this comment to see the full error message + postObj.resourceCategory = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`resourceCategory_${this.props.index}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + const callSchedules = values[`callSchedules_${this.props.index}`]; let monitorSchedules = []; if (callSchedules && callSchedules.length) { @@ -501,106 +501,106 @@ class NewMonitor extends Component { }); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callScheduleIds' does not exist on type ... Remove this comment to see the full error message + postObj.callScheduleIds = monitorSchedules; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + if (postObj.type === 'manual') - // @ts-expect-error ts-migrate(2339) FIXME: Property 'description' does not exist on type '{}'... Remove this comment to see the full error message + postObj.data.description = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`description_${this.props.index}`] || null; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + if (postObj.type === 'url' || postObj.type === 'api') - // @ts-expect-error ts-migrate(2339) FIXME: Property 'url' does not exist on type '{}'. + postObj.data.url = values[`url_${this.props.index}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + if (postObj.type === 'script') { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'script' does not exist on type '{}'. + postObj.data.script = thisObj.state.script; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + if (postObj.type === 'ip') - // @ts-expect-error ts-migrate(2339) FIXME: Property 'IPAddress' does not exist on type '{}'. + postObj.data.IPAddress = values[`ip_${this.props.index}`]; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'server-monitor' && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`mode_${this.props.index}`] === 'agentless' ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'agentlessConfig' does not exist on type ... Remove this comment to see the full error message + postObj.agentlessConfig = { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + host: values[`host_${this.props.index}`], - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + port: values[`port_${this.props.index}`], - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + username: values[`username_${this.props.index}`], - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + authentication: values[`authentication_${this.props.index}`], }; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`authentication_${this.props.index}`] === 'identityFile' ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'agentlessConfig' does not exist on type ... Remove this comment to see the full error message + postObj.agentlessConfig.identityFile = this.props.identityFile; } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'agentlessConfig' does not exist on type ... Remove this comment to see the full error message + postObj.agentlessConfig.password = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`password_${this.props.index}`]; } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + if (postObj.type === 'kubernetes' && !this.props.edit) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'kubernetesConfig' does not exist on type... Remove this comment to see the full error message + postObj.kubernetesConfig = this.props.configurationFile; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'kubernetesNamespace' does not exist on t... Remove this comment to see the full error message + postObj.kubernetesNamespace = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`kubernetesNamespace_${this.props.index}`]; } if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'kubernetes' && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.edit && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'configurationFile' does not exist on typ... Remove this comment to see the full error message + this.props.configurationFile ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'kubernetesConfig' does not exist on type... Remove this comment to see the full error message + postObj.kubernetesConfig = this.props.configurationFile; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + if (postObj.type === 'incomingHttpRequest') - // @ts-expect-error ts-migrate(2339) FIXME: Property 'link' does not exist on type '{}'. + postObj.data.link = thisObj.state.httpRequestLink; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'url' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'api' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'server-monitor' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'script' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'incomingHttpRequest' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'kubernetes' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.type === 'ip' ) { // collect and organize all criteria data const criteria = { up: [], down: [], degraded: [] }; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type 'Readon... Remove this comment to see the full error message + this.state.criteria.forEach((criterion: $TSFixMe) => { const criterionData = {}; @@ -608,13 +608,13 @@ class NewMonitor extends Component { // add conditions only if the criterion isn't a default one if (criterion.default) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'default' does not exist on type '{}'. + criterionData.default = true; } else { const conditions = makeCriteria( values[`${criterionFieldName}`] ); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + criterionData.criteria = conditions; } @@ -628,23 +628,23 @@ class NewMonitor extends Component { .map((scheduleObject: $TSFixMe) => Object.keys(scheduleObject)[0]) : []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduleIds' does not exist on type '{}'... Remove this comment to see the full error message + criterionData.scheduleIds = schedules; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + criterionData.name = values[`name_${criterionFieldName}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createAlert' does not exist on type '{}'... Remove this comment to see the full error message + criterionData.createAlert = values[`createAlert_${criterionFieldName}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoAcknowledge' does not exist on type ... Remove this comment to see the full error message + criterionData.autoAcknowledge = values[`autoAcknowledge_${criterionFieldName}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'autoResolve' does not exist on type '{}'... Remove this comment to see the full error message + criterionData.autoResolve = values[`autoResolve_${criterionFieldName}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'title' does not exist on type '{}'. + criterionData.title = values[`incidentTitle_${criterionFieldName}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'description' does not exist on type '{}'... Remove this comment to see the full error message + criterionData.description = values[`incidentDescription_${criterionFieldName}`]; const scriptValues = @@ -654,79 +654,79 @@ class NewMonitor extends Component { scriptId: script.value, }; }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scripts' does not exist on type '{}'. + criterionData.scripts = scriptArr || []; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + if (Array.isArray(criteria[criterion.type])) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + criteria[criterion.type].push(criterionData); } }); postObj.criteria = criteria; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ data: {}... Remove this comment to see the full error message + if (postObj.type === 'api') { if ( values && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`method_${this.props.index}`] && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`method_${this.props.index}`].length ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'method' does not exist on type '{ data: ... Remove this comment to see the full error message + postObj.method = values[`method_${this.props.index}`]; } if ( values && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`headers_${this.props.index}`] && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`headers_${this.props.index}`].length ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'headers' does not exist on type '{ data:... Remove this comment to see the full error message + postObj.headers = values[`headers_${this.props.index}`]; } if ( values && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`bodyType_${this.props.index}`] && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`bodyType_${this.props.index}`].length ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyType' does not exist on type '{ data... Remove this comment to see the full error message + postObj.bodyType = values[`bodyType_${this.props.index}`]; } if ( values && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`formData_${this.props.index}`] && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`formData_${this.props.index}`].length && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyType' does not exist on type '{ data... Remove this comment to see the full error message + (postObj.bodyType === 'form-data' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyType' does not exist on type '{ data... Remove this comment to see the full error message + postObj.bodyType === 'x-www-form-urlencoded') ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'formData' does not exist on type '{ data... Remove this comment to see the full error message + postObj.formData = values[`formData_${this.props.index}`]; } if ( values && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`text_${this.props.index}`] && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + values[`text_${this.props.index}`].length && !( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyType' does not exist on type '{ data... Remove this comment to see the full error message + postObj.bodyType === 'form-data' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyType' does not exist on type '{ data... Remove this comment to see the full error message + postObj.bodyType === 'x-www-form-urlencoded' ) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + let text = values[`text_${this.props.index}`]; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyType' does not exist on type '{ data... Remove this comment to see the full error message + if (postObj.bodyType === 'application/json') { try { const val = text.replace(/^,{+|},+$/g, ''); @@ -736,51 +736,51 @@ class NewMonitor extends Component { // } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'text' does not exist on type '{ data: {}... Remove this comment to see the full error message + postObj.text = text; } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.edit) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + const { monitorId } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property '_id' does not exist on type '{ data: {};... Remove this comment to see the full error message + postObj._id = this.props.editMonitorProp._id; this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitor' does not exist on type 'Rea... Remove this comment to see the full error message + .editMonitor(postObj.projectId, postObj) .then((data: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'toggleEdit' does not exist on type 'Read... Remove this comment to see the full error message + this.props.toggleEdit(false); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'destroy' does not exist on type 'Readonl... Remove this comment to see the full error message + thisObj.props.destroy(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + if (monitorId === this.props.editMonitorProp._id) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorsIncidents' does not exist o... Remove this comment to see the full error message + this.props.fetchMonitorsIncidents( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type '{ dat... Remove this comment to see the full error message + postObj.projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + this.props.editMonitorProp._id, 0, 5 ); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorsSubscribers' does not exist... Remove this comment to see the full error message + this.props.fetchMonitorsSubscribers( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type '{ dat... Remove this comment to see the full error message + postObj.projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + this.props.editMonitorProp._id, 0, 5 ); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorsIncidents' does not exist o... Remove this comment to see the full error message + this.props.fetchMonitorsIncidents( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type '{ dat... Remove this comment to see the full error message + postObj.projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + this.props.editMonitorProp._id, 0, 3 @@ -789,23 +789,23 @@ class NewMonitor extends Component { thisObj.setState({ processingMonitor: false }); history.replace( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProject.slug}/component/${this.props.component.slug}/monitoring/${data.data.slug}` ); }) .finally(() => thisObj.setState({ processingMonitor: false })); } else { this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createMonitor' does not exist on type 'R... Remove this comment to see the full error message + .createMonitor(postObj.projectId, postObj) .then( (data: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'reset' does not exist on type 'Readonly<... Remove this comment to see the full error message + thisObj.props.reset(); thisObj.setState({ processingMonitor: false }); history.push( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProject.slug}/component/${this.props.componentSlug}/monitoring/${data.data.slug}` ); }, @@ -821,11 +821,11 @@ class NewMonitor extends Component { this.setState({ advance: false, script: defaultScript, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{... Remove this comment to see the full error message + type: this.props.edit - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + ? this.props.editMonitorProp.type - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + : this.props.type, }); }; @@ -833,29 +833,29 @@ class NewMonitor extends Component { scheduleChange = (e: $TSFixMe, value: $TSFixMe) => { //load call schedules/duties if (value && value !== '') { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSchedules' does not exist on type '... Remove this comment to see the full error message + this.props.fetchSchedules(value); } else { const userId = User.getUserId(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + const projectMember = this.props.currentProject.users.find( (user: $TSFixMe) => user.userId === userId ); if (projectMember) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSchedules' does not exist on type '... Remove this comment to see the full error message + this.props.fetchSchedules(this.props.currentProject._id); } }; cancelEdit = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorSwitch' does not exist on typ... Remove this comment to see the full error message + this.props.editMonitorSwitch(this.props.index); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'toggleEdit' does not exist on type 'Read... Remove this comment to see the full error message + this.props.toggleEdit(false); }; componentWillUnmount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.edit) { this.cancelEdit(); } @@ -863,25 +863,25 @@ class NewMonitor extends Component { } openAdvance = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'advance' does not exist on type 'Readonl... Remove this comment to see the full error message + this.setState({ advance: !this.state.advance }); }; changeBox = (e: $TSFixMe, value: $TSFixMe) => { this.setState({ advance: false, type: value }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setMonitorCriteria' does not exist on ty... Remove this comment to see the full error message + this.props.setMonitorCriteria( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.name, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'category' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.category, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProject' does not exist on type 'Read... Remove this comment to see the full error message + this.props.subProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorSchedules' does not exist on type... Remove this comment to see the full error message + this.props.monitorSchedules, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorSla' does not exist on type 'Read... Remove this comment to see the full error message + this.props.monitorSla, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCommunicationSla' does not exist... Remove this comment to see the full error message + this.props.incidentCommunicationSla, value ); @@ -898,7 +898,7 @@ class NewMonitor extends Component { changeFile = (e: $TSFixMe) => { e.preventDefault(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logFile' does not exist on type 'Readonl... Remove this comment to see the full error message + const { logFile, uploadIdentityFile, projectId } = this.props; const reader = new FileReader(); @@ -920,11 +920,11 @@ class NewMonitor extends Component { e.preventDefault(); const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logConfigFile' does not exist on type 'R... Remove this comment to see the full error message + logConfigFile, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'uploadConfigurationFile' does not exist ... Remove this comment to see the full error message + uploadConfigurationFile, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, } = this.props; @@ -944,7 +944,7 @@ class NewMonitor extends Component { }; removeConfigFile = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setConfigInputKey' does not exist on typ... Remove this comment to see the full error message + const { setConfigInputKey, resetConfigFile } = this.props; setConfigInputKey(new Date()); @@ -952,7 +952,7 @@ class NewMonitor extends Component { }; removeFile = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setFileInputKey' does not exist on type ... Remove this comment to see the full error message + const { setFileInputKey, resetFile } = this.props; setFileInputKey(new Date()); @@ -1027,50 +1027,50 @@ class NewMonitor extends Component { }; render() { const requesting = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + (this.props.monitor.newMonitor.requesting && !this.props.edit) || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + (this.props.monitor.editMonitor.requesting && this.props.edit) || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requestingSla' does not exist on type 'R... Remove this comment to see the full error message + this.props.requestingSla || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requestingMonitorSla' does not exist on ... Remove this comment to see the full error message + this.props.requestingMonitorSla; const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + handleSubmit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjects' does not exist on type 'Rea... Remove this comment to see the full error message + subProjects, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'schedules' does not exist on type 'Reado... Remove this comment to see the full error message + schedules, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resourceCategoryList' does not exist on ... Remove this comment to see the full error message + resourceCategoryList, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + monitor, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message + project, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentPlanId' does not exist on type 'R... Remove this comment to see the full error message + currentPlanId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'identityFile' does not exist on type 'Re... Remove this comment to see the full error message + identityFile, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'uploadingIdentityFile' does not exist on... Remove this comment to see the full error message + uploadingIdentityFile, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fileInputKey' does not exist on type 'Re... Remove this comment to see the full error message + fileInputKey, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'uploadingConfigurationFile' does not exi... Remove this comment to see the full error message + uploadingConfigurationFile, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'configurationFile' does not exist on typ... Remove this comment to see the full error message + configurationFile, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'configFileInputKey' does not exist on ty... Remove this comment to see the full error message + configFileInputKey, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { type, mode, authentication, httpRequestLink } = this.state; const unlimitedMonitors = ['Scale', 'Enterprise']; const planCategory = currentPlanId === 'enterprise' ? 'Enterprise' - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + : PlanListing.getPlanById(currentPlanId).category; const numOfUsers = this.getUserCount(project, subProjects); const monitorPerUser = @@ -1144,11 +1144,11 @@ class NewMonitor extends Component { ]; const scriptsObj = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scripts' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.scripts && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scripts' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.scripts.length > 0 && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scripts' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.scripts.map((script: $TSFixMe) => { return { value: script._id, @@ -1164,21 +1164,21 @@ class NewMonitor extends Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{...Remove this comment to see the full error message + New Monitor - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{...Remove this comment to see the full error message + Edit Monitor - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + {this.props.editMonitorProp && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + this.props.editMonitorProp.name ? ' - ' + - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + this.props.editMonitorProp .name : null} @@ -1187,7 +1187,7 @@ class NewMonitor extends Component {

- // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{...Remove this comment to see the full error message + Monitor any resources (Websites, @@ -1196,15 +1196,15 @@ class NewMonitor extends Component { they do not behave the way you want. - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{...Remove this comment to see the full error message + Edit Name and URL of - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + {this.props.editMonitorProp && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + this.props.editMonitorProp.name - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorProp' does not exist on type ... Remove this comment to see the full error message + ? ` ${this.props.editMonitorProp.name}` : ''} @@ -1259,7 +1259,7 @@ class NewMonitor extends Component { RenderField } type="text" - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + name={`name_${this.props.index}`} id="name" placeholder="Home Page" @@ -1273,7 +1273,7 @@ class NewMonitor extends Component {

@@ -1344,7 +1344,7 @@ class NewMonitor extends Component { type="radio" data-testId={`type_${el.value}`} id={`type_${el.value}`} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'index' does not exist on type 'Readonly<... Remove this comment to see the full error message + name={`type_${this.props.index}`} className="Margin-left--4 Margin-top--4" validate={ @@ -1404,7 +1404,7 @@ class NewMonitor extends Component { ) )} {this.state - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showAllMonitors' does not exist on type ... Remove this comment to see the full error message + .showAllMonitors ? null : (
@@ -280,7 +279,7 @@ export class ResponseComponent extends Component { criterionBodyField.length && schedules && schedules.length > - 0) + 0) } >
@@ -346,7 +345,7 @@ export class ResponseComponent extends Component { @@ -433,7 +432,7 @@ export class ResponseComponent extends Component { options={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scriptsObj' does not exist on type 'Read... Remove this comment to see the full error message + .scriptsObj || [] } @@ -603,7 +602,7 @@ export class ResponseComponent extends Component { // onClick={this.addValue} onClick={() => this.handleAddFilterCriteria( - // @ts-expect-error ts-migrate(2554) FIXME: Expected 0 arguments, but got 1. + criterionType ) } @@ -629,7 +628,7 @@ export class ResponseComponent extends Component {
- {`${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showAdvancedOption' does not exist on ty... Remove this comment to see the full error message - this.state.showAdvancedOption + {`${this.state.showAdvancedOption ? 'Hide' : 'Show' - } + } Advanced Options`}
@@ -686,10 +683,10 @@ export class ResponseComponent extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ResponseComponent.displayName = 'ResponseComponent'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ResponseComponent.propTypes = { type: PropTypes.string, addCriterion: PropTypes.func.isRequired, diff --git a/dashboard/src/components/monitor/ResponseParent.tsx b/dashboard/src/components/monitor/ResponseParent.tsx index 954e6a52ab..5ed5874b4b 100755 --- a/dashboard/src/components/monitor/ResponseParent.tsx +++ b/dashboard/src/components/monitor/ResponseParent.tsx @@ -3,9 +3,9 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { FieldArray } from 'redux-form'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field } from 'redux-form'; import { ValidateField } from '../../config'; import RenderOptions from '../basic/RenderOptions'; @@ -17,341 +17,340 @@ export class ResponseParent extends Component { super(props); } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fields' does not exist on type 'Readonly... Remove this comment to see the full error message + const { fields, bodyfield, level, type, criterionType } = this.props; return (
    {bodyfield && bodyfield.length ? fields.map((newval: $TSFixMe, j: $TSFixMe) => { - return ( - - {Object.keys(bodyfield[j]).includes( - 'match' - ) ? ( -
  • -
    1 - ? level * 10 - : 10 - }px`, - }} - > - -
    - -
    -
    -
  • - ) : ( - '' - )} + return ( + + {Object.keys(bodyfield[j]).includes( + 'match' + ) ? ( +
  • +
    1 + ? level * 10 + : 10 + }px`, + }} + > + +
    + +
    +
    +
  • + ) : ( + '' + )} -
    - - fields.insert(j + 1, { - responseType: '', - filter: '', - field1: '', - field2: '', - field3: false, - }) - } - removeField={( - removeArrayField: $TSFixMe, - updateCriteriaField: $TSFixMe - ) => { - const lastCriteriaIndex = fields.name.lastIndexOf( - 'criteria' - ); +
    + + fields.insert(j + 1, { + responseType: '', + filter: '', + field1: '', + field2: '', + field3: false, + }) + } + removeField={( + removeArrayField: $TSFixMe, + updateCriteriaField: $TSFixMe + ) => { + const lastCriteriaIndex = fields.name.lastIndexOf( + 'criteria' + ); - if ( - bodyfield[j] && - Object.keys( - bodyfield[j] - ).includes('match') - ) { - if (bodyfield[j + 1]) { - const updateVal = bodyfield.map( - (field: $TSFixMe, i: $TSFixMe) => { - if (i === j + 1) { - if ( - bodyfield[ - j - ] && - bodyfield[ - j - ] - .criteria && - bodyfield[ - j - ].criteria - .length > - 0 - ) { - field = { - ...field, - match: - bodyfield[ - j - ] - .match, - field3: true, - criteria: [ - ...(bodyfield[ - i - ] && - bodyfield[ - i - ] - .criteria - ? bodyfield[ - i - ] - .criteria - : []), - ...bodyfield[ - j - ] - .criteria, - ], - }; - } else { - field = { - ...field, - match: - bodyfield[ - j - ] - .match, - }; - } - } - return field; - } - ); - if ( - lastCriteriaIndex >= 0 - ) { - updateCriteriaField( - fields.name.substring( - 0, - lastCriteriaIndex - - 1 - ), - updateVal, - false - ); - } else { - updateCriteriaField( - fields.name, - updateVal, - true - ); - } - } - fields.remove(j); - } else if ( - bodyfield[j] && - bodyfield[j].criteria && - bodyfield[j].criteria.length > - 0 - ) { - if (bodyfield[j + 1]) { - const updateVal = bodyfield.map( - (field: $TSFixMe, i: $TSFixMe) => { - if (i === j + 1) { - field = { - ...field, - field3: true, - criteria: [ - ...(bodyfield[ - j + - 1 - ] && - bodyfield[ - j + - 1 - ] - .criteria - ? bodyfield[ - j + - 1 + if ( + bodyfield[j] && + Object.keys( + bodyfield[j] + ).includes('match') + ) { + if (bodyfield[j + 1]) { + const updateVal = bodyfield.map( + (field: $TSFixMe, i: $TSFixMe) => { + if (i === j + 1) { + if ( + bodyfield[ + j + ] && + bodyfield[ + j + ] + .criteria && + bodyfield[ + j + ].criteria + .length > + 0 + ) { + field = { + ...field, + match: + bodyfield[ + j + ] + .match, + field3: true, + criteria: [ + ...(bodyfield[ + i + ] && + bodyfield[ + i ] .criteria - : []), - ...(bodyfield[ - j - ] && - bodyfield[ - j - ] - .criteria - ? bodyfield[ - j + ? bodyfield[ + i ] .criteria - : []), - ], - }; - } - return field; - } - ); - if ( - lastCriteriaIndex >= 0 - ) { - updateCriteriaField( - fields.name.substring( - 0, - lastCriteriaIndex - - 1 - ), - updateVal, - false - ); - } else { - updateCriteriaField( - fields.name, - updateVal, - true - ); - } - } else if (bodyfield[j - 1]) { - const updateVal = bodyfield.map( - (field: $TSFixMe, i: $TSFixMe) => { - if (i === j - 1) { - field = { - ...field, - field3: true, - criteria: [ - ...(bodyfield[ - j - - 1 - ] && - bodyfield[ - j - - 1 - ] - .criteria - ? bodyfield[ - j - - 1 - ] - .criteria - : []), - ...(bodyfield[ - j - ] && - bodyfield[ - j - ] - .criteria - ? bodyfield[ - j - ] - .criteria - : []), - ], - }; - } - return field; - } - ); - if ( - lastCriteriaIndex >= 0 - ) { - updateCriteriaField( - fields.name.substring( - 0, - lastCriteriaIndex - - 1 - ), - updateVal, - false - ); - } else { - updateCriteriaField( - fields.name, - updateVal, - true - ); - } - } - fields.remove(j); - } else { - fields.remove(j); - } - }} - fieldnameprop={newval} - type={type} - criterionType={criterionType} - /> -
    + : []), + ...bodyfield[ + j + ] + .criteria, + ], + }; + } else { + field = { + ...field, + match: + bodyfield[ + j + ] + .match, + }; + } + } + return field; + } + ); + if ( + lastCriteriaIndex >= 0 + ) { + updateCriteriaField( + fields.name.substring( + 0, + lastCriteriaIndex - + 1 + ), + updateVal, + false + ); + } else { + updateCriteriaField( + fields.name, + updateVal, + true + ); + } + } + fields.remove(j); + } else if ( + bodyfield[j] && + bodyfield[j].criteria && + bodyfield[j].criteria.length > + 0 + ) { + if (bodyfield[j + 1]) { + const updateVal = bodyfield.map( + (field: $TSFixMe, i: $TSFixMe) => { + if (i === j + 1) { + field = { + ...field, + field3: true, + criteria: [ + ...(bodyfield[ + j + + 1 + ] && + bodyfield[ + j + + 1 + ] + .criteria + ? bodyfield[ + j + + 1 + ] + .criteria + : []), + ...(bodyfield[ + j + ] && + bodyfield[ + j + ] + .criteria + ? bodyfield[ + j + ] + .criteria + : []), + ], + }; + } + return field; + } + ); + if ( + lastCriteriaIndex >= 0 + ) { + updateCriteriaField( + fields.name.substring( + 0, + lastCriteriaIndex - + 1 + ), + updateVal, + false + ); + } else { + updateCriteriaField( + fields.name, + updateVal, + true + ); + } + } else if (bodyfield[j - 1]) { + const updateVal = bodyfield.map( + (field: $TSFixMe, i: $TSFixMe) => { + if (i === j - 1) { + field = { + ...field, + field3: true, + criteria: [ + ...(bodyfield[ + j - + 1 + ] && + bodyfield[ + j - + 1 + ] + .criteria + ? bodyfield[ + j - + 1 + ] + .criteria + : []), + ...(bodyfield[ + j + ] && + bodyfield[ + j + ] + .criteria + ? bodyfield[ + j + ] + .criteria + : []), + ], + }; + } + return field; + } + ); + if ( + lastCriteriaIndex >= 0 + ) { + updateCriteriaField( + fields.name.substring( + 0, + lastCriteriaIndex - + 1 + ), + updateVal, + false + ); + } else { + updateCriteriaField( + fields.name, + updateVal, + true + ); + } + } + fields.remove(j); + } else { + fields.remove(j); + } + }} + fieldnameprop={newval} + type={type} + criterionType={criterionType} + /> +
    - {//level < 3 && - bodyfield[j] && bodyfield[j].field3 ? ( - - ) : ( - '' - )} -
    - ); - }) + {//level < 3 && + bodyfield[j] && bodyfield[j].field3 ? ( + + ) : ( + '' + )} +
    + ); + }) : ''}
); } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ResponseParent.displayName = 'ResponseParent'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ResponseParent.propTypes = { fields: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, bodyfield: PropTypes.oneOfType([PropTypes.array, PropTypes.object]), @@ -362,5 +361,5 @@ ResponseParent.propTypes = { const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({}, dispatch); -// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call. + export default connect({}, mapDispatchToProps)(ResponseParent); diff --git a/dashboard/src/components/monitor/ThirdPartyVariables.tsx b/dashboard/src/components/monitor/ThirdPartyVariables.tsx index 86c37a9fa0..f5ef764d43 100644 --- a/dashboard/src/components/monitor/ThirdPartyVariables.tsx +++ b/dashboard/src/components/monitor/ThirdPartyVariables.tsx @@ -1,10 +1,10 @@ import React, { Component } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { withRouter } from 'react-router-dom'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { FormLoader, ListLoader } from '../basic/Loader'; import ShouldRender from '../basic/ShouldRender'; @@ -15,11 +15,11 @@ import { fetchCustomFields } from '../../actions/monitorCustomField'; class ThirdPartyVariables extends Component { componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCustomFields' does not exist on typ... Remove this comment to see the full error message + fetchCustomFields, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetEditMonitor' does not exist on type... Remove this comment to see the full error message + resetEditMonitor, } = this.props; fetchCustomFields(currentProject._id); @@ -27,7 +27,7 @@ class ThirdPartyVariables extends Component { } submitForm = (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + const { currentProject, monitor, customFields } = this.props; const projectId = monitor.projectId._id || monitor.projectId; const postObj = { @@ -35,7 +35,7 @@ class ThirdPartyVariables extends Component { projectId, }; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'customFields' does not exist on type '{ ... Remove this comment to see the full error message + postObj.customFields = customFields.map((field: $TSFixMe) => ({ fieldName: field.fieldName, uniqueField: field.uniqueField, @@ -47,19 +47,19 @@ class ThirdPartyVariables extends Component { : values[field.fieldName] })); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitor' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.editMonitor(currentProject._id, postObj); }; render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + handleSubmit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editingMonitor' does not exist on type '... Remove this comment to see the full error message + editingMonitor, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editError' does not exist on type 'Reado... Remove this comment to see the full error message + editError, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'customFields' does not exist on type 'Re... Remove this comment to see the full error message + customFields, } = this.props; @@ -101,7 +101,7 @@ class ThirdPartyVariables extends Component {
{customFields && customFields.length > - 0 && + 0 && customFields.map( (field: $TSFixMe) =>
{ const initialValues = {}; if (monitor && monitor.customFields && monitor.customFields.length > 0) { monitor.customFields.forEach( - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + (field: $TSFixMe) => initialValues[field.fieldName] = field.fieldValue ); } diff --git a/dashboard/src/components/monitorSla/BreachedMonitorSla.tsx b/dashboard/src/components/monitorSla/BreachedMonitorSla.tsx index 38d3673e83..8e22b77ddf 100644 --- a/dashboard/src/components/monitorSla/BreachedMonitorSla.tsx +++ b/dashboard/src/components/monitorSla/BreachedMonitorSla.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { withRouter } from 'react-router-dom'; import { Spinner } from '../basic/Loader'; diff --git a/dashboard/src/components/monitorSla/DeleteMonitorSlaModal.tsx b/dashboard/src/components/monitorSla/DeleteMonitorSlaModal.tsx index 68adb44981..3741656af7 100644 --- a/dashboard/src/components/monitorSla/DeleteMonitorSlaModal.tsx +++ b/dashboard/src/components/monitorSla/DeleteMonitorSlaModal.tsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { FormLoader } from '../basic/Loader'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; import ShouldRender from '../basic/ShouldRender'; import { closeModal } from '../../actions/modal'; @@ -21,7 +21,7 @@ class DeleteMonitorSlaModal extends Component { handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message + return this.props.closeThisDialog(); case 'Enter': return this.handleDelete(); @@ -32,15 +32,15 @@ class DeleteMonitorSlaModal extends Component { handleDelete = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteError' does not exist on type 'Rea... Remove this comment to see the full error message + deleteError, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + closeModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modalId' does not exist on type 'Readonl... Remove this comment to see the full error message + modalId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + data, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteMonitorSla' does not exist on type... Remove this comment to see the full error message + deleteMonitorSla, } = this.props; const { projectId, monitorSlaId } = data; @@ -52,7 +52,7 @@ class DeleteMonitorSlaModal extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + const { isRequesting, closeThisDialog, deleteError } = this.props; return (
@@ -152,10 +152,10 @@ class DeleteMonitorSlaModal extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + DeleteMonitorSlaModal.displayName = 'DeleteMonitorSlaModal'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + DeleteMonitorSlaModal.propTypes = { closeThisDialog: PropTypes.func.isRequired, isRequesting: PropTypes.bool, diff --git a/dashboard/src/components/monitorSla/EditMonitorSlaModal.tsx b/dashboard/src/components/monitorSla/EditMonitorSlaModal.tsx index cabb775bec..34ab4e7262 100644 --- a/dashboard/src/components/monitorSla/EditMonitorSlaModal.tsx +++ b/dashboard/src/components/monitorSla/EditMonitorSlaModal.tsx @@ -2,9 +2,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { reduxForm, Field } from 'redux-form'; import { updateMonitorSla } from '../../actions/monitorSla'; import { closeModal } from '../../actions/modal'; @@ -18,7 +18,7 @@ function validate(values: $TSFixMe) { const errors = {}; if (!values.name || !values.name.trim()) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + errors.name = 'Monitor SLA name is required'; } if ( @@ -26,7 +26,7 @@ function validate(values: $TSFixMe) { values.frequency.trim() && isNaN(values.frequency) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'frequency' does not exist on type '{}'. + errors.frequency = 'Only numeric values are allowed'; } if ( @@ -34,7 +34,7 @@ function validate(values: $TSFixMe) { values.monitorUptime.trim() && isNaN(values.monitorUptime) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorUptime' does not exist on type '{... Remove this comment to see the full error message + errors.monitorUptime = 'Only numeric values are allowed'; } if ( @@ -42,7 +42,7 @@ function validate(values: $TSFixMe) { values.monitorUptime.trim() && Number(values.monitorUptime) > 100 ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorUptime' does not exist on type '{... Remove this comment to see the full error message + errors.monitorUptime = 'Uptime greater than 100 is not allowed'; } if ( @@ -50,7 +50,7 @@ function validate(values: $TSFixMe) { values.monitorUptime.trim() && Number(values.monitorUptime) < 1 ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorUptime' does not exist on type '{... Remove this comment to see the full error message + errors.monitorUptime = 'Uptime less than 1 is not allowed'; } return errors; @@ -77,17 +77,17 @@ class EditMonitorSlaModal extends React.Component { submitForm = (values: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + closeModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorSlaModalId' does not exist on... Remove this comment to see the full error message + editMonitorSlaModalId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message + initialValues, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateMonitorSla' does not exist on type... Remove this comment to see the full error message + updateMonitorSla, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitors' does not exist on type 'R... Remove this comment to see the full error message + fetchMonitors, } = this.props; const projectId = currentProject._id; @@ -98,13 +98,13 @@ class EditMonitorSlaModal extends React.Component { this.state.selectedMonitors && this.state.selectedMonitors.length > 0 ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + postObj.monitors = this.state.selectedMonitors; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + const isDuplicate = postObj.monitors - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + ? postObj.monitors.length === new Set(postObj.monitors).size ? false : true @@ -117,17 +117,17 @@ class EditMonitorSlaModal extends React.Component { return; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + postObj.name = values.name; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'frequency' does not exist on type '{}'. + postObj.frequency = values.frequency; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorUptime' does not exist on type '{... Remove this comment to see the full error message + postObj.monitorUptime = values.monitorUptime; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isDefault' does not exist on type '{}'. + postObj.isDefault = values.isDefault; updateMonitorSla(projectId, monitorSlaId, postObj).then(() => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'slaError' does not exist on type 'Readon... Remove this comment to see the full error message + if (!this.props.slaError) { fetchMonitors(projectId); closeModal({ @@ -142,7 +142,7 @@ class EditMonitorSlaModal extends React.Component { case 'Escape': return this.handleCloseModal(); case 'Enter': - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + return document.getElementById('createSlaBtn').click(); default: return false; @@ -150,24 +150,24 @@ class EditMonitorSlaModal extends React.Component { }; handleCloseModal = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + this.props.closeModal({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorSlaModalId' does not exist on... Remove this comment to see the full error message + id: this.props.editMonitorSlaModalId, }); }; formatData = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + const monitors = this.props.monitorsList; const hash = {}; monitors.forEach((monitor: $TSFixMe) => { const projectId = monitor.projectId._id || monitor.projectId; const componentId = monitor.componentId._id || monitor.componentId; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + if (!hash[projectId]) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + hash[projectId] = { projectName: monitor.projectId?.name, projectId, @@ -186,11 +186,11 @@ class EditMonitorSlaModal extends React.Component { }; } else { let monitorAdded = false; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + hash[projectId] = { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + ...hash[projectId], - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + components: hash[projectId].components.map((componentObj: $TSFixMe) => { if (componentObj.componentId === componentId) { const newMonitor = { @@ -221,12 +221,12 @@ class EditMonitorSlaModal extends React.Component { }, ], }; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + hash[projectId] = { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + ...hash[projectId], components: [ - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + ...hash[projectId].components, componentData, ], @@ -244,14 +244,14 @@ class EditMonitorSlaModal extends React.Component { this.setState({ selectData: data, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message + selectedMonitors: this.props.initialValues.monitors || [], }); }; updateState = (value: $TSFixMe, key: $TSFixMe) => { this.setState(prevState => { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + let currentValue = prevState[key]; if (currentValue.includes(value)) { @@ -276,7 +276,7 @@ class EditMonitorSlaModal extends React.Component { if (key === 'selectedProjects' && databank.includes(id)) { const monitorIds: $TSFixMe = []; const componentIds: $TSFixMe = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + this.props.monitorsList.forEach((monitor: $TSFixMe) => { if ((monitor.projectId._id || monitor.projectId) === id) { monitorIds.push(monitor._id); @@ -288,11 +288,11 @@ class EditMonitorSlaModal extends React.Component { return this.setState(prevState => ({ selectedMonitors: Array.from( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedMonitors' does not exist on type... Remove this comment to see the full error message + new Set([...prevState.selectedMonitors, ...monitorIds]) ), selectedComponents: Array.from( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedComponents' does not exist on ty... Remove this comment to see the full error message + new Set([...prevState.selectedComponents, ...componentIds]) ), })); @@ -301,7 +301,7 @@ class EditMonitorSlaModal extends React.Component { if (key === 'selectedProjects' && !databank.includes(id)) { const monitorIds: $TSFixMe = []; const componentIds: $TSFixMe = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + this.props.monitorsList.forEach((monitor: $TSFixMe) => { if ((monitor.projectId._id || monitor.projectId) === id) { monitorIds.push(monitor._id); @@ -312,11 +312,11 @@ class EditMonitorSlaModal extends React.Component { }); return this.setState(prevState => ({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedMonitors' does not exist on type... Remove this comment to see the full error message + selectedMonitors: prevState.selectedMonitors.filter( (monitorId: $TSFixMe) => !monitorIds.includes(monitorId) ), - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedComponents' does not exist on ty... Remove this comment to see the full error message + selectedComponents: prevState.selectedComponents.filter( (componentId: $TSFixMe) => !componentIds.includes(componentId) ), @@ -325,7 +325,7 @@ class EditMonitorSlaModal extends React.Component { if (key === 'selectedComponents' && databank.includes(id)) { const monitorIds: $TSFixMe = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + this.props.monitorsList.forEach((monitor: $TSFixMe) => { if ((monitor.componentId._id || monitor.componentId) === id) { monitorIds.push(monitor._id); @@ -334,7 +334,7 @@ class EditMonitorSlaModal extends React.Component { return this.setState(prevState => ({ selectedMonitors: Array.from( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedMonitors' does not exist on type... Remove this comment to see the full error message + new Set([...prevState.selectedMonitors, ...monitorIds]) ), })); @@ -342,7 +342,7 @@ class EditMonitorSlaModal extends React.Component { if (key === 'selectedComponents' && !databank.includes(id)) { const monitorIds: $TSFixMe = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + this.props.monitorsList.forEach((monitor: $TSFixMe) => { if ((monitor.componentId._id || monitor.componentId) === id) { monitorIds.push(monitor._id); @@ -350,7 +350,7 @@ class EditMonitorSlaModal extends React.Component { }); return this.setState(prevState => ({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedMonitors' does not exist on type... Remove this comment to see the full error message + selectedMonitors: prevState.selectedMonitors.filter( (monitorId: $TSFixMe) => !monitorIds.includes(monitorId) ), @@ -360,17 +360,17 @@ class EditMonitorSlaModal extends React.Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + requesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'slaError' does not exist on type 'Readon... Remove this comment to see the full error message + slaError, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + closeModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + handleSubmit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editMonitorSlaModalId' does not exist on... Remove this comment to see the full error message + editMonitorSlaModalId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'formValues' does not exist on type 'Read... Remove this comment to see the full error message + formValues, } = this.props; @@ -384,7 +384,7 @@ class EditMonitorSlaModal extends React.Component { return (
@@ -533,14 +533,12 @@ class EditMonitorSlaModal extends React.Component { ready={ true } - value={`${ - selectedMonitors.length - } Monitor${ - selectedMonitors.length > - 0 + value={`${selectedMonitors.length + } Monitor${selectedMonitors.length > + 0 ? 's' : '' - } Selected`} + } Selected`} updateState={ this .updateState @@ -758,10 +756,10 @@ class EditMonitorSlaModal extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + EditMonitorSlaModal.displayName = 'EditMonitorSlaModal'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + EditMonitorSlaModal.propTypes = { closeModal: PropTypes.func.isRequired, handleSubmit: PropTypes.func.isRequired, @@ -799,15 +797,15 @@ const mapStateToProps = (state: $TSFixMe) => { const initialValues = {}; if (monitorSlaToBeUpdated) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + initialValues.name = monitorSlaToBeUpdated.name; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isDefault' does not exist on type '{}'. + initialValues.isDefault = monitorSlaToBeUpdated.isDefault; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'frequency' does not exist on type '{}'. + initialValues.frequency = monitorSlaToBeUpdated.frequency; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorUptime' does not exist on type '{... Remove this comment to see the full error message + initialValues.monitorUptime = monitorSlaToBeUpdated.monitorUptime; - // @ts-expect-error ts-migrate(2339) FIXME: Property '_id' does not exist on type '{}'. + initialValues._id = monitorSlaToBeUpdated._id; } @@ -815,14 +813,14 @@ const mapStateToProps = (state: $TSFixMe) => { (data: $TSFixMe) => String(data._id) === String(projectId) ); const monitors = monitorData ? monitorData.monitors : []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isDefault' does not exist on type '{}'. + if (!initialValues.isDefault) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + initialValues.monitors = monitors .filter( (monitor: $TSFixMe) => monitor.monitorSla && - // @ts-expect-error ts-migrate(2339) FIXME: Property '_id' does not exist on type '{}'. - String(monitor.monitorSla._id) === String(initialValues._id) + + String(monitor.monitorSla._id) === String(initialValues._id) ) .map((monitor: $TSFixMe) => monitor._id); } diff --git a/dashboard/src/components/monitorSla/MonitorSla.tsx b/dashboard/src/components/monitorSla/MonitorSla.tsx index 25d317121f..2256986cad 100644 --- a/dashboard/src/components/monitorSla/MonitorSla.tsx +++ b/dashboard/src/components/monitorSla/MonitorSla.tsx @@ -20,7 +20,7 @@ import DeleteMonitorSlaModal from './DeleteMonitorSlaModal'; class MonitorSla extends Component { limit: $TSFixMe; constructor() { - // @ts-expect-error ts-migrate(2554) FIXME: Expected 1-2 arguments, but got 0. + super(); this.limit = 10; this.state = { @@ -30,7 +30,7 @@ class MonitorSla extends Component { } componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const { projectId, fetchMonitorSlas } = this.props; if (projectId) { fetchMonitorSlas(projectId, 0, this.limit); @@ -38,9 +38,9 @@ class MonitorSla extends Component { } componentDidUpdate(prevProps: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + if (prevProps.currentProject !== this.props.currentProject) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + const { currentProject, fetchMonitorSlas } = this.props; if (currentProject) { fetchMonitorSlas(currentProject._id, 0, this.limit); @@ -49,7 +49,7 @@ class MonitorSla extends Component { } prevClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const { projectId, fetchMonitorSlas } = this.props; this.setState({ flag: false, @@ -61,20 +61,20 @@ class MonitorSla extends Component { limit ); this.setState({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + page: this.state.page === 1 ? 1 : this.state.page - 1, }); }; nextClicked = (skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const { projectId, fetchMonitorSlas } = this.props; this.setState({ flag: false, }); fetchMonitorSlas(projectId, skip + limit, limit); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; @@ -82,7 +82,7 @@ class MonitorSla extends Component { projectId, monitorSlaId }: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateMonitorSla' does not exist on type... Remove this comment to see the full error message + const { updateMonitorSla, setActiveMonitorSla } = this.props; const data = { isDefault: true }; setActiveMonitorSla(monitorSlaId); @@ -109,17 +109,17 @@ class MonitorSla extends Component { handleMonitorSlas = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + requesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorSlas' does not exist on type 'Rea... Remove this comment to see the full error message + monitorSlas, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + openModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeSla' does not exist on type 'Reado... Remove this comment to see the full error message + activeSla, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type 'Readon... Remove this comment to see the full error message + monitors, } = this.props; @@ -130,7 +130,7 @@ class MonitorSla extends Component { monitorSlas.map((monitorSla: $TSFixMe, index: $TSFixMe) => { const slaMonitors = monitors.filter( (monitor: $TSFixMe) => monitor.monitorSla && - String(monitor.monitorSla._id) === + String(monitor.monitorSla._id) === String(monitorSla._id) ); return ( @@ -258,9 +258,9 @@ class MonitorSla extends Component { if={ !requesting || String(activeSla) !== - String( - monitorSla._id - ) + String( + monitorSla._id + ) } > Set as Default @@ -269,9 +269,9 @@ class MonitorSla extends Component { if={ requesting && String(activeSla) === - String( - monitorSla._id - ) + String( + monitorSla._id + ) } > { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: projectId, content: DataPathHoC( @@ -454,7 +454,7 @@ class MonitorSla extends Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'flag' does not exist on type 'Readonly<{... Remove this comment to see the full error message + @@ -476,8 +476,8 @@ class MonitorSla extends Component { {(!monitorSlas || monitorSlas.length === 0) && - !requesting && - !fetchSlaError + !requesting && + !fetchSlaError ? 'You have no monitor SLA' : null} {fetchSlaError ? fetchSlaError : null} @@ -496,25 +496,17 @@ class MonitorSla extends Component { className="Text-color--inherit Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap" > {numberOfPage > 0 - ? `Page ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.state.page - } of ${numberOfPage} (${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - this.props.count - } SLA${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - this.props.count > 1 - ? 's' - : '' - })` - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - : `${this.props.count} SLA${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - this.props.count > 1 - ? 's' - : '' - }`} + ? `Page ${this.state.page + } of ${numberOfPage} (${this.props.count + } SLA${this.props.count > 1 + ? 's' + : '' + })` + + : `${this.props.count} SLA${this.props.count > 1 + ? 's' + : '' + }`} @@ -573,10 +565,10 @@ class MonitorSla extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + MonitorSla.displayName = 'MonitorSla'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + MonitorSla.propTypes = { openModal: PropTypes.func.isRequired, skip: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), diff --git a/dashboard/src/components/monitorSla/MonitorSlaModal.tsx b/dashboard/src/components/monitorSla/MonitorSlaModal.tsx index f69d657942..919800c51b 100644 --- a/dashboard/src/components/monitorSla/MonitorSlaModal.tsx +++ b/dashboard/src/components/monitorSla/MonitorSlaModal.tsx @@ -2,9 +2,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { reduxForm, Field } from 'redux-form'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; import { createMonitorSla, fetchMonitorSlas } from '../../actions/monitorSla'; import { fetchMonitors } from '../../actions/monitor'; @@ -19,30 +19,30 @@ function validate(values: $TSFixMe) { const errors = {}; if (!values.name || !values.name.trim()) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + errors.name = 'Monitor SLA name is required'; } if (values.customFrequency && isNaN(values.customFrequency)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'customFrequency' does not exist on type ... Remove this comment to see the full error message + errors.customFrequency = 'Only numeric values are allowed'; } if (values.customFrequency && Number(values.customFrequency) < 1) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'customFrequency' does not exist on type ... Remove this comment to see the full error message + errors.customFrequency = 'You need atleast a single day'; } if (values.customMonitorUptime && isNaN(values.customMonitorUptime)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'customMonitorUptime' does not exist on t... Remove this comment to see the full error message + errors.customMonitorUptime = 'Only numeric values are allowed'; } if ( values.customMonitorUptime && Number(values.customMonitorUptime) > 100 ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'customMonitorUptime' does not exist on t... Remove this comment to see the full error message + errors.customMonitorUptime = 'Uptime greater than 100 is not allowed'; } if (values.customMonitorUptime && Number(values.customMonitorUptime) < 1) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'customMonitorUptime' does not exist on t... Remove this comment to see the full error message + errors.customMonitorUptime = 'Uptime less than 1 is not allowed'; } return errors; @@ -71,17 +71,17 @@ class MonitorSlaModal extends React.Component { submitForm = (values: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + closeModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createMonitorSlaModalId' does not exist ... Remove this comment to see the full error message + createMonitorSlaModalId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createMonitorSla' does not exist on type... Remove this comment to see the full error message + createMonitorSla, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorSlas' does not exist on type... Remove this comment to see the full error message + fetchMonitorSlas, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitors' does not exist on type 'R... Remove this comment to see the full error message + fetchMonitors, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + data, } = this.props; const { setCustomFrequency, setCustomMonitorUptime } = this.state; @@ -92,13 +92,13 @@ class MonitorSlaModal extends React.Component { this.state.selectedMonitors && this.state.selectedMonitors.length > 0 ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + postObj.monitors = this.state.selectedMonitors; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + const isDuplicate = postObj.monitors - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + ? postObj.monitors.length === new Set(postObj.monitors).size ? false : true @@ -111,29 +111,29 @@ class MonitorSlaModal extends React.Component { return; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + postObj.name = values.name; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isDefault' does not exist on type '{}'. + postObj.isDefault = values.isDefault; if (setCustomFrequency) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'frequency' does not exist on type '{}'. + postObj.frequency = values.customFrequency; } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'frequency' does not exist on type '{}'. + postObj.frequency = values.frequencyOption; } if (setCustomMonitorUptime) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorUptime' does not exist on type '{... Remove this comment to see the full error message + postObj.monitorUptime = values.customMonitorUptime; } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorUptime' does not exist on type '{... Remove this comment to see the full error message + postObj.monitorUptime = values.monitorUptimeOption; } createMonitorSla(projectId, postObj).then(() => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'slaError' does not exist on type 'Readon... Remove this comment to see the full error message + if (!this.props.slaError) { fetchMonitors(projectId); fetchMonitorSlas(projectId, 0, 10); @@ -149,7 +149,7 @@ class MonitorSlaModal extends React.Component { case 'Escape': return this.handleCloseModal(); case 'Enter': - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + return document.getElementById('createSlaBtn').click(); default: return false; @@ -157,24 +157,24 @@ class MonitorSlaModal extends React.Component { }; handleCloseModal = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + this.props.closeModal({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createMonitorSlaModalId' does not exist ... Remove this comment to see the full error message + id: this.props.createMonitorSlaModalId, }); }; formatData = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + const monitors = this.props.monitorsList; const hash = {}; monitors.forEach((monitor: $TSFixMe) => { const projectId = monitor.projectId._id || monitor.projectId; const componentId = monitor.componentId._id || monitor.componentId; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + if (!hash[projectId]) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + hash[projectId] = { projectName: monitor.projectId?.name, projectId, @@ -193,11 +193,11 @@ class MonitorSlaModal extends React.Component { }; } else { let monitorAdded = false; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + hash[projectId] = { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + ...hash[projectId], - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + components: hash[projectId].components.map((componentObj: $TSFixMe) => { if (componentObj.componentId === componentId) { const newMonitor = { @@ -228,12 +228,12 @@ class MonitorSlaModal extends React.Component { }, ], }; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + hash[projectId] = { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + ...hash[projectId], components: [ - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + ...hash[projectId].components, componentData, ], @@ -256,7 +256,7 @@ class MonitorSlaModal extends React.Component { updateState = (value: $TSFixMe, key: $TSFixMe) => { this.setState(prevState => { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + let currentValue = prevState[key]; if (currentValue.includes(value)) { @@ -281,7 +281,7 @@ class MonitorSlaModal extends React.Component { if (key === 'selectedProjects' && databank.includes(id)) { const monitorIds: $TSFixMe = []; const componentIds: $TSFixMe = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + this.props.monitorsList.forEach((monitor: $TSFixMe) => { if ((monitor.projectId._id || monitor.projectId) === id) { monitorIds.push(monitor._id); @@ -293,11 +293,11 @@ class MonitorSlaModal extends React.Component { return this.setState(prevState => ({ selectedMonitors: Array.from( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedMonitors' does not exist on type... Remove this comment to see the full error message + new Set([...prevState.selectedMonitors, ...monitorIds]) ), selectedComponents: Array.from( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedComponents' does not exist on ty... Remove this comment to see the full error message + new Set([...prevState.selectedComponents, ...componentIds]) ), })); @@ -306,7 +306,7 @@ class MonitorSlaModal extends React.Component { if (key === 'selectedProjects' && !databank.includes(id)) { const monitorIds: $TSFixMe = []; const componentIds: $TSFixMe = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + this.props.monitorsList.forEach((monitor: $TSFixMe) => { if ((monitor.projectId._id || monitor.projectId) === id) { monitorIds.push(monitor._id); @@ -317,11 +317,11 @@ class MonitorSlaModal extends React.Component { }); return this.setState(prevState => ({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedMonitors' does not exist on type... Remove this comment to see the full error message + selectedMonitors: prevState.selectedMonitors.filter( (monitorId: $TSFixMe) => !monitorIds.includes(monitorId) ), - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedComponents' does not exist on ty... Remove this comment to see the full error message + selectedComponents: prevState.selectedComponents.filter( (componentId: $TSFixMe) => !componentIds.includes(componentId) ), @@ -330,7 +330,7 @@ class MonitorSlaModal extends React.Component { if (key === 'selectedComponents' && databank.includes(id)) { const monitorIds: $TSFixMe = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + this.props.monitorsList.forEach((monitor: $TSFixMe) => { if ((monitor.componentId._id || monitor.componentId) === id) { monitorIds.push(monitor._id); @@ -339,7 +339,7 @@ class MonitorSlaModal extends React.Component { return this.setState(prevState => ({ selectedMonitors: Array.from( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedMonitors' does not exist on type... Remove this comment to see the full error message + new Set([...prevState.selectedMonitors, ...monitorIds]) ), })); @@ -347,7 +347,7 @@ class MonitorSlaModal extends React.Component { if (key === 'selectedComponents' && !databank.includes(id)) { const monitorIds: $TSFixMe = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorsList' does not exist on type 'Re... Remove this comment to see the full error message + this.props.monitorsList.forEach((monitor: $TSFixMe) => { if ((monitor.componentId._id || monitor.componentId) === id) { monitorIds.push(monitor._id); @@ -355,7 +355,7 @@ class MonitorSlaModal extends React.Component { }); return this.setState(prevState => ({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedMonitors' does not exist on type... Remove this comment to see the full error message + selectedMonitors: prevState.selectedMonitors.filter( (monitorId: $TSFixMe) => !monitorIds.includes(monitorId) ), @@ -365,17 +365,17 @@ class MonitorSlaModal extends React.Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + requesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'slaError' does not exist on type 'Readon... Remove this comment to see the full error message + slaError, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + closeModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + handleSubmit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createMonitorSlaModalId' does not exist ... Remove this comment to see the full error message + createMonitorSlaModalId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'formValues' does not exist on type 'Read... Remove this comment to see the full error message + formValues, } = this.props; const { setCustomFrequency, setCustomMonitorUptime } = this.state; @@ -390,7 +390,7 @@ class MonitorSlaModal extends React.Component { return (
@@ -546,14 +546,12 @@ class MonitorSlaModal extends React.Component { ready={ true } - value={`${ - selectedMonitors.length - } Monitor${ - selectedMonitors.length > - 0 + value={`${selectedMonitors.length + } Monitor${selectedMonitors.length > + 0 ? 's' : '' - } Selected`} + } Selected`} updateState={ this .updateState @@ -908,10 +906,10 @@ class MonitorSlaModal extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + MonitorSlaModal.displayName = 'MonitorSlaModal'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + MonitorSlaModal.propTypes = { closeModal: PropTypes.func.isRequired, handleSubmit: PropTypes.func.isRequired, diff --git a/dashboard/src/components/multiSelect/DropDown.tsx b/dashboard/src/components/multiSelect/DropDown.tsx index 6a7d385e35..da343dbc79 100755 --- a/dashboard/src/components/multiSelect/DropDown.tsx +++ b/dashboard/src/components/multiSelect/DropDown.tsx @@ -42,7 +42,7 @@ class Dropdown extends React.Component { }; toggleExpanded = (value: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isLoading' does not exist on type 'Reado... Remove this comment to see the full error message + const { isLoading } = this.props; const { expanded } = this.state; @@ -84,7 +84,7 @@ class Dropdown extends React.Component { }; handleHover = (toggleExpanded: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shouldToggleOnHover' does not exist on t... Remove this comment to see the full error message + const { shouldToggleOnHover } = this.props; if (shouldToggleOnHover) { @@ -93,7 +93,7 @@ class Dropdown extends React.Component { }; renderPanel = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'ContentComponent' does not exist on type... Remove this comment to see the full error message + const { ContentComponent, contentProps } = this.props; return ( @@ -105,13 +105,13 @@ class Dropdown extends React.Component { render() { const { expanded, hasFocus } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isLoading' does not exist on type 'Reado... Remove this comment to see the full error message + const { children, isLoading, disabled } = this.props; return (
this.toggleExpanded()} > {children} @@ -157,13 +157,12 @@ class Dropdown extends React.Component { > @@ -174,10 +173,10 @@ class Dropdown extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Dropdown.displayName = 'Dropdown'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Dropdown.propTypes = { children: PropTypes.object, disabled: PropTypes.bool, diff --git a/dashboard/src/components/multiSelect/MultiSelectField.tsx b/dashboard/src/components/multiSelect/MultiSelectField.tsx index f352b9b28d..682ba45f82 100644 --- a/dashboard/src/components/multiSelect/MultiSelectField.tsx +++ b/dashboard/src/components/multiSelect/MultiSelectField.tsx @@ -1,7 +1,7 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Select from 'react-select'; -// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message + import { PropTypes } from 'prop-types'; const styles = { diff --git a/dashboard/src/components/multiSelect/MultiSelectMonitor.tsx b/dashboard/src/components/multiSelect/MultiSelectMonitor.tsx index d8db970dc9..41970b3328 100755 --- a/dashboard/src/components/multiSelect/MultiSelectMonitor.tsx +++ b/dashboard/src/components/multiSelect/MultiSelectMonitor.tsx @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Multiselect from 'react-widgets/lib/Multiselect'; const errorStyle = { diff --git a/dashboard/src/components/multiSelect/RFReactSelect.tsx b/dashboard/src/components/multiSelect/RFReactSelect.tsx index eae510e263..8f1972a495 100755 --- a/dashboard/src/components/multiSelect/RFReactSelect.tsx +++ b/dashboard/src/components/multiSelect/RFReactSelect.tsx @@ -57,7 +57,7 @@ const RFReactSelect = ({ const transformedValue = transformValue(value, options, isMulti); return (
bindActionCreators({ getMonitorLogs }, dispatch); @@ -250,7 +250,7 @@ function mapStateToProps(state: $TSFixMe, props: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message + PerformanceView.contextTypes = {}; export default connect(mapStateToProps, mapDispatchToProps)(PerformanceView); diff --git a/dashboard/src/components/performanceTracker/QuickStart.tsx b/dashboard/src/components/performanceTracker/QuickStart.tsx index 0e710340c4..074f1f4a22 100644 --- a/dashboard/src/components/performanceTracker/QuickStart.tsx +++ b/dashboard/src/components/performanceTracker/QuickStart.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import { metricsQuickStart } from '../../config'; import AceCodeEditor from '../basic/AceCodeEditor'; @@ -41,7 +41,7 @@ const QuickStart = ({ .getQuickStarts(appId, appKey) .filter(quickStart => quickStart.id === library)[0]; return ( - // @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message +
0 + + metricsQuickStart.getQuickStarts() + .length > 0 ? metricsQuickStart - // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 0. - .getQuickStarts() - .map( - library => ({ - value: - library.id, - label: - library.language, - }) - ) + + .getQuickStarts() + .map( + library => ({ + value: + library.id, + label: + library.language, + }) + ) : []), ]} /> @@ -131,7 +131,7 @@ const QuickStart = ({
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'installation' does not exist on type 'st... Remove this comment to see the full error message + {guide && guide.performanceTracker.installation ? (
@@ -139,26 +139,26 @@ const QuickStart = ({ {' '} {guide && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'installation' does not exist on type 'st... Remove this comment to see the full error message - guide.performanceTracker.installation + + guide.performanceTracker.installation ? guide.performanceTracker - // @ts-expect-error ts-migrate(2339) FIXME: Property 'installation' does not exist on type 'st... Remove this comment to see the full error message - .installation.package + + .installation.package : ''}
this.setState(prevState => ({ page: prevState.page - 1 })); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + next = () => this.setState(prevState => ({ page: prevState.page + 1 })); componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + type, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchIncomingMetrics' does not exist on ... Remove this comment to see the full error message + fetchIncomingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchOutgoingMetrics' does not exist on ... Remove this comment to see the full error message + fetchOutgoingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetIncomingDate' does not exist on typ... Remove this comment to see the full error message + resetIncomingDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetOutgoingDate' does not exist on typ... Remove this comment to see the full error message + resetOutgoingDate, } = this.props; @@ -83,17 +83,17 @@ class TableComponent extends Component { componentDidUpdate(prevProps: $TSFixMe) { if ( JSON.stringify(prevProps.performanceTracker) !== - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + JSON.stringify(this.props.performanceTracker) ) { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + type, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchIncomingMetrics' does not exist on ... Remove this comment to see the full error message + fetchIncomingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchOutgoingMetrics' does not exist on ... Remove this comment to see the full error message + fetchOutgoingMetrics, } = this.props; @@ -127,21 +127,21 @@ class TableComponent extends Component { handleStartDate = (val: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + type, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setIncomingStartDate' does not exist on ... Remove this comment to see the full error message + setIncomingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setOutgoingStartDate' does not exist on ... Remove this comment to see the full error message + setOutgoingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchIncomingMetrics' does not exist on ... Remove this comment to see the full error message + fetchIncomingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchOutgoingMetrics' does not exist on ... Remove this comment to see the full error message + fetchOutgoingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingEndDate' does not exist on type ... Remove this comment to see the full error message + incomingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingEndDate' does not exist on type ... Remove this comment to see the full error message + outgoingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, } = this.props; @@ -170,21 +170,21 @@ class TableComponent extends Component { handleEndDate = (val: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + type, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setIncomingEndDate' does not exist on ty... Remove this comment to see the full error message + setIncomingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'setOutgoingEndDate' does not exist on ty... Remove this comment to see the full error message + setOutgoingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchIncomingMetrics' does not exist on ... Remove this comment to see the full error message + fetchIncomingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchOutgoingMetrics' does not exist on ... Remove this comment to see the full error message + fetchOutgoingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingStartDate' does not exist on typ... Remove this comment to see the full error message + incomingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingStartDate' does not exist on typ... Remove this comment to see the full error message + outgoingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, } = this.props; @@ -217,21 +217,21 @@ class TableComponent extends Component { handlePrev = (skip: $TSFixMe, limit: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + type, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingStartDate' does not exist on typ... Remove this comment to see the full error message + incomingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingEndDate' does not exist on type ... Remove this comment to see the full error message + incomingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingStartDate' does not exist on typ... Remove this comment to see the full error message + outgoingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingEndDate' does not exist on type ... Remove this comment to see the full error message + outgoingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchIncomingMetrics' does not exist on ... Remove this comment to see the full error message + fetchIncomingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchOutgoingMetrics' does not exist on ... Remove this comment to see the full error message + fetchOutgoingMetrics, } = this.props; @@ -261,21 +261,21 @@ class TableComponent extends Component { handleNext = (skip: $TSFixMe, limit: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + type, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingStartDate' does not exist on typ... Remove this comment to see the full error message + incomingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingEndDate' does not exist on type ... Remove this comment to see the full error message + incomingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingStartDate' does not exist on typ... Remove this comment to see the full error message + outgoingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingEndDate' does not exist on type ... Remove this comment to see the full error message + outgoingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchIncomingMetrics' does not exist on ... Remove this comment to see the full error message + fetchIncomingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchOutgoingMetrics' does not exist on ... Remove this comment to see the full error message + fetchOutgoingMetrics, } = this.props; @@ -305,27 +305,27 @@ class TableComponent extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'heading' does not exist on type 'Readonl... Remove this comment to see the full error message + heading, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subHeading' does not exist on type 'Read... Remove this comment to see the full error message + subHeading, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message + type, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingMetrics' does not exist on type ... Remove this comment to see the full error message + incomingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingMetrics' does not exist on type ... Remove this comment to see the full error message + outgoingMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingStartDate' does not exist on typ... Remove this comment to see the full error message + incomingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingEndDate' does not exist on type ... Remove this comment to see the full error message + incomingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingStartDate' does not exist on typ... Remove this comment to see the full error message + outgoingStartDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'outgoingEndDate' does not exist on type ... Remove this comment to see the full error message + outgoingEndDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + openModal, } = this.props; const { page } = this.state; @@ -455,7 +455,7 @@ class TableComponent extends Component { {incomingMetricsData && incomingMetricsData .data.length > - 0 && + 0 && incomingMetricsData.data.map( ( metric: $TSFixMe, @@ -587,7 +587,7 @@ class TableComponent extends Component { incomingMetrics .metrics .length === - 0) && + 0) && !incomingMetrics.requesting && !incomingMetrics.error } @@ -607,9 +607,9 @@ class TableComponent extends Component { incomingMetrics .metrics .length === - 0) && - !incomingMetrics.requesting && - !incomingMetrics.error + 0) && + !incomingMetrics.requesting && + !incomingMetrics.error ? 'There is no incoming performance metrics at this time' : null} {incomingMetrics.error @@ -753,7 +753,7 @@ class TableComponent extends Component { {outgoingMetricsData && outgoingMetricsData .data.length > - 0 && + 0 && outgoingMetricsData.data.map( ( metric: $TSFixMe, @@ -886,7 +886,7 @@ class TableComponent extends Component { outgoingMetrics .metrics .length === - 0) && + 0) && !outgoingMetrics.requesting && !outgoingMetrics.error } @@ -906,9 +906,9 @@ class TableComponent extends Component { outgoingMetrics .metrics .length === - 0) && - !outgoingMetrics.requesting && - !outgoingMetrics.error + 0) && + !outgoingMetrics.requesting && + !outgoingMetrics.error ? 'There is no outgoing performance metrics at this time' : null} {outgoingMetrics.error @@ -1014,15 +1014,15 @@ class TableComponent extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + TableComponent.displayName = 'TableComponent'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'defaultProps' does not exist on type 'ty... Remove this comment to see the full error message + TableComponent.defaultProps = { title: [], }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + TableComponent.propTypes = { heading: PropTypes.any, subHeading: PropTypes.any, diff --git a/dashboard/src/components/performanceTracker/TrackerInfo.tsx b/dashboard/src/components/performanceTracker/TrackerInfo.tsx index dbe1a7ed35..a09b070239 100644 --- a/dashboard/src/components/performanceTracker/TrackerInfo.tsx +++ b/dashboard/src/components/performanceTracker/TrackerInfo.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { FormLoader } from '../basic/Loader'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; import { RenderIfAdmin } from '../basic/RenderIfAdmin'; import ShouldRender from '../basic/ShouldRender'; @@ -28,25 +28,25 @@ class TrackerInfo extends Component { toggleConfirmationBox = () => { this.setState(state => ({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmBoxHidden' does not exist on type... Remove this comment to see the full error message + confirmBoxHidden: !state.confirmBoxHidden, })); }; changeAPIKeyVisualState = () => { this.setState(state => ({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hidden' does not exist on type 'Readonly... Remove this comment to see the full error message + hidden: !state.hidden, })); }; handleReset = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPerformanceTrackerKey' does not exi... Remove this comment to see the full error message + resetPerformanceTrackerKey, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + data, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + closeModal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'trackerObj' does not exist on type 'Read... Remove this comment to see the full error message + trackerObj, } = this.props; const { currentProject, performanceTracker } = data; @@ -61,7 +61,7 @@ class TrackerInfo extends Component { }); }; handleKeyBoard = (e: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + const { closeModal } = this.props; switch (e.key) { @@ -81,7 +81,7 @@ class TrackerInfo extends Component { render() { const { hidden } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { data, closeModal, trackerObj } = this.props; const { currentProject, performanceTracker } = data; return ( @@ -366,10 +366,10 @@ class TrackerInfo extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + TrackerInfo.displayName = 'TrackerInfo'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + TrackerInfo.propTypes = { data: PropTypes.object, closeModal: PropTypes.func, diff --git a/dashboard/src/components/performanceTracker/TransactionMetricsTable.tsx b/dashboard/src/components/performanceTracker/TransactionMetricsTable.tsx index b9f0e021e1..9af9637660 100644 --- a/dashboard/src/components/performanceTracker/TransactionMetricsTable.tsx +++ b/dashboard/src/components/performanceTracker/TransactionMetricsTable.tsx @@ -7,18 +7,18 @@ import TableComponent from './TableComponent'; export class TransactionMetricsTable extends Component { handleKeyBoard: $TSFixMe; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'heading' does not exist on type 'Readonl... Remove this comment to see the full error message + const { heading, title, subHeading, type } = this.props; return (
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + + this.props.probesList.count && + + this.props.probesList.count > + this.props.probesList.skip + this.props.probesList.limit ? true : false; let canPrev = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + this.props.probesList && this.props.probesList.skip <= 0 ? false : true; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + this.props.probesList && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + (this.props.probesList.requesting || !this.props.probesList.data) ) { canNext = false; canPrev = false; } const numberOfPages = Math.ceil( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + parseInt(this.props.probesList && this.props.probesList.count) / 10 ); return ( @@ -151,13 +151,13 @@ export class ProbeList extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + {this.props.probesList && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - this.props.probesList.data && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - this.props.probesList.data.length ? ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + + this.props.probesList.data && + + this.props.probesList.data.length ? ( + this.props.probesList.data.map( (probesData: $TSFixMe, index: $TSFixMe) => ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: this.state - // @ts-expect-error ts-migrate(2339) FIXME: Property 'ProbeDetailModalId' does not exist on ty... Remove this comment to see the full error message + .ProbeDetailModalId, onClose: () => '', content: DataPathHoC( @@ -176,11 +176,11 @@ export class ProbeList extends Component { { ProbeDetailModalId: this .state - // @ts-expect-error ts-migrate(2339) FIXME: Property 'ProbeDetailModalId' does not exist on ty... Remove this comment to see the full error message + .ProbeDetailModalId, closeModal: this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + .closeModal, probesData, } @@ -220,7 +220,7 @@ export class ProbeList extends Component { '25px', marginRight: '10px', - // @ts-expect-error ts-migrate(2322) FIXME: Type 'false | "0.3"' is not assignable to type 'Op... Remove this comment to see the full error message + opacity: !probesData.probeImage && '0.3', @@ -246,10 +246,10 @@ export class ProbeList extends Component { {probesData.lastAlive ? moment( - probesData.lastAlive - ).format( - 'dddd, MMMM Do YYYY, h:mm a' - ) + probesData.lastAlive + ).format( + 'dddd, MMMM Do YYYY, h:mm a' + ) : ''}
@@ -325,7 +325,7 @@ export class ProbeList extends Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + {this.props.probesList && this.props.probesList.requesting ? ( ) : null} @@ -337,21 +337,21 @@ export class ProbeList extends Component { padding: '0 10px', }} > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + {this.props.probesList && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - (!this.props.probesList.data || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - !this.props.probesList.data.length) && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - !this.props.probesList.requesting && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - !this.props.probesList.error + + (!this.props.probesList.data || + + !this.props.probesList.data.length) && + + !this.props.probesList.requesting && + + !this.props.probesList.error ? 'Probes does not exist. Please contact admin to add one.' : null} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + {this.props.probesList && this.props.probesList.error - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + ? this.props.probesList.error : null}
@@ -360,26 +360,22 @@ export class ProbeList extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message + {this.props.probesList && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - this.props.probesList.count - ? `Page ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.page - } of ${numberOfPages} (${this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - .probesList && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - this.props.probesList - .count} Probe${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - this.props.probesList && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probesList' does not exist on type 'Read... Remove this comment to see the full error message - this.props.probesList.count === 1 - ? '' - : 's' - })` + + this.props.probesList.count + ? `Page ${this.props.page + } of ${numberOfPages} (${this.props + + .probesList && + + this.props.probesList + .count} Probe${this.props.probesList && + + this.props.probesList.count === 1 + ? '' + : 's' + })` : null} @@ -389,7 +385,7 @@ export class ProbeList extends Component {
{emailVerificationError && emailValue === - profileSettingState.initAlertEmail && ( + profileSettingState.initAlertEmail && (
{ @@ -776,7 +776,7 @@ export class ProfileSetting extends Component { }} > {profileSettings.data && - profileSettings.data - .alertPhoneNumber && - (profileSettingState.initPhoneVerificationNumber || - (profileSettings.data && - profileSettings.data - .tempAlertPhoneNumber)) ? ( + profileSettings.data + .alertPhoneNumber && + (profileSettingState.initPhoneVerificationNumber || + (profileSettings.data && + profileSettings.data + .tempAlertPhoneNumber)) ? (
{' '} {profileSettings.data && - profileSettings - .data - .alertPhoneNumber + profileSettings + .data + .alertPhoneNumber ? profileSettings - .data - .alertPhoneNumber + .data + .alertPhoneNumber : ''}{' '} will be used @@ -870,13 +870,13 @@ export class ProfileSetting extends Component { {profileSettingState.initPhoneVerificationNumber ? profileSettingState.initPhoneVerificationNumber : profileSettings.data && - profileSettings - .data - .tempAlertPhoneNumber - ? profileSettings - .data - .tempAlertPhoneNumber - : ''}{' '} + profileSettings + .data + .tempAlertPhoneNumber + ? profileSettings + .data + .tempAlertPhoneNumber + : ''}{' '} {' '} is verified.{' '} @@ -1067,20 +1067,20 @@ export class ProfileSetting extends Component { )} {!sendVerificationSMSRequesting && - resendTimer && - resendTimer > + resendTimer && + resendTimer > 0 ? ( Resend in{' '} {Math.floor( resendTimer / - 60 + 60 )}{' '} :{' '} {Math.floor( resendTimer % - 60 + 60 )} ) : ( @@ -1137,7 +1137,7 @@ export class ProfileSetting extends Component { verifySMSCodeError } {sendVerificationSMSError === - 'Server Error.' ? ( + 'Server Error.' ? ( Please provide @@ -1221,7 +1221,7 @@ export class ProfileSetting extends Component {
@@ -1614,7 +1614,7 @@ export class ProfileSetting extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ProfileSetting.displayName = 'ProfileSetting'; const ProfileSettingForm = reduxForm({ @@ -1699,7 +1699,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ProfileSetting.propTypes = { alertPhoneNumber: PropTypes.string, emailValue: PropTypes.string, diff --git a/dashboard/src/components/project/CreateProjectModal.tsx b/dashboard/src/components/project/CreateProjectModal.tsx index 4194cc4cbf..169c876789 100755 --- a/dashboard/src/components/project/CreateProjectModal.tsx +++ b/dashboard/src/components/project/CreateProjectModal.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { SubmissionError } from 'redux-form'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; @@ -14,31 +14,31 @@ export class CreateProjectModal extends Component { } createProject(values: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchProject' does not exist on type 'R... Remove this comment to see the full error message + const { switchProject, dispatch } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createProject' does not exist on type 'R... Remove this comment to see the full error message + return this.props.createProject(values).then((res: Response) => { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects.newProject && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.projects.newProject.project ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message + switchProject(dispatch, this.props.projects.newProject.project); } if (res.error) { throw new SubmissionError({ _error: res.error.message }); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideForm' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.hideForm(); }); } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'visible' does not exist on type 'Readonl... Remove this comment to see the full error message + return this.props.visible ? (
@@ -76,10 +76,10 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( dispatch ); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + CreateProjectModal.displayName = 'CreateProjectModal'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + CreateProjectModal.propTypes = { dispatch: PropTypes.func.isRequired, hideForm: PropTypes.func.isRequired, diff --git a/dashboard/src/components/project/DeleteCaution.tsx b/dashboard/src/components/project/DeleteCaution.tsx index b4882a7d5a..c89320d905 100755 --- a/dashboard/src/components/project/DeleteCaution.tsx +++ b/dashboard/src/components/project/DeleteCaution.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { reduxForm, Field } from 'redux-form'; import { IS_SAAS_SERVICE, Validate } from '../../config'; import ShouldRender from '../basic/ShouldRender'; @@ -10,7 +10,7 @@ function validate(values: $TSFixMe) { const errors = {}; if (!Validate.text(values.projectName)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + errors.name = 'Project Name is required!'; } @@ -30,14 +30,14 @@ class DeleteCaution extends Component { switch (e.key) { case 'Escape': if (IS_SAAS_SERVICE) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideOnDelete' does not exist on type 'Re... Remove this comment to see the full error message + this.props.hideOnDelete(); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hide' does not exist on type 'Readonly<{... Remove this comment to see the full error message + return this.props.hide(); case 'Enter': if (e.target.localName !== 'textarea') { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + return document.getElementById('btnDeleteProject').click(); } return; @@ -48,17 +48,17 @@ class DeleteCaution extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hide' does not exist on type 'Readonly<{... Remove this comment to see the full error message + hide, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + requesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteProject' does not exist on type 'R... Remove this comment to see the full error message + deleteProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + handleSubmit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteSuccess' does not exist on type 'R... Remove this comment to see the full error message + deleteSuccess, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideOnDelete' does not exist on type 'Re... Remove this comment to see the full error message + hideOnDelete, } = this.props; @@ -170,10 +170,10 @@ class DeleteCaution extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + DeleteCaution.displayName = 'DeleteCaution'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + DeleteCaution.propTypes = { hide: PropTypes.func.isRequired, deleteProject: PropTypes.func.isRequired, diff --git a/dashboard/src/components/project/DeleteMessaging.tsx b/dashboard/src/components/project/DeleteMessaging.tsx index e6f069b228..c6c8c1eca0 100644 --- a/dashboard/src/components/project/DeleteMessaging.tsx +++ b/dashboard/src/components/project/DeleteMessaging.tsx @@ -16,7 +16,7 @@ class DeleteMessaging extends Component { handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hide' does not exist on type 'Readonly<{... Remove this comment to see the full error message + return this.props.hide(); case 'Enter': if (e.target.localName !== 'textarea') { @@ -29,11 +29,11 @@ class DeleteMessaging extends Component { }; handleClick = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeDeleteModal' does not exist on typ... Remove this comment to see the full error message + this.props.changeDeleteModal(); }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hide' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { hide, requesting } = this.props; return (
@@ -123,9 +123,9 @@ class DeleteMessaging extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + DeleteMessaging.displayName = 'DeleteMessaging'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + DeleteMessaging.propTypes = { changeDeleteModal: PropTypes.func.isRequired, hide: PropTypes.func.isRequired, diff --git a/dashboard/src/components/project/DeleteProjectModal.tsx b/dashboard/src/components/project/DeleteProjectModal.tsx index 8257078c7f..f955ffab8d 100755 --- a/dashboard/src/components/project/DeleteProjectModal.tsx +++ b/dashboard/src/components/project/DeleteProjectModal.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; import DeleteCaution from './DeleteCaution'; import { IS_SAAS_SERVICE } from '../../config'; @@ -27,7 +27,7 @@ export class DeleteProjectModal extends Component { } deleteProject(values: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const { projectId, deleteProject } = this.props; deleteProject(projectId, values.feedback).then(() => { @@ -37,10 +37,10 @@ export class DeleteProjectModal extends Component { } closeNotice() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchProject' does not exist on type 'R... Remove this comment to see the full error message + const { switchProject, nextProject } = this.props; if (!IS_SAAS_SERVICE) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideDeleteModal' does not exist on type ... Remove this comment to see the full error message + this.props.hideDeleteModal(); } if (nextProject) switchProject(nextProject); @@ -48,11 +48,11 @@ export class DeleteProjectModal extends Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleted' does not exist on type 'Readonl... Remove this comment to see the full error message + const { deleted } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deletedModal' does not exist on type 'Re... Remove this comment to see the full error message + const { deletedModal, deletedProjectSuccess } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'visible' does not exist on type 'Readonl... Remove this comment to see the full error message + return this.props.visible ? (
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideDeleteModal' does not exist on type ... Remove this comment to see the full error message + {deletedModal ? (
@@ -69,14 +69,14 @@ export class DeleteProjectModal extends Component { requesting={this.props.isRequesting} /> */} @@ -84,13 +84,13 @@ export class DeleteProjectModal extends Component { ) : (
... Remove this comment to see the full error message + hide={this.props.hideDeleteModal} deleteProject={this.deleteProject} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + requesting={this.props.isRequesting} deleted={deleted} - // showDeleteModal="show" + // showDeleteModal="show" />
)} @@ -101,7 +101,7 @@ export class DeleteProjectModal extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + DeleteProjectModal.displayName = 'DeleteProjectModal'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( @@ -141,7 +141,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + DeleteProjectModal.propTypes = { deleteProject: PropTypes.func.isRequired, switchProject: PropTypes.func.isRequired, diff --git a/dashboard/src/components/project/DeleteRequesModal.tsx b/dashboard/src/components/project/DeleteRequesModal.tsx index 25aec35099..cf2fd50f9d 100755 --- a/dashboard/src/components/project/DeleteRequesModal.tsx +++ b/dashboard/src/components/project/DeleteRequesModal.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; import ShouldRender from '../basic/ShouldRender'; import { Spinner } from '../basic/Loader'; @@ -17,7 +17,7 @@ class DeleteRequestModal extends Component { handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeNotice' does not exist on type 'Rea... Remove this comment to see the full error message + return this.props.closeNotice(); default: return false; @@ -25,12 +25,12 @@ class DeleteRequestModal extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeNotice' does not exist on type 'Rea... Remove this comment to see the full error message + const { closeNotice, requesting } = this.props; return (
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeNotice' does not exist on type 'Rea... Remove this comment to see the full error message +
@@ -66,10 +66,10 @@ class DeleteRequestModal extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + DeleteRequestModal.displayName = 'DeleteRequestModal'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + DeleteRequestModal.propTypes = { closeNotice: PropTypes.func, requesting: PropTypes.bool, diff --git a/dashboard/src/components/project/ProjectForm.tsx b/dashboard/src/components/project/ProjectForm.tsx index d8a1af78d7..f5f966c519 100755 --- a/dashboard/src/components/project/ProjectForm.tsx +++ b/dashboard/src/components/project/ProjectForm.tsx @@ -1,10 +1,10 @@ import React from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { reduxForm, Field } from 'redux-form'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; import ShouldRender from '../basic/ShouldRender'; import PlanFields from './PlanFields'; @@ -20,19 +20,19 @@ import { StripeProvider, Elements, injectStripe, - // @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + } from '@stripe/react-stripe-js'; function validate(values: $TSFixMe) { const errors = {}; if (!Validate.text(values.projectName)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + errors.name = 'Project Name is required!'; } if (!Validate.text(values.planId)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + errors.name = 'Stripe PlanID is required!'; } @@ -71,10 +71,10 @@ class _ProjectForm extends React.Component { handleKeyboard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideForm' does not exist on type 'Readon... Remove this comment to see the full error message + return this.props.hideForm(); case 'Enter': - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + return document.getElementById('btnCreateProject').click(); default: return false; @@ -85,19 +85,19 @@ class _ProjectForm extends React.Component { const cardRegistered = User.isCardRegistered() === 'false' ? false : true; const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'stripe' does not exist on type 'Readonly... Remove this comment to see the full error message + stripe, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createProjectRequest' does not exist on ... Remove this comment to see the full error message + createProjectRequest, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createProjectError' does not exist on ty... Remove this comment to see the full error message + createProjectError, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'checkCard' does not exist on type 'Reado... Remove this comment to see the full error message + checkCard, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type 'Readonly<... Remove this comment to see the full error message + email, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'companyName' does not exist on type 'Rea... Remove this comment to see the full error message + companyName, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'submitForm' does not exist on type 'Read... Remove this comment to see the full error message + submitForm, } = this.props; if (cardRegistered || !IS_SAAS_SERVICE) { @@ -147,15 +147,15 @@ class _ProjectForm extends React.Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + handleSubmit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideForm' does not exist on type 'Readon... Remove this comment to see the full error message + hideForm, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'errorStack' does not exist on type 'Read... Remove this comment to see the full error message + errorStack, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + requesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activePlan' does not exist on type 'Read... Remove this comment to see the full error message + activePlan, } = this.props; const cardRegistered = User.isCardRegistered(); @@ -166,7 +166,7 @@ class _ProjectForm extends React.Component { onSubmit={handleSubmit(this.createToken)} >
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideForm' does not exist on type 'Readon... Remove this comment to see the full error message +
@@ -256,7 +256,7 @@ class _ProjectForm extends React.Component { >
- // @ts-expect-error ts-migrate(2786) FIXME: 'PlanFields' cannot be used as a JSX component. + @@ -280,11 +280,11 @@ class _ProjectForm extends React.Component {
diff --git a/dashboard/src/components/project/UpgradePlanFields.tsx b/dashboard/src/components/project/UpgradePlanFields.tsx index 9a3cce53f1..be4cb45cad 100755 --- a/dashboard/src/components/project/UpgradePlanFields.tsx +++ b/dashboard/src/components/project/UpgradePlanFields.tsx @@ -13,7 +13,7 @@ export default function UpgradePlanFields(props: $TSFixMe) { if (currentProject.stripePlanId === plan.planId) { for (let i = 0; i < plans.length; i++) { if (i > index && plans[index].category !== plans[i].category) { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ category: string; planId: stri... Remove this comment to see the full error message + filtered.push(plans[i]); } } @@ -51,17 +51,17 @@ export default function UpgradePlanFields(props: $TSFixMe) { > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'category' does not exist on type 'never'... Remove this comment to see the full error message + {plan.category} Plan diff --git a/dashboard/src/components/project/UpgradePlanModal.tsx b/dashboard/src/components/project/UpgradePlanModal.tsx index 2e181e96ff..a80baf12f2 100755 --- a/dashboard/src/components/project/UpgradePlanModal.tsx +++ b/dashboard/src/components/project/UpgradePlanModal.tsx @@ -26,35 +26,35 @@ export class UpgradePlanModal extends Component { } hideForm = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hideUpgradeForm' does not exist on type ... Remove this comment to see the full error message + this.props.hideUpgradeForm(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetCreateMonitor' does not exist on ty... Remove this comment to see the full error message + this.props.resetCreateMonitor(); }; upgradePlan(values: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + const { _id: id, name } = this.props.currentProject; const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'category' does not exist on type '{ cate... Remove this comment to see the full error message + category: oldCategory, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ category... Remove this comment to see the full error message + type: oldType, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'details' does not exist on type '{ categ... Remove this comment to see the full error message + details: oldDetails, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message + } = PricingPlan.getPlanById(this.props.initialValues.planId); const oldPlan = `${oldCategory} ${oldType}ly (${oldDetails})`; const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'category' does not exist on type '{ cate... Remove this comment to see the full error message + category: newCategory, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ category... Remove this comment to see the full error message + type: newType, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'details' does not exist on type '{ categ... Remove this comment to see the full error message + details: newDetails, } = PricingPlan.getPlanById(values.planId); const newPlan = `${newCategory} ${newType}ly (${newDetails})`; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'changePlan' does not exist on type 'Read... Remove this comment to see the full error message + this.props.changePlan(id, values.planId, name, oldPlan, newPlan); this.hideForm(); @@ -70,7 +70,7 @@ export class UpgradePlanModal extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'visible' does not exist on type 'Readonl... Remove this comment to see the full error message + return this.props.visible ? (
bindActionCreators( dispatch ); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + UpgradePlanModal.displayName = 'UpgradePlanModal'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + UpgradePlanModal.propTypes = { dispatch: PropTypes.func.isRequired, hideUpgradeForm: PropTypes.func.isRequired, diff --git a/dashboard/src/components/reports/Incidents.tsx b/dashboard/src/components/reports/Incidents.tsx index 4f07c7863d..ee0bcc5894 100755 --- a/dashboard/src/components/reports/Incidents.tsx +++ b/dashboard/src/components/reports/Incidents.tsx @@ -28,15 +28,15 @@ class Incidents extends Component { componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getIncidents' does not exist on type 'Re... Remove this comment to see the full error message + getIncidents, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type 'Readonly... Remove this comment to see the full error message + filter, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, } = this.props; @@ -54,13 +54,13 @@ class Incidents extends Component { } = nextProps; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type 'Readonly... Remove this comment to see the full error message + filter !== this.props.filter || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate !== this.props.startDate || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate !== this.props.endDate || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject !== this.props.currentProject ) { getIncidents(currentProject, filter, startDate, endDate); @@ -74,17 +74,17 @@ class Incidents extends Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidents' does not exist on type 'Reado... Remove this comment to see the full error message + const { incidents } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentReports' does not exist on type ... Remove this comment to see the full error message + const { incidentReports, filter } = this.props; const chartData: $TSFixMe = []; incidents.map((element: $TSFixMe) => { const value = {}; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resolveTime' does not exist on type '{}'... Remove this comment to see the full error message + value.resolveTime = element.incidents; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'date' does not exist on type '{}'. + value.date = element[filter]; chartData.push(value); return element; @@ -228,7 +228,7 @@ class Incidents extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Incidents.displayName = 'Incidents'; const actionCreators = { @@ -246,7 +246,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => ({ ...bindActionCreators(actionCreators, dispatch) }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Incidents.propTypes = { getIncidents: PropTypes.func, filter: PropTypes.string, diff --git a/dashboard/src/components/reports/Members.tsx b/dashboard/src/components/reports/Members.tsx index 297061f1cd..f1c1d5046c 100755 --- a/dashboard/src/components/reports/Members.tsx +++ b/dashboard/src/components/reports/Members.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'huma... Remove this comment to see the full error message + import humanize from 'humanize-duration'; import { ListLoader } from '../basic/Loader'; import { @@ -28,13 +28,13 @@ class MembersList extends Component { componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getActiveMembers' does not exist on type... Remove this comment to see the full error message + getActiveMembers, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, } = this.props; @@ -42,7 +42,7 @@ class MembersList extends Component { currentProject, startDate, endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.state.skip, 10 ); @@ -58,18 +58,18 @@ class MembersList extends Component { } = nextProps; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate !== this.props.startDate || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate !== this.props.endDate || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject !== this.props.currentProject ) { getActiveMembers( currentProject, startDate, endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.state.skip, 10 ); @@ -85,21 +85,21 @@ class MembersList extends Component { handleNext(event: $TSFixMe) { event.preventDefault(); const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getActiveMembers' does not exist on type... Remove this comment to see the full error message + getActiveMembers, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const skip = this.state.skip + this.state.limit; getActiveMembers(currentProject, startDate, endDate, skip, 10); this.setState({ skip, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + page: this.state.page + 1, }); } @@ -107,45 +107,45 @@ class MembersList extends Component { handlePrevious(event: $TSFixMe) { event.preventDefault(); const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getActiveMembers' does not exist on type... Remove this comment to see the full error message + getActiveMembers, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const skip = this.state.skip - this.state.limit; getActiveMembers(currentProject, startDate, endDate, skip, 10); this.setState({ skip, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + page: this.state.page === 1 ? 1 : this.state.page - 1, }); } render() { const count = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + this.props.activeMembers && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + this.props.activeMembers.members && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + this.props.activeMembers.members.length; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + let canNext = count > this.state.skip + this.state.limit ? true : false; let canPrev = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + this.props.activeMembers && this.state.skip <= 0 ? false : true; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + this.props.activeMembers && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + (this.props.activeMembers.requesting || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + !this.props.activeMembers.members) ) { canNext = false; @@ -219,7 +219,7 @@ class MembersList extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'members' does not exist on type 'Readonl... Remove this comment to see the full error message + {this.state.members.map((member: $TSFixMe) => { const { memberName, @@ -367,10 +367,10 @@ class MembersList extends Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + {this.props.activeMembers && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message - this.props.activeMembers.requesting ? ( + + this.props.activeMembers.requesting ? ( ) : null}
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + {this.props.activeMembers && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message - (!this.props.activeMembers.members || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message - !this.props.activeMembers.members.length) && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message - !this.props.activeMembers.requesting && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message - !this.props.activeMembers.error + + (!this.props.activeMembers.members || + + !this.props.activeMembers.members.length) && + + !this.props.activeMembers.requesting && + + !this.props.activeMembers.error ? "We don't have any reports for this period" : null} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + {this.props.activeMembers && this.props.activeMembers.error - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMembers' does not exist on type 'R... Remove this comment to see the full error message + ? this.props.activeMembers.error : null}
@@ -404,12 +404,9 @@ class MembersList extends Component { {numberOfPages > 0 - ? `Page ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.state.page - } of ${numberOfPages} (${count} Member${ - count === 1 ? '' : 's' - })` + ? `Page ${this.state.page + } of ${numberOfPages} (${count} Member${count === 1 ? '' : 's' + })` : null} @@ -478,10 +475,10 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + MembersList.displayName = 'MembersList'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + MembersList.propTypes = { getActiveMembers: PropTypes.func, activeMembers: PropTypes.object, diff --git a/dashboard/src/components/reports/Monitors.tsx b/dashboard/src/components/reports/Monitors.tsx index aa41c2f402..0b8be63d13 100755 --- a/dashboard/src/components/reports/Monitors.tsx +++ b/dashboard/src/components/reports/Monitors.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'huma... Remove this comment to see the full error message + import humanize from 'humanize-duration'; import { ListLoader } from '../basic/Loader'; import { @@ -26,13 +26,13 @@ class Monitors extends Component { } componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getActiveMonitors' does not exist on typ... Remove this comment to see the full error message + getActiveMonitors, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, } = this.props; getActiveMonitors(currentProject, startDate, endDate); @@ -48,18 +48,18 @@ class Monitors extends Component { } = nextProps; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate !== this.props.startDate || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate !== this.props.endDate || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject !== this.props.currentProject ) { getActiveMonitors( currentProject, startDate, endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.state.skip, 10 ); @@ -75,21 +75,21 @@ class Monitors extends Component { handleNext(event: $TSFixMe) { event.preventDefault(); const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getActiveMonitors' does not exist on typ... Remove this comment to see the full error message + getActiveMonitors, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const skip = this.state.skip + this.state.limit; getActiveMonitors(currentProject, startDate, endDate, skip, 10); this.setState({ skip, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + page: this.state.page + 1, }); } @@ -97,45 +97,45 @@ class Monitors extends Component { handlePrevious(event: $TSFixMe) { event.preventDefault(); const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getActiveMonitors' does not exist on typ... Remove this comment to see the full error message + getActiveMonitors, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const skip = this.state.skip - this.state.limit; getActiveMonitors(currentProject, startDate, endDate, skip, 10); this.setState({ skip, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + page: this.state.page === 1 ? 1 : this.state.page - 1, }); } render() { let canNext = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + this.props.activeMonitors && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - this.props.activeMonitors.count && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - this.props.activeMonitors.count > this.state.skip + this.state.limit + + this.props.activeMonitors.count && + + this.props.activeMonitors.count > this.state.skip + this.state.limit ? true : false; let canPrev = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + this.props.activeMonitors && this.state.skip <= 0 ? false : true; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + this.props.activeMonitors && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + (this.props.activeMonitors.requesting || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + !this.props.activeMonitors.members) ) { canNext = false; @@ -143,7 +143,7 @@ class Monitors extends Component { } const numberOfPages = Math.ceil( parseInt( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + this.props.activeMonitors && this.props.activeMonitors.count ) / 10 ); @@ -212,7 +212,7 @@ class Monitors extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type 'Readon... Remove this comment to see the full error message + {this.state.monitors.map((monitor: $TSFixMe) => { const { monitorName, @@ -353,10 +353,10 @@ class Monitors extends Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + {this.props.activeMonitors && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - this.props.activeMonitors.requesting ? ( + + this.props.activeMonitors.requesting ? ( ) : null}
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + {this.props.activeMonitors && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - (!this.props.activeMonitors.monitors || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - !this.props.activeMonitors.monitors.length) && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - !this.props.activeMonitors.requesting && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - !this.props.activeMonitors.error + + (!this.props.activeMonitors.monitors || + + !this.props.activeMonitors.monitors.length) && + + !this.props.activeMonitors.requesting && + + !this.props.activeMonitors.error ? "We don't have any report for this period" : null} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + {this.props.activeMonitors && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - this.props.activeMonitors.error - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message + + this.props.activeMonitors.error + ? this.props.activeMonitors.error : null}
@@ -392,23 +392,19 @@ class Monitors extends Component { {numberOfPages > 0 - ? `Page ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.state.page - } of ${numberOfPages} (${this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - .activeMonitors && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - this.props.activeMonitors - .count} Monitor${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - this.props.activeMonitors && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeMonitors' does not exist on type '... Remove this comment to see the full error message - this.props.activeMonitors - .count === 1 - ? '' - : 's' - })` + ? `Page ${this.state.page + } of ${numberOfPages} (${this.props + + .activeMonitors && + + this.props.activeMonitors + .count} Monitor${this.props.activeMonitors && + + this.props.activeMonitors + .count === 1 + ? '' + : 's' + })` : null} @@ -474,10 +470,10 @@ const mapStateToProps = (state: $TSFixMe) => ({ const mapDispatchToProps = (dispatch: $TSFixMe) => ({ ...bindActionCreators(actionCreators, dispatch) }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Monitors.displayName = 'Monitors'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Monitors.propTypes = { getActiveMonitors: PropTypes.func, startDate: PropTypes.object, diff --git a/dashboard/src/components/reports/ResolveTime.tsx b/dashboard/src/components/reports/ResolveTime.tsx index 78c900becf..561fa912cb 100755 --- a/dashboard/src/components/reports/ResolveTime.tsx +++ b/dashboard/src/components/reports/ResolveTime.tsx @@ -27,15 +27,15 @@ class ResolveTime extends Component { componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getResolveTime' does not exist on type '... Remove this comment to see the full error message + getResolveTime, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type 'Readonly... Remove this comment to see the full error message + filter, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate, } = this.props; @@ -53,13 +53,13 @@ class ResolveTime extends Component { } = nextProps; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'filter' does not exist on type 'Readonly... Remove this comment to see the full error message + filter !== this.props.filter || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'startDate' does not exist on type 'Reado... Remove this comment to see the full error message + startDate !== this.props.startDate || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endDate' does not exist on type 'Readonl... Remove this comment to see the full error message + endDate !== this.props.endDate || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject !== this.props.currentProject ) { getResolveTime(currentProject, filter, startDate, endDate); @@ -73,17 +73,17 @@ class ResolveTime extends Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resolveTime' does not exist on type 'Rea... Remove this comment to see the full error message + const { resolveTime } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resolveTimeReports' does not exist on ty... Remove this comment to see the full error message + const { resolveTimeReports, filter } = this.props; const chartData: $TSFixMe = []; resolveTime.map((element: $TSFixMe) => { const value = {}; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resolveTime' does not exist on type '{}'... Remove this comment to see the full error message + value.resolveTime = element.averageResolved; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'date' does not exist on type '{}'. + value.date = element[filter]; chartData.push(value); return element; @@ -157,7 +157,7 @@ class ResolveTime extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ResolveTime.displayName = 'ResolveTime'; const actionCreators = { @@ -175,7 +175,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => ({ ...bindActionCreators(actionCreators, dispatch) }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ResolveTime.propTypes = { getResolveTime: PropTypes.func, filter: PropTypes.string, diff --git a/dashboard/src/components/schedule/DeleteBox.tsx b/dashboard/src/components/schedule/DeleteBox.tsx index 2bf704cf49..5409f1bfa5 100755 --- a/dashboard/src/components/schedule/DeleteBox.tsx +++ b/dashboard/src/components/schedule/DeleteBox.tsx @@ -1,9 +1,9 @@ -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { withRouter } from 'react-router-dom'; import { bindActionCreators } from 'redux'; import { FormLoader } from '../basic/Loader'; @@ -20,30 +20,30 @@ export class DeleteScheduleBox extends Component { handleClick = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + subProjectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteSchedule' does not exist on type '... Remove this comment to see the full error message + deleteSchedule, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduleId' does not exist on type 'Read... Remove this comment to see the full error message + scheduleId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'history' does not exist on type 'Readonl... Remove this comment to see the full error message + history, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'userId' does not exist on type 'Readonly... Remove this comment to see the full error message + userId, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteModalId' does not exist on type 'R... Remove this comment to see the full error message + const { deleteModalId } = this.state; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: deleteModalId, onConfirm: () => { return deleteSchedule(subProjectId, scheduleId).then(() => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchUserSchedule' does not exist on typ... Remove this comment to see the full error message + this.props.fetchUserSchedule(projectId, userId); history.push( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'slug' does not exist on type 'Readonly<{... Remove this comment to see the full error message + `/dashboard/project/${this.props.slug}/on-call` ); }); @@ -53,7 +53,7 @@ export class DeleteScheduleBox extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + const { isRequesting } = this.props; return ( @@ -98,7 +98,7 @@ export class DeleteScheduleBox extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + DeleteScheduleBox.displayName = 'DeleteScheduleBox'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( @@ -139,7 +139,7 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + DeleteScheduleBox.propTypes = { isRequesting: PropTypes.oneOf([null, undefined, true, false]), history: PropTypes.object.isRequired, diff --git a/dashboard/src/components/schedule/DeleteScheduleModal.tsx b/dashboard/src/components/schedule/DeleteScheduleModal.tsx index 4545d4b32d..72f4c33f26 100755 --- a/dashboard/src/components/schedule/DeleteScheduleModal.tsx +++ b/dashboard/src/components/schedule/DeleteScheduleModal.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import ClickOutside from 'react-click-outside'; import { Spinner } from '../basic/Loader'; import ShouldRender from '../basic/ShouldRender'; @@ -18,10 +18,10 @@ class DeleteScheduleModal extends Component { handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message + return this.props.closeThisDialog(); case 'Enter': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message + return this.props.confirmThisDialog(); default: return false; @@ -30,13 +30,13 @@ class DeleteScheduleModal extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + isRequesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message + error, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message + confirmThisDialog, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message + closeThisDialog, } = this.props; @@ -133,7 +133,7 @@ class DeleteScheduleModal extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + DeleteScheduleModal.displayName = 'DeleteScheduleModal'; const mapStateToProps = (state: $TSFixMe) => { @@ -149,7 +149,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + DeleteScheduleModal.propTypes = { isRequesting: PropTypes.bool, confirmThisDialog: PropTypes.func.isRequired, diff --git a/dashboard/src/components/schedule/EscalationSummary.tsx b/dashboard/src/components/schedule/EscalationSummary.tsx index ffbac5c59c..c17b0afa26 100644 --- a/dashboard/src/components/schedule/EscalationSummary.tsx +++ b/dashboard/src/components/schedule/EscalationSummary.tsx @@ -12,10 +12,10 @@ export class EscalationSummary extends Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onEditClicked' does not exist on type 'R... Remove this comment to see the full error message + const { onEditClicked, escalations, teamMembers, groups } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isLoading' does not exist on type 'Reado... Remove this comment to see the full error message + const { isLoading, error } = this.state; return (
@@ -97,7 +97,7 @@ export class EscalationSummary extends Component {
{escalation && escalation.activeTeam && ( - // @ts-expect-error ts-migrate(2741) FIXME: Property 'isNextActiveTeam' is missing in type '{ ... Remove this comment to see the full error message +
); @@ -166,13 +166,13 @@ const EscalationSummarySingle = ({
{data && data.rotationStartTime ? DateTime.format( - DateTime.convertToCurrentTimezone( - data.rotationStartTime, - // @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 2. - data.rotationTimezone - ), - 'ddd, Do MMM: hh:mm A' - ) + DateTime.convertToCurrentTimezone( + data.rotationStartTime, + + data.rotationTimezone + ), + 'ddd, Do MMM: hh:mm A' + ) : ''}
@@ -186,13 +186,13 @@ const EscalationSummarySingle = ({
{data && data.rotationEndTime ? DateTime.format( - DateTime.convertToCurrentTimezone( - data.rotationEndTime, - // @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 2. - data.rotationTimezone - ), - 'ddd, Do MMM: hh:mm A' - ) + DateTime.convertToCurrentTimezone( + data.rotationEndTime, + + data.rotationTimezone + ), + 'ddd, Do MMM: hh:mm A' + ) : ''}
@@ -212,193 +212,193 @@ const EscalationSummarySingle = ({ {((isNextActiveTeam && teamMembersOnPartialDutyCount > 0) || isActiveTeam) && ( -
- -
- {hasNextEscalationPolicy && isActiveTeam && ( - - If the current active team does not respond, - then the incident will be escalated to - Escalation Policy{' '} - {currentEscalationPolicyCount + 1}
-
-
- )} - {teamMembers && - teamMembers.filter((member: $TSFixMe) => { - return ( - member.startTime && - member.startTime !== '' && - member.endTime && - member.endTime !== '' - ); - }).length > 0 && ( +
+ +
+ {hasNextEscalationPolicy && isActiveTeam && ( - {' '} - Team Members:
-
{' '} + If the current active team does not respond, + then the incident will be escalated to + Escalation Policy{' '} + {currentEscalationPolicyCount + 1}
+
)} - {teamMembers && - teamMembers - .filter((member: $TSFixMe) => { + {teamMembers && + teamMembers.filter((member: $TSFixMe) => { return ( member.startTime && member.startTime !== '' && member.endTime && member.endTime !== '' ); - }) - .map((member: $TSFixMe) => { - let membersFromList = teamMemberList - .concat(groupList || []) - .filter((memberFromList: $TSFixMe) => { - return ( - memberFromList.userId === - member.userId || - memberFromList._id === - member.groupId - ); - }); - - if (membersFromList.length > 0) { - membersFromList = membersFromList[0]; - } - - return ( -
- - - {membersFromList.name || - membersFromList.email} - - - {' '} -
-
Will only be active from{' '} - {moment( - moment( - member.startTime - ).format('HH:mm'), - 'HH:mm' - ).format('hh:mm A')}{' '} - and{' '} - {moment( - moment( - member.endTime - ).format('HH:mm'), - 'HH:mm' - ).format('hh:mm A')}{' '} - everyday.
-
-
- {isActiveTeam && ( - <> - - Important: If - there's no team - member on-duty when this - member is not on-duty - the incident is at the - risk of being{' '} - {hasNextEscalationPolicy - ? 'escalated' - : 'ignored'} - .

-
- - )} -
- ); - })} - {isActiveTeam && ( - <> -
-

- Reminders: - {escalation.call && ( - - {escalation.callReminders} Call - reminders - - )}{' '} - {escalation.call && escalation.sms && ( - , - )}{' '} - {escalation.sms && ( - - {escalation.smsReminders} SMS - reminders - - )}{' '} - {(escalation.sms || escalation.call) && - escalation.email && ( - , - )}{' '} - {escalation.email && ( - - {escalation.emailReminders}{' '} - Email reminders - - )}{' '} - {(escalation.sms || - escalation.call || - escalation.email) && ( - , - )}{' '} - {escalation.push && ( - - {escalation.pushReminders} Push - Notification reminders - - )}{' '} - - {' '} - will be sent to each member of this - team if they do not respond.
-
-

-
- {hasNextEscalationPolicy && ( - -
- Information: If they do not - respond. The inident will be escalated - to escalation policy{' '} - {currentEscalationPolicyCount + 1}{' '} -
-
- )} - {!hasNextEscalationPolicy && ( + }).length > 0 && ( {' '} -
- - Alert:{' '} - - If they do not respond. Then the - incident is at the risk of being - ignored.
+ Team Members:
+
{' '}
)} - - )} + {teamMembers && + teamMembers + .filter((member: $TSFixMe) => { + return ( + member.startTime && + member.startTime !== '' && + member.endTime && + member.endTime !== '' + ); + }) + .map((member: $TSFixMe) => { + let membersFromList = teamMemberList + .concat(groupList || []) + .filter((memberFromList: $TSFixMe) => { + return ( + memberFromList.userId === + member.userId || + memberFromList._id === + member.groupId + ); + }); + + if (membersFromList.length > 0) { + membersFromList = membersFromList[0]; + } + + return ( +
+ + + {membersFromList.name || + membersFromList.email} + + + {' '} +
+
Will only be active from{' '} + {moment( + moment( + member.startTime + ).format('HH:mm'), + 'HH:mm' + ).format('hh:mm A')}{' '} + and{' '} + {moment( + moment( + member.endTime + ).format('HH:mm'), + 'HH:mm' + ).format('hh:mm A')}{' '} + everyday.
+
+
+ {isActiveTeam && ( + <> + + Important: If + there's no team + member on-duty when this + member is not on-duty + the incident is at the + risk of being{' '} + {hasNextEscalationPolicy + ? 'escalated' + : 'ignored'} + .

+
+ + )} +
+ ); + })} + {isActiveTeam && ( + <> +
+

+ Reminders: + {escalation.call && ( + + {escalation.callReminders} Call + reminders + + )}{' '} + {escalation.call && escalation.sms && ( + , + )}{' '} + {escalation.sms && ( + + {escalation.smsReminders} SMS + reminders + + )}{' '} + {(escalation.sms || escalation.call) && + escalation.email && ( + , + )}{' '} + {escalation.email && ( + + {escalation.emailReminders}{' '} + Email reminders + + )}{' '} + {(escalation.sms || + escalation.call || + escalation.email) && ( + , + )}{' '} + {escalation.push && ( + + {escalation.pushReminders} Push + Notification reminders + + )}{' '} + + {' '} + will be sent to each member of this + team if they do not respond.
+
+

+
+ {hasNextEscalationPolicy && ( + +
+ Information: If they do not + respond. The inident will be escalated + to escalation policy{' '} + {currentEscalationPolicyCount + 1}{' '} +
+
+ )} + {!hasNextEscalationPolicy && ( + + {' '} +
+ + Alert:{' '} + + If they do not respond. Then the + incident is at the risk of being + ignored.
+
+ )} + + )} +
-
- )} + )} ; }; diff --git a/dashboard/src/components/schedule/EscalationsList.tsx b/dashboard/src/components/schedule/EscalationsList.tsx index f0a4558510..e093133f75 100644 --- a/dashboard/src/components/schedule/EscalationsList.tsx +++ b/dashboard/src/components/schedule/EscalationsList.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(2307) FIXME: Cannot find module './EscalationSingle' or its cor... Remove this comment to see the full error message + import { EscalationSingle } from './EscalationSingle'; const EscalationsList = ({ diff --git a/dashboard/src/components/schedule/MonitorBox.tsx b/dashboard/src/components/schedule/MonitorBox.tsx index f5d10618e2..596912b77d 100755 --- a/dashboard/src/components/schedule/MonitorBox.tsx +++ b/dashboard/src/components/schedule/MonitorBox.tsx @@ -2,13 +2,13 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { withRouter, Link } from 'react-router-dom'; import MonitorInputs from './MonitorInputs'; import { FormLoader, Spinner } from '../basic/Loader'; import ShouldRender from '../basic/ShouldRender'; import { addMonitors } from '../../actions/schedule'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field, reduxForm } from 'redux-form'; import RenderIfSubProjectAdmin from '../basic/RenderIfSubProjectAdmin'; import IsAdminSubProject from '../basic/IsAdminSubProject'; @@ -111,7 +111,7 @@ export const MonitorBox = (props: $TSFixMe) => { Schedule Monitors - // @ts-expect-error ts-migrate(2322) FIXME: Type '{children: Element; title: string; }' is no... Remove this comment to see the full error message +

@@ -358,12 +358,12 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { }: $TSFixMe) => _id); monitorIds.forEach((_id: $TSFixMe) => { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[_id] = scheduleMonitorIds.includes(_id); }); } if (schedule) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isDefault' does not exist on type '{}'. + initialValues.isDefault = schedule.isDefault; } diff --git a/dashboard/src/components/schedule/MonitorInputs.tsx b/dashboard/src/components/schedule/MonitorInputs.tsx index f35ef7aa99..0be25f9fe2 100755 --- a/dashboard/src/components/schedule/MonitorInputs.tsx +++ b/dashboard/src/components/schedule/MonitorInputs.tsx @@ -1,5 +1,5 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field } from 'redux-form'; import IsAdminSubProject from '../basic/IsAdminSubProject'; import IsOwnerSubProject from '../basic/IsOwnerSubProject'; @@ -15,161 +15,161 @@ function MonitorInputs({ const monitorItems = currentProject._id === subProject._id ? monitors.map((monitor: $TSFixMe, index: $TSFixMe) => { - // calculate how many up criteria, degraded criteria and down criteria - // are using the schedule + // calculate how many up criteria, degraded criteria and down criteria + // are using the schedule - const criteriaUsingSchedule: $TSFixMe = []; + const criteriaUsingSchedule: $TSFixMe = []; - if (schedule && monitor.criteria) { - [ - ...(monitor.criteria.up ? monitor.criteria.up : []), - ...(monitor.criteria.degraded - ? monitor.criteria.degraded - : []), - ...(monitor.criteria.down - ? monitor.criteria.down - : []), - ].forEach((criterion, index) => { - const monitorUpCriteriaCount = - monitor.criteria.up?.length || 0; - const monitorDegradedCriteriaCount = - monitor.criteria.degraded?.length || 0; - const type = - index < monitorUpCriteriaCount - ? 'Up' - : index < + if (schedule && monitor.criteria) { + [ + ...(monitor.criteria.up ? monitor.criteria.up : []), + ...(monitor.criteria.degraded + ? monitor.criteria.degraded + : []), + ...(monitor.criteria.down + ? monitor.criteria.down + : []), + ].forEach((criterion, index) => { + const monitorUpCriteriaCount = + monitor.criteria.up?.length || 0; + const monitorDegradedCriteriaCount = + monitor.criteria.degraded?.length || 0; + const type = + index < monitorUpCriteriaCount + ? 'Up' + : index < monitorUpCriteriaCount + - monitorDegradedCriteriaCount - ? 'Degraded' - : 'Down'; + monitorDegradedCriteriaCount + ? 'Degraded' + : 'Down'; - if (criterion.scheduleIds.includes(schedule._id)) { - criteriaUsingSchedule.push({ - id: criterion.id, - name: criterion.default - ? 'Default Criterion' - : `${criterion.name || - 'Unnamed Criterion'} (${type})`, - }); - } - }); - } + if (criterion.scheduleIds.includes(schedule._id)) { + criteriaUsingSchedule.push({ + id: criterion.id, + name: criterion.default + ? 'Default Criterion' + : `${criterion.name || + 'Unnamed Criterion'} (${type})`, + }); + } + }); + } - return ( -

-
- -
-
-
-
-
-
-
-
-
-
    - {criteriaUsingSchedule.map( - // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'criterion' implicitly has an 'any' type... Remove this comment to see the full error message - (criterion, index) => { - return ( -
  • - - {criterion.name} - -
  • - ); - } - )} -
-
-
- ); - }) + return ( +
+
+ +
+
+
+
+
+
+
+
+
+
    + {criteriaUsingSchedule.map( + + (criterion, index) => { + return ( +
  • + + {criterion.name} + +
  • + ); + } + )} +
+
+
+ ); + }) : monitors.map((monitor: $TSFixMe, index: $TSFixMe) => { - return monitor.projectId === subProject._id || - monitor.projectId._id === subProject._id ? ( -
-
- -
-
-
-
-
-
-
-
-
- ) : ( - false - ); - }); + return monitor.projectId === subProject._id || + monitor.projectId._id === subProject._id ? ( +
+
+ +
+
+
+
+
+
+
+
+
+ ) : ( + false + ); + }); const allMonitorList = monitorItems.filter((monitor: $TSFixMe) => monitor); return allMonitorList.length > 0 ? allMonitorList diff --git a/dashboard/src/components/schedule/OnCallAlertBox.tsx b/dashboard/src/components/schedule/OnCallAlertBox.tsx index 2b75c55a8a..23ec648843 100755 --- a/dashboard/src/components/schedule/OnCallAlertBox.tsx +++ b/dashboard/src/components/schedule/OnCallAlertBox.tsx @@ -1,9 +1,9 @@ import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { reduxForm, FieldArray, arrayPush } from 'redux-form'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { withRouter } from 'react-router-dom'; import { getEscalation, addEscalation } from '../../actions/schedule'; import { getProjectGroups } from '../../actions/group'; @@ -25,71 +25,71 @@ function validate(values: $TSFixMe) { const escalationArrayErrors: $TSFixMe = []; if (values.OnCallAlertBox[i]) { if (values.OnCallAlertBox[i].callReminders === '') { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callReminders' does not exist on type '{... Remove this comment to see the full error message + repeatErrors.callReminders = 'Please enter how many reminders to send'; alertArrayErrors[i] = repeatErrors; } else if ( !Validate.number(values.OnCallAlertBox[i].callReminders) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callReminders' does not exist on type '{... Remove this comment to see the full error message + repeatErrors.callReminders = 'This should be a number.'; alertArrayErrors[i] = repeatErrors; } else if (values.OnCallAlertBox[i].callReminders <= 0) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'callReminders' does not exist on type '{... Remove this comment to see the full error message + repeatErrors.callReminders = 'This should be greater than 0.'; alertArrayErrors[i] = repeatErrors; } if (values.OnCallAlertBox[i].smsReminders === '') { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'smsReminders' does not exist on type '{}... Remove this comment to see the full error message + repeatErrors.smsReminders = 'Please enter how many reminders to send'; alertArrayErrors[i] = repeatErrors; } else if ( !Validate.number(values.OnCallAlertBox[i].smsReminders) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'smsReminders' does not exist on type '{}... Remove this comment to see the full error message + repeatErrors.smsReminders = 'This should be a number.'; alertArrayErrors[i] = repeatErrors; } else if (values.OnCallAlertBox[i].smsReminders <= 0) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'smsReminders' does not exist on type '{}... Remove this comment to see the full error message + repeatErrors.smsReminders = 'This should be greater than 0'; alertArrayErrors[i] = repeatErrors; } if (values.OnCallAlertBox[i].emailReminders === '') { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'emailReminders' does not exist on type '... Remove this comment to see the full error message + repeatErrors.emailReminders = 'Please enter how many reminders to send.'; alertArrayErrors[i] = repeatErrors; } else if ( !Validate.number(values.OnCallAlertBox[i].emailReminders) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'emailReminders' does not exist on type '... Remove this comment to see the full error message + repeatErrors.emailReminders = 'This should be a number.'; alertArrayErrors[i] = repeatErrors; } else if (values.OnCallAlertBox[i].emailReminders <= 0) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'emailReminders' does not exist on type '... Remove this comment to see the full error message + repeatErrors.emailReminders = 'This should be greater than 0'; alertArrayErrors[i] = repeatErrors; } if (values.OnCallAlertBox[i].pushReminders === '') { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pushReminders' does not exist on type '{... Remove this comment to see the full error message + repeatErrors.pushReminders = 'Please enter how many reminders to send.'; alertArrayErrors[i] = repeatErrors; } else if ( !Validate.number(values.OnCallAlertBox[i].pushReminders) ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pushReminders' does not exist on type '{... Remove this comment to see the full error message + repeatErrors.pushReminders = 'This should be a number.'; alertArrayErrors[i] = repeatErrors; } else if (values.OnCallAlertBox[i].pushReminders <= 0) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pushReminders' does not exist on type '{... Remove this comment to see the full error message + repeatErrors.pushReminders = 'This should be greater than 0'; alertArrayErrors[i] = repeatErrors; @@ -104,19 +104,19 @@ function validate(values: $TSFixMe) { val.teamMembers[0] && val.teamMembers[0].userId === '' ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'userId' does not exist on type '{}'. + escalationErrors.userId = 'Please select a member.'; escalationArrayErrors[j] = escalationErrors; } } }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'escalation' does not exist on type '{}'. + repeatErrors.escalation = escalationArrayErrors; alertArrayErrors[i] = repeatErrors; } if (alertArrayErrors.length) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'OnCallAlertBox' does not exist on type '... Remove this comment to see the full error message + errors.OnCallAlertBox = alertArrayErrors; } } @@ -127,15 +127,15 @@ function validate(values: $TSFixMe) { export class OnCallAlertBox extends Component { componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + subProjectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getProjectGroups' does not exist on type... Remove this comment to see the full error message + getProjectGroups, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectTeamLoading' does not exist on... Remove this comment to see the full error message + subProjectTeamLoading, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduleId' does not exist on type 'Read... Remove this comment to see the full error message + scheduleId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getEscalation' does not exist on type 'R... Remove this comment to see the full error message + getEscalation, } = this.props; if (subProjectId) { @@ -148,21 +148,21 @@ export class OnCallAlertBox extends Component { } componentDidUpdate(prevProps: $TSFixMe) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + prevProps.subProjectId !== this.props.subProjectId || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'schedule' does not exist on type 'Readon... Remove this comment to see the full error message + prevProps.schedule !== this.props.schedule ) { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + subProjectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getProjectGroups' does not exist on type... Remove this comment to see the full error message + getProjectGroups, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectTeamLoading' does not exist on... Remove this comment to see the full error message + subProjectTeamLoading, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduleId' does not exist on type 'Read... Remove this comment to see the full error message + scheduleId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getEscalation' does not exist on type 'R... Remove this comment to see the full error message + getEscalation, } = this.props; if (subProjectId) { @@ -175,11 +175,11 @@ export class OnCallAlertBox extends Component { } } submitForm = async (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + const { subProjectId, scheduleId } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'addEscalation' does not exist on type 'R... Remove this comment to see the full error message + await this.props.addEscalation(subProjectId, scheduleId, values); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'afterSave' does not exist on type 'Reado... Remove this comment to see the full error message + if (this.props.afterSave) this.props.afterSave(); }; @@ -188,7 +188,7 @@ export class OnCallAlertBox extends Component { type="button" className="bs-Button bs-FileUploadButton bs-Button--icon bs-Button--new" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pushArray' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.pushArray('OnCallAlertBox', 'OnCallAlertBox', { callReminders: 3, smsReminders: 3, @@ -215,7 +215,7 @@ export class OnCallAlertBox extends Component { ); render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message + const { handleSubmit } = this.props; return ( @@ -257,7 +257,7 @@ export class OnCallAlertBox extends Component { name="OnCallAlertBox" component={RenderEscalation} subProjectId={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + this.props.subProjectId } /> @@ -274,7 +274,7 @@ export class OnCallAlertBox extends Component { > { this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'escalationPolicy' does not exist on type... Remove this comment to see the full error message + .escalationPolicy .error } @@ -302,16 +302,16 @@ export class OnCallAlertBox extends Component { id="saveSchedulePolicy" className="bs-Button bs-DeprecatedButton bs-Button--blue" disabled={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'escalationPolicy' does not exist on type... Remove this comment to see the full error message + this.props.escalationPolicy .requesting } type="submit" > - // @ts-expect-error ts-migrate(2339) FIXME: Property 'escalationPolicy' does not exist on type... Remove this comment to see the full error message + {!this.props.escalationPolicy .requesting && Save} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'escalationPolicy' does not exist on type... Remove this comment to see the full error message + {this.props.escalationPolicy .requesting && } @@ -325,10 +325,10 @@ export class OnCallAlertBox extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + OnCallAlertBox.displayName = 'OnCallAlertBox'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + OnCallAlertBox.propTypes = { getEscalation: PropTypes.func.isRequired, afterSave: PropTypes.func.isRequired, @@ -368,29 +368,29 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { escalations && escalations.length > 0 ? escalations : [ - { - callReminders: '3', - smsReminders: '3', - emailReminders: '3', - pushReminders: '3', - email: true, - sms: false, - call: false, - push: false, - teams: [ - { - teamMembers: [ - { - member: '', - timezone: '', - startTime: '', - endTime: '', - }, - ], - }, - ], - }, - ]; + { + callReminders: '3', + smsReminders: '3', + emailReminders: '3', + pushReminders: '3', + email: true, + sms: false, + call: false, + push: false, + teams: [ + { + teamMembers: [ + { + member: '', + timezone: '', + startTime: '', + endTime: '', + }, + ], + }, + ], + }, + ]; let schedule = state.schedule.subProjectSchedules.map( (subProjectSchedule: $TSFixMe) => { return subProjectSchedule.schedules.find( diff --git a/dashboard/src/components/schedule/RenameScheduleBox.tsx b/dashboard/src/components/schedule/RenameScheduleBox.tsx index ba41596e8c..91343bc5eb 100755 --- a/dashboard/src/components/schedule/RenameScheduleBox.tsx +++ b/dashboard/src/components/schedule/RenameScheduleBox.tsx @@ -1,14 +1,14 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Validate } from '../../config'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { withRouter } from 'react-router-dom'; import { bindActionCreators } from 'redux'; import { FormLoader } from '../basic/Loader'; import ShouldRender from '../basic/ShouldRender'; import { RenderField } from '../basic/RenderField'; import { history } from '../../store'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { reduxForm, Field, reset } from 'redux-form'; import { renameSchedule } from '../../actions/schedule'; import PropTypes from 'prop-types'; @@ -19,7 +19,7 @@ function validate(value: $TSFixMe) { const errors = {}; if (!Validate.text(value.schedule_name)) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'. + errors.name = 'Duty name is required.'; } @@ -28,7 +28,7 @@ function validate(value: $TSFixMe) { export class RenameScheduleBox extends Component { submitForm = (values: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduleId' does not exist on type 'Read... Remove this comment to see the full error message + const { scheduleId, renameSchedule, subProjectId } = this.props; const scheduleName = values.schedule_name; @@ -37,7 +37,7 @@ export class RenameScheduleBox extends Component { renameSchedule(subProjectId, scheduleId, scheduleName).then( (data: $TSFixMe) => { history.replace( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProjectSlug' does not exist on ty... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProjectSlug}/schedule/${data.data[0].slug}` ); } @@ -71,7 +71,7 @@ export class RenameScheduleBox extends Component {
@@ -97,7 +97,7 @@ export class RenameScheduleBox extends Component { required="required" disabled={ this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + .isRequesting } /> @@ -105,16 +105,16 @@ export class RenameScheduleBox extends Component { @@ -134,13 +134,13 @@ export class RenameScheduleBox extends Component { type="submit" > Save @@ -157,7 +157,7 @@ export class RenameScheduleBox extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + RenameScheduleBox.displayName = 'RenameScheduleBox'; const formName = 'RenameSchedule' + Math.floor(Math.random() * 10 + 1); @@ -201,7 +201,7 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + RenameScheduleBox.propTypes = { scheduleId: PropTypes.string, subProjectId: PropTypes.string, diff --git a/dashboard/src/components/schedule/RenderEscalation.tsx b/dashboard/src/components/schedule/RenderEscalation.tsx index 9896db80de..c456827dc1 100755 --- a/dashboard/src/components/schedule/RenderEscalation.tsx +++ b/dashboard/src/components/schedule/RenderEscalation.tsx @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { formValueSelector } from 'redux-form'; import { connect } from 'react-redux'; import ShouldRender from '../basic/ShouldRender'; @@ -61,12 +61,12 @@ let RenderEscalation = ({ ); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type '({ ... Remove this comment to see the full error message + RenderEscalation.displayName = 'RenderEscalation'; const selector = formValueSelector('OnCallAlertBox'); -// @ts-expect-error ts-migrate(2322) FIXME: Type 'ConnectedComponent<({ fields, meta: { error,... Remove this comment to see the full error message + RenderEscalation = connect(state => { const form = selector(state, 'OnCallAlertBox'); return { @@ -74,7 +74,7 @@ RenderEscalation = connect(state => { }; })(RenderEscalation); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type '({ fi... Remove this comment to see the full error message + RenderEscalation.propTypes = { subProjectId: PropTypes.string.isRequired, meta: PropTypes.object.isRequired, diff --git a/dashboard/src/components/schedule/RenderMember.tsx b/dashboard/src/components/schedule/RenderMember.tsx index 9b47d845fd..ba3bd6f4f4 100644 --- a/dashboard/src/components/schedule/RenderMember.tsx +++ b/dashboard/src/components/schedule/RenderMember.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { Field } from 'redux-form'; import ShouldRender from '../basic/ShouldRender'; import TeamMemberSelector from '../basic/TeamMemberSelector'; @@ -9,11 +9,11 @@ import Tooltip from '../basic/Tooltip'; import PricingPlan from '../basic/PricingPlan'; import moment from 'moment-timezone'; import { RenderSelect } from '../basic/RenderSelect'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { change } from 'redux-form'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { formValueSelector } from 'redux-form'; let RenderMember = ({ @@ -93,17 +93,16 @@ let RenderMember = ({
- // @ts-expect-error ts-migrate(2322) FIXME: Type '{ children: Element; title: string; }' is no... Remove this comment to see the full error message +

Team member who will be on-call duty.

@@ -180,7 +178,7 @@ let RenderMember = ({ } id="addOnCallDutyTimes" > - // @ts-expect-error ts-migrate(2747) FIXME: 'PricingPlan' components don't accept text as chil... Remove this comment to see the full error message + Advanced: Add on-call duty times @@ -205,7 +203,7 @@ let RenderMember = ({ placeholder="10pm" style={{ width: '250px' }} /> - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ children: Element; title: string; }' is no... Remove this comment to see the full error message +

@@ -253,7 +251,7 @@ let RenderMember = ({ placeholder="11pm" style={{ width: '250px' }} /> - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ children: Element; title: string; }' is no... Remove this comment to see the full error message +

@@ -324,7 +322,7 @@ let RenderMember = ({ ); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type '({ ... Remove this comment to see the full error message + RenderMember.displayName = 'RenderMember'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -342,7 +340,7 @@ function mapStateToProps(state: $TSFixMe) { formValues, }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type '({ me... Remove this comment to see the full error message + RenderMember.propTypes = { subProjectId: PropTypes.string.isRequired, fields: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, @@ -357,6 +355,6 @@ RenderMember.propTypes = { formValues: PropTypes.object, }; -// @ts-expect-error ts-migrate(2322) FIXME: Type 'ConnectedComponent<({ memberValue, inputarra... Remove this comment to see the full error message + RenderMember = connect(mapStateToProps, mapDispatchToProps)(RenderMember); export { RenderMember }; diff --git a/dashboard/src/components/schedule/RenderMembers.tsx b/dashboard/src/components/schedule/RenderMembers.tsx index f3cf873fd1..995e26b36c 100755 --- a/dashboard/src/components/schedule/RenderMembers.tsx +++ b/dashboard/src/components/schedule/RenderMembers.tsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message + import { formValueSelector } from 'redux-form'; import ShouldRender from '../basic/ShouldRender'; import { RenderMember } from './RenderMember'; @@ -79,10 +79,10 @@ let RenderMembers = ({ ); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type '({ ... Remove this comment to see the full error message + RenderMembers.displayName = 'RenderMembers'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type '({ fi... Remove this comment to see the full error message + RenderMembers.propTypes = { subProjectId: PropTypes.string.isRequired, meta: PropTypes.object.isRequired, @@ -101,7 +101,7 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2322) FIXME: Type 'ConnectedComponent<({ fields, meta: { error,... Remove this comment to see the full error message + RenderMembers = connect(mapStateToProps)(RenderMembers); export { RenderMembers }; diff --git a/dashboard/src/components/schedule/RenderRotationFrequency.tsx b/dashboard/src/components/schedule/RenderRotationFrequency.tsx index ebdf459637..630f885b8c 100644 --- a/dashboard/src/components/schedule/RenderRotationFrequency.tsx +++ b/dashboard/src/components/schedule/RenderRotationFrequency.tsx @@ -14,15 +14,15 @@ const RenderRotationFrequency = ({ id }: $TSFixMe) => { const filteredOpt = useRef(); - // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'opt' implicitly has an 'any' type. + filteredOpt.current = options.filter(opt => opt.value === input.value); const [value, setValue] = useState({ value: input.value, label: - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + filteredOpt.current.length > 0 - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + ? filteredOpt.current[0].label : placeholder, }); @@ -31,9 +31,9 @@ const RenderRotationFrequency = ({ setValue({ value: input.value, label: - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + filteredOpt.current.length > 0 - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + ? filteredOpt.current[0].label : placeholder, }); @@ -51,7 +51,7 @@ const RenderRotationFrequency = ({

- - -
-
-
+
+
+
+ {incomingRequest.url} +
+
+
+ +
+
+
+ + + +
-
- ); - }); + ); + }); }; render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + isRequesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'limit' does not exist on type 'Readonly<... Remove this comment to see the full error message + limit, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message + count, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message + skip, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchError' does not exist on type 'Read... Remove this comment to see the full error message + fetchError, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incomingRequestList' does not exist on t... Remove this comment to see the full error message + incomingRequestList, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, } = this.props; const footerBorderTopStyle = { margin: 0, padding: 0 }; @@ -349,8 +349,8 @@ class IncomingRequestList extends React.Component { {(!incomingRequestList || incomingRequestList.length === 0) && - !isRequesting && - !fetchError + !isRequesting && + !fetchError ? 'You have no incoming request' : null} {fetchError ? fetchError : null} @@ -369,24 +369,17 @@ class IncomingRequestList extends React.Component { className="Text-color--inherit Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap" > {numberOfPages > 0 - ? `Page ${ - this.state.page - } of ${numberOfPages} (${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - this.props.count - } Request${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - this.props.count === 1 - ? '' - : 's' - })` - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - : `${this.props.count} Request${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message - this.props.count === 1 - ? '' - : 's' - }`} + ? `Page ${this.state.page + } of ${numberOfPages} (${this.props.count + } Request${this.props.count === 1 + ? '' + : 's' + })` + + : `${this.props.count} Request${this.props.count === 1 + ? '' + : 's' + }`} @@ -452,7 +445,7 @@ class IncomingRequestList extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + IncomingRequestList.displayName = 'IncomingRequestList'; const mapStateToProps = (state: $TSFixMe) => { @@ -486,7 +479,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( dispatch ); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + IncomingRequestList.propTypes = { projectId: PropTypes.string, isRequesting: PropTypes.bool, diff --git a/dashboard/src/components/webHooks/MSTeamsBox.tsx b/dashboard/src/components/webHooks/MSTeamsBox.tsx index 62c4c0bd07..7a794953ac 100644 --- a/dashboard/src/components/webHooks/MSTeamsBox.tsx +++ b/dashboard/src/components/webHooks/MSTeamsBox.tsx @@ -1,5 +1,5 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { withRouter } from 'react-router-dom'; import PropTypes from 'prop-types'; import MSTeamsList from './MSTeamsList'; @@ -46,9 +46,9 @@ class MSTeamsBox extends React.Component {
@@ -57,7 +57,7 @@ class MSTeamsBox extends React.Component {
- // @ts-expect-error ts-migrate(2322) FIXME: Type '{ monitorId: any; }' is not assignable to ty... Remove this comment to see the full error message +
@@ -68,10 +68,10 @@ class MSTeamsBox extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + MSTeamsBox.displayName = 'MSTeamsBox'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + MSTeamsBox.propTypes = { monitorId: PropTypes.string, }; diff --git a/dashboard/src/components/webHooks/MSTeamsButton.tsx b/dashboard/src/components/webHooks/MSTeamsButton.tsx index b3849aa2fe..bbf856c6ae 100644 --- a/dashboard/src/components/webHooks/MSTeamsButton.tsx +++ b/dashboard/src/components/webHooks/MSTeamsButton.tsx @@ -8,7 +8,7 @@ import DataPathHoC from '../DataPathHoC'; class MSTeamsButton extends React.Component { render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + const { monitorId } = this.props; return ( @@ -17,7 +17,7 @@ class MSTeamsButton extends React.Component { type="button" id="addMsTeamsButton" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: 'data._id', onClose: () => '', @@ -40,7 +40,7 @@ class MSTeamsButton extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + MSTeamsButton.displayName = 'WebHookButton'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( @@ -55,7 +55,7 @@ const mapStateToProps = (state: $TSFixMe) => ({ currentProject: state.project.currentProject }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + MSTeamsButton.propTypes = { openModal: PropTypes.func.isRequired, monitorId: PropTypes.string, diff --git a/dashboard/src/components/webHooks/MSTeamsItem.tsx b/dashboard/src/components/webHooks/MSTeamsItem.tsx index 1eff4ac163..6856d4be13 100644 --- a/dashboard/src/components/webHooks/MSTeamsItem.tsx +++ b/dashboard/src/components/webHooks/MSTeamsItem.tsx @@ -12,17 +12,17 @@ import DataPathHoC from '../DataPathHoC'; class MSTeamsItem extends React.Component { deleteItem = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type 'Readon... Remove this comment to see the full error message + monitors, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + data, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteMsTeams' does not exist on type 'R... Remove this comment to see the full error message + deleteMsTeams, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateMsTeams' does not exist on type 'R... Remove this comment to see the full error message + updateMsTeams, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, } = this.props; @@ -33,32 +33,32 @@ class MSTeamsItem extends React.Component { const newMonitors = monitors .filter((monitor: $TSFixMe) => monitor.monitorId._id !== monitorId) .map((monitor: $TSFixMe) => ({ - monitorId: monitor.monitorId._id - })); + monitorId: monitor.monitorId._id + })); if (newMonitors.length > 0) { const postObj = {}; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endpoint' does not exist on type '{}'. + postObj.endpoint = data && data.data.endpoint; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'webHookName' does not exist on type '{}'... Remove this comment to see the full error message + postObj.webHookName = data && data.webHookName; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + postObj.monitors = newMonitors; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + postObj.type = 'msteams'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endpointType' does not exist on type '{}... Remove this comment to see the full error message + postObj.endpointType = data && data.data.endpointType; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCreated' does not exist on type ... Remove this comment to see the full error message + postObj.incidentCreated = data && data.notificationOptions.incidentCreated; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentResolved' does not exist on type... Remove this comment to see the full error message + postObj.incidentResolved = data && data.notificationOptions.incidentResolved; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentAcknowledged' does not exist on ... Remove this comment to see the full error message + postObj.incidentAcknowledged = data && data.notificationOptions.incidentAcknowledged; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentNoteAdded' does not exist on typ... Remove this comment to see the full error message + postObj.incidentNoteAdded = data && data.notificationOptions.incidentNoteAdded; @@ -83,16 +83,15 @@ class MSTeamsItem extends React.Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { data, monitorId, webhooks, monitors } = this.props; const { webHookName } = data.data; let deleting = false; const monitorName = monitors && monitors[0].monitorId.name; const monitorTitle = monitors && monitors.length > 1 - ? `${monitorName} and ${monitors?.length - 1} other${ - monitors?.length - 1 === 1 ? '' : 's' - }` + ? `${monitorName} and ${monitors?.length - 1} other${monitors?.length - 1 === 1 ? '' : 's' + }` : monitorName; if ( @@ -156,7 +155,7 @@ class MSTeamsItem extends React.Component { className="bs-Button bs-DeprecatedButton" type="button" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: data._id, onClose: () => '', @@ -177,7 +176,7 @@ class MSTeamsItem extends React.Component { className="bs-Button bs-DeprecatedButton" type="button" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: data._id, onClose: () => '', @@ -202,7 +201,7 @@ class MSTeamsItem extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + MSTeamsItem.displayName = 'WebHookInput'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( @@ -221,7 +220,7 @@ const mapStateToProps = (state: $TSFixMe) => ({ currentProject: state.project.currentProject }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + MSTeamsItem.propTypes = { currentProject: PropTypes.object.isRequired, deleteMsTeams: PropTypes.func.isRequired, diff --git a/dashboard/src/components/webHooks/MSTeamsList.tsx b/dashboard/src/components/webHooks/MSTeamsList.tsx index 035123bd8a..aeaeab05b8 100644 --- a/dashboard/src/components/webHooks/MSTeamsList.tsx +++ b/dashboard/src/components/webHooks/MSTeamsList.tsx @@ -16,9 +16,9 @@ import { User } from '../../config'; class MSTeamsList extends React.Component { ready() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getMsTeamsMonitor' does not exist on typ... Remove this comment to see the full error message + const { getMsTeamsMonitor, monitorId, getMsTeams } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const { projectId } = this.props; if (monitorId) { @@ -33,7 +33,7 @@ class MSTeamsList extends React.Component { } componentWillUnmount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.paginate('reset'); } @@ -50,17 +50,17 @@ class MSTeamsList extends React.Component { prevClicked = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'msTeams' does not exist on type 'Readonl... Remove this comment to see the full error message + msTeams: { skip, limit }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + paginate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getMsTeamsMonitor' does not exist on typ... Remove this comment to see the full error message + getMsTeamsMonitor, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getMsTeams' does not exist on type 'Read... Remove this comment to see the full error message + getMsTeams, } = this.props; @@ -83,17 +83,17 @@ class MSTeamsList extends React.Component { nextClicked = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'msTeams' does not exist on type 'Readonl... Remove this comment to see the full error message + msTeams: { skip, limit }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getMsTeamsMonitor' does not exist on typ... Remove this comment to see the full error message + getMsTeamsMonitor, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + paginate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getMsTeams' does not exist on type 'Read... Remove this comment to see the full error message + getMsTeams, } = this.props; @@ -106,7 +106,7 @@ class MSTeamsList extends React.Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'msTeams' does not exist on type 'Readonl... Remove this comment to see the full error message + const { msTeams, isRequesting, monitorId } = this.props; const { count, skip, limit } = msTeams; let { msTeams: webHooks } = msTeams; @@ -149,14 +149,14 @@ class MSTeamsList extends React.Component { 0}> {(webHooks ? webHooks : []).map((hook: $TSFixMe) => {numberOfPages > 0 - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pages' does not exist on type 'Readonly<... Remove this comment to see the full error message + ? `Page ${this.props.pages && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pages' does not exist on type 'Readonly<... Remove this comment to see the full error message - this.props.pages - .counter} of ${numberOfPages} (${count} MS Team${ - count === 1 ? '' : 's' - })` - : `${count} MS Team${ - count === 1 ? '' : 's' - }`} + + this.props.pages + .counter} of ${numberOfPages} (${count} MS Team${count === 1 ? '' : 's' + })` + : `${count} MS Team${count === 1 ? '' : 's' + }`} @@ -224,11 +222,10 @@ class MSTeamsList extends React.Component {
- // @ts-expect-error ts-migrate(2322) FIXME: Type '{ monitorId: any; }' is not assignable to ty... Remove this comment to see the full error message +
@@ -66,10 +66,10 @@ class SlackBox extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + SlackBox.displayName = 'SlackBox'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + SlackBox.propTypes = { monitorId: PropTypes.string, }; diff --git a/dashboard/src/components/webHooks/SlackButton.tsx b/dashboard/src/components/webHooks/SlackButton.tsx index 045fbb2fa0..fd5e31660a 100644 --- a/dashboard/src/components/webHooks/SlackButton.tsx +++ b/dashboard/src/components/webHooks/SlackButton.tsx @@ -8,7 +8,7 @@ import CreateSlackWebhook from '../modals/CreateSlackWebhook'; class SlackButton extends React.Component { render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + const { monitorId } = this.props; return ( @@ -17,7 +17,7 @@ class SlackButton extends React.Component { type="button" id="addSlackButton" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: 'data._id', onClose: () => '', @@ -40,7 +40,7 @@ class SlackButton extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + SlackButton.displayName = 'SlackButton'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( @@ -55,7 +55,7 @@ const mapStateToProps = (state: $TSFixMe) => ({ currentProject: state.project.currentProject }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + SlackButton.propTypes = { openModal: PropTypes.func.isRequired, monitorId: PropTypes.string, diff --git a/dashboard/src/components/webHooks/SlackItem.tsx b/dashboard/src/components/webHooks/SlackItem.tsx index 283f650f75..a1e4fbc9bc 100644 --- a/dashboard/src/components/webHooks/SlackItem.tsx +++ b/dashboard/src/components/webHooks/SlackItem.tsx @@ -12,17 +12,17 @@ import DeleteSlack from '../modals/DeleteSlackWebhook'; class SlackItem extends React.Component { deleteItem = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type 'Readon... Remove this comment to see the full error message + monitors, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + data, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateSlack' does not exist on type 'Rea... Remove this comment to see the full error message + updateSlack, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteSlack' does not exist on type 'Rea... Remove this comment to see the full error message + deleteSlack, } = this.props; @@ -33,32 +33,32 @@ class SlackItem extends React.Component { const newMonitors = monitors .filter((monitor: $TSFixMe) => monitor.monitorId._id !== monitorId) .map((monitor: $TSFixMe) => ({ - monitorId: monitor.monitorId._id - })); + monitorId: monitor.monitorId._id + })); if (newMonitors.length > 0) { const postObj = {}; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endpoint' does not exist on type '{}'. + postObj.endpoint = data && data.data.endpoint; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'webHookName' does not exist on type '{}'... Remove this comment to see the full error message + postObj.webHookName = data && data.webHookName; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + postObj.monitors = newMonitors; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + postObj.type = 'slack'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endpointType' does not exist on type '{}... Remove this comment to see the full error message + postObj.endpointType = data && data.data.endpointType; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCreated' does not exist on type ... Remove this comment to see the full error message + postObj.incidentCreated = data && data.notificationOptions.incidentCreated; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentResolved' does not exist on type... Remove this comment to see the full error message + postObj.incidentResolved = data && data.notificationOptions.incidentResolved; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentAcknowledged' does not exist on ... Remove this comment to see the full error message + postObj.incidentAcknowledged = data && data.notificationOptions.incidentAcknowledged; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentNoteAdded' does not exist on typ... Remove this comment to see the full error message + postObj.incidentNoteAdded = data && data.notificationOptions.incidentNoteAdded; @@ -83,16 +83,15 @@ class SlackItem extends React.Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { data, monitorId, webhooks, monitors } = this.props; const { webHookName } = data.data; let deleting = false; const monitorName = monitors && monitors[0].monitorId.name; const monitorTitle = monitors && monitors.length > 1 - ? `${monitorName} and ${monitors?.length - 1} other${ - monitors?.length - 1 === 1 ? '' : 's' - }` + ? `${monitorName} and ${monitors?.length - 1} other${monitors?.length - 1 === 1 ? '' : 's' + }` : monitorName; if ( webhooks && @@ -154,7 +153,7 @@ class SlackItem extends React.Component { className="bs-Button bs-DeprecatedButton" type="button" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: data._id, onClose: () => '', @@ -175,7 +174,7 @@ class SlackItem extends React.Component { className="bs-Button bs-DeprecatedButton" type="button" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: data._id, onClose: () => '', @@ -200,7 +199,7 @@ class SlackItem extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + SlackItem.displayName = 'SlackItem'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( @@ -219,7 +218,7 @@ const mapStateToProps = (state: $TSFixMe) => ({ currentProject: state.project.currentProject }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + SlackItem.propTypes = { currentProject: PropTypes.object.isRequired, deleteSlack: PropTypes.func.isRequired, diff --git a/dashboard/src/components/webHooks/SlackList.tsx b/dashboard/src/components/webHooks/SlackList.tsx index 9245262b3c..f5e6b88b27 100644 --- a/dashboard/src/components/webHooks/SlackList.tsx +++ b/dashboard/src/components/webHooks/SlackList.tsx @@ -16,9 +16,9 @@ import { User } from '../../config'; class SlackList extends React.Component { ready() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getSlackMonitor' does not exist on type ... Remove this comment to see the full error message + const { getSlackMonitor, monitorId, getSlack } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const { projectId } = this.props; if (monitorId) { getSlackMonitor(projectId, monitorId); @@ -32,7 +32,7 @@ class SlackList extends React.Component { } componentWillUnmount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.paginate('reset'); } @@ -49,17 +49,17 @@ class SlackList extends React.Component { prevClicked = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'slacks' does not exist on type 'Readonly... Remove this comment to see the full error message + slacks: { skip, limit }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getSlackMonitor' does not exist on type ... Remove this comment to see the full error message + getSlackMonitor, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + paginate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getSlack' does not exist on type 'Readon... Remove this comment to see the full error message + getSlack, } = this.props; @@ -84,17 +84,17 @@ class SlackList extends React.Component { nextClicked = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'slacks' does not exist on type 'Readonly... Remove this comment to see the full error message + slacks: { skip, limit }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getSlackMonitor' does not exist on type ... Remove this comment to see the full error message + getSlackMonitor, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + paginate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getSlack' does not exist on type 'Readon... Remove this comment to see the full error message + getSlack, } = this.props; @@ -108,7 +108,7 @@ class SlackList extends React.Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'slacks' does not exist on type 'Readonly... Remove this comment to see the full error message + const { slacks, isRequesting, monitorId } = this.props; const { count, skip, limit } = slacks; let { slacks: webHooks } = slacks; @@ -151,7 +151,7 @@ class SlackList extends React.Component { 0}> {(webHooks ? webHooks : []).map((hook: $TSFixMe) => {numberOfPages > 0 - ? `Page ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pages' does not exist on type 'Readonly<... Remove this comment to see the full error message - this.props.pages.counter - } of ${numberOfPages} (${count} Slack${ - count === 1 ? '' : 's' - })` - : `${count} Slack${ - count === 1 ? '' : 's' - }`} + ? `Page ${this.props.pages.counter + } of ${numberOfPages} (${count} Slack${count === 1 ? '' : 's' + })` + : `${count} Slack${count === 1 ? '' : 's' + }`} @@ -218,11 +214,10 @@ class SlackList extends React.Component {
- // @ts-expect-error ts-migrate(2322) FIXME: Type '{ monitorId: any; }' is not assignable to ty... Remove this comment to see the full error message +
@@ -55,10 +55,10 @@ class WebHookBox extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + WebHookBox.displayName = 'WebHookBox'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + WebHookBox.propTypes = { monitorId: PropTypes.string, }; diff --git a/dashboard/src/components/webHooks/WebHookButton.tsx b/dashboard/src/components/webHooks/WebHookButton.tsx index baa86f4d6c..57d896b9af 100755 --- a/dashboard/src/components/webHooks/WebHookButton.tsx +++ b/dashboard/src/components/webHooks/WebHookButton.tsx @@ -8,7 +8,7 @@ import DataPathHoC from '../DataPathHoC'; class WebHookButton extends React.Component { render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + const { monitorId } = this.props; return ( @@ -17,7 +17,7 @@ class WebHookButton extends React.Component { type="button" id="addWebhookButton" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: 'data._id', onClose: () => '', @@ -40,7 +40,7 @@ class WebHookButton extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + WebHookButton.displayName = 'WebHookButton'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( @@ -56,7 +56,7 @@ const mapStateToProps = (state: $TSFixMe) => ({ modalId: state.modal.modals[0] }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + WebHookButton.propTypes = { openModal: PropTypes.func.isRequired, monitorId: PropTypes.string, diff --git a/dashboard/src/components/webHooks/WebHookItem.tsx b/dashboard/src/components/webHooks/WebHookItem.tsx index 26609b270a..6b032fd490 100755 --- a/dashboard/src/components/webHooks/WebHookItem.tsx +++ b/dashboard/src/components/webHooks/WebHookItem.tsx @@ -13,15 +13,15 @@ import { WebHookTableBody, WebHookBadgeTableBody } from './WebHookRow'; class WebHookInput extends React.Component { deleteItem = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type 'Readon... Remove this comment to see the full error message + monitors, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + data, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateWebHook' does not exist on type 'R... Remove this comment to see the full error message + updateWebHook, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, } = this.props; @@ -32,41 +32,41 @@ class WebHookInput extends React.Component { const newMonitors = monitors .filter((monitor: $TSFixMe) => monitor.monitorId._id !== monitorId) .map((monitor: $TSFixMe) => ({ - monitorId: monitor.monitorId._id - })); + monitorId: monitor.monitorId._id + })); if (newMonitors.length > 0) { const postObj = {}; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endpoint' does not exist on type '{}'. + postObj.endpoint = data && data.data.endpoint; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type '{}'. + postObj.monitors = newMonitors; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + postObj.type = 'webhook'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'endpointType' does not exist on type '{}... Remove this comment to see the full error message + postObj.endpointType = data && data.data.endpointType; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCreated' does not exist on type ... Remove this comment to see the full error message + postObj.incidentCreated = data && data.notificationOptions.incidentCreated; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentResolved' does not exist on type... Remove this comment to see the full error message + postObj.incidentResolved = data && data.notificationOptions.incidentResolved; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentAcknowledged' does not exist on ... Remove this comment to see the full error message + postObj.incidentAcknowledged = data && data.notificationOptions.incidentAcknowledged; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentNoteAdded' does not exist on typ... Remove this comment to see the full error message + postObj.incidentNoteAdded = data && data.notificationOptions.incidentNoteAdded; return updateWebHook(currentProject._id, data._id, postObj); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteWebHook' does not exist on type 'R... Remove this comment to see the full error message + return this.props.deleteWebHook(currentProject._id, data._id); } } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteWebHook' does not exist on type 'R... Remove this comment to see the full error message + return this.props.deleteWebHook(currentProject._id, data._id); } }; @@ -83,7 +83,7 @@ class WebHookInput extends React.Component { } render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message + const { data, webhooks, monitors, monitorId } = this.props; const { endpoint, endpointType } = data.data; @@ -91,9 +91,8 @@ class WebHookInput extends React.Component { const monitorName = monitors && monitors[0].monitorId.name; const monitorTitle = monitors && monitors.length > 1 - ? `${monitorName} and ${monitors?.length - 1} other${ - monitors?.length - 1 === 1 ? '' : 's' - }` + ? `${monitorName} and ${monitors?.length - 1} other${monitors?.length - 1 === 1 ? '' : 's' + }` : monitorName; if ( webhooks && @@ -111,7 +110,7 @@ class WebHookInput extends React.Component { @@ -127,7 +126,7 @@ class WebHookInput extends React.Component { className="bs-Button bs-DeprecatedButton" type="button" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: data._id, onClose: () => '', @@ -147,7 +146,7 @@ class WebHookInput extends React.Component { className="bs-Button bs-DeprecatedButton" type="button" onClick={() => - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.openModal({ id: data._id, onClose: () => '', @@ -172,7 +171,7 @@ class WebHookInput extends React.Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + WebHookInput.displayName = 'WebHookInput'; const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( @@ -191,7 +190,7 @@ const mapStateToProps = (state: $TSFixMe) => ({ currentProject: state.project.currentProject }); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + WebHookInput.propTypes = { currentProject: PropTypes.object.isRequired, deleteWebHook: PropTypes.func.isRequired, diff --git a/dashboard/src/components/webHooks/WebHookList.tsx b/dashboard/src/components/webHooks/WebHookList.tsx index 7b5e70b6af..8f97a8ef92 100755 --- a/dashboard/src/components/webHooks/WebHookList.tsx +++ b/dashboard/src/components/webHooks/WebHookList.tsx @@ -18,9 +18,9 @@ import { ListLoader } from '../basic/Loader'; class WebHookList extends React.Component { ready() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getWebHookMonitor' does not exist on typ... Remove this comment to see the full error message + const { getWebHookMonitor, getWebHook } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const { projectId, monitorId } = this.props; if (monitorId) { @@ -35,7 +35,7 @@ class WebHookList extends React.Component { } componentWillUnmount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.paginate('reset'); } @@ -52,17 +52,17 @@ class WebHookList extends React.Component { prevClicked = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'webHook' does not exist on type 'Readonl... Remove this comment to see the full error message + webHook: { skip, limit }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getWebHookMonitor' does not exist on typ... Remove this comment to see the full error message + getWebHookMonitor, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getWebHook' does not exist on type 'Read... Remove this comment to see the full error message + getWebHook, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + paginate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, } = this.props; @@ -86,17 +86,17 @@ class WebHookList extends React.Component { nextClicked = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'webHook' does not exist on type 'Readonl... Remove this comment to see the full error message + webHook: { skip, limit }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getWebHookMonitor' does not exist on typ... Remove this comment to see the full error message + getWebHookMonitor, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + paginate, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getWebHook' does not exist on type 'Read... Remove this comment to see the full error message + getWebHook, } = this.props; @@ -109,7 +109,7 @@ class WebHookList extends React.Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'webHook' does not exist on type 'Readonl... Remove this comment to see the full error message + const { webHook, isRequesting, monitorId } = this.props; const { count, skip, limit } = webHook; let { webHooks } = webHook; @@ -152,7 +152,7 @@ class WebHookList extends React.Component { 0}> {(webHooks ? webHooks : []).map((hook: $TSFixMe) => {numberOfPages > 0 - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + ? `Page ${this.props.page && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message - this.props.page - .counter} of ${numberOfPages} (${count} Webhook${ - count === 1 ? '' : 's' - })` - : `${count} Webhook${ - count === 1 ? '' : 's' - }`} + + this.props.page + .counter} of ${numberOfPages} (${count} Webhook${count === 1 ? '' : 's' + })` + : `${count} Webhook${count === 1 ? '' : 's' + }`} @@ -220,11 +218,10 @@ class WebHookList extends React.Component {
)} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requestingMonitorSla' does not exist on ... Remove this comment to see the full error message + {!this.props.requestingMonitorSla && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor.breachedMonitorSla && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + (this.props.monitor.monitorSla || this.isDefaultMonitorSlaSet()) && (
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + {this.props.monitor .monitorSla ? ( In the last{' '} { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor .monitorSla .frequency @@ -610,32 +610,32 @@ class MonitorView extends React.Component {
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + {this.props.monitor && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor._id && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor.type && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + (((this.props.monitor .type === 'url' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor .type === 'api' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor .type === 'ip') && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probeList' does not exist on type 'Reado... Remove this comment to see the full error message + !this.props.probeList .requesting) || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + (this.props.monitor .type !== 'url' && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor .type !== 'api' && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.monitor .type !== 'ip')) ? ( @@ -647,43 +647,43 @@ class MonitorView extends React.Component { if={ !this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'edit' does not exist on type 'Readonly<{... Remove this comment to see the full error message + .edit && !this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requestingComponent' does not exist on t... Remove this comment to see the full error message + .requestingComponent } > @@ -703,13 +703,13 @@ class MonitorView extends React.Component { editMonitorProp={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor } index={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor ._id } @@ -719,14 +719,14 @@ class MonitorView extends React.Component { key={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor ._id } formKey={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor ._id } @@ -739,20 +739,20 @@ class MonitorView extends React.Component {
{!this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requestingComponent' does not exist on t... Remove this comment to see the full error message + .requestingComponent && ( @@ -762,48 +762,48 @@ class MonitorView extends React.Component { if={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor && this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor .type && this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor .type === 'url' && !this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requestingComponent' does not exist on t... Remove this comment to see the full error message + .requestingComponent } >
{!this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requestingComponent' does not exist on t... Remove this comment to see the full error message + .requestingComponent && ( <>
@@ -955,13 +955,13 @@ class MonitorView extends React.Component { monitor={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor } componentId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + .componentId } /> @@ -975,16 +975,16 @@ class MonitorView extends React.Component { if={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor && this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor .type && this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + .monitor .type !== 'manual' @@ -992,17 +992,17 @@ class MonitorView extends React.Component { >
- // @ts-expect-error ts-migrate(2604) FIXME: JSX element type 'MonitorViewChangeComponentBox' d... Remove this comment to see the full error message +
{ const initialValues = {}; let currentMonitorCriteria = []; - // @ts-expect-error ts-migrate(2339) FIXME: Property '_id' does not exist on type '{}'. + if (monitor && monitor._id) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`name_${monitor._id}`] = monitor.name; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`url_${monitor._id}`] = monitor.data && monitor.data.url; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`deviceId_${monitor._id}`] = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type '{}'. + monitor.data && monitor.data.deviceId; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`ip_${monitor._id}`] = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type '{}'. + monitor.data && monitor.data.IPAddress; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`description_${monitor._id}`] = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type '{}'. + monitor.data && monitor.data.description; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`subProject_${monitor._id}`] = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type '{}'. + monitor.projectId._id || monitor.projectId; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`resourceCategory_${monitor._id}`] = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resourceCategory' does not exist on type... Remove this comment to see the full error message + monitor.resourceCategory && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resourceCategory' does not exist on type... Remove this comment to see the full error message + (monitor.resourceCategory._id || monitor.resourceCategory); const monitorSchedules: $TSFixMe = []; @@ -1158,81 +1158,81 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { schedules.data.forEach((schedule: $TSFixMe) => { monitorSchedules.push({ [schedule._id]: schedule.monitorIds.some( - // @ts-expect-error ts-migrate(2339) FIXME: Property '_id' does not exist on type '{}'. + (monitorId: $TSFixMe) => monitorId._id === monitor._id ), }); }); } - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`callSchedules_${monitor._id}`] = monitorSchedules; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCommunicationSla' does not exist... Remove this comment to see the full error message + monitor.incidentCommunicationSla && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCommunicationSla' does not exist... Remove this comment to see the full error message + monitor.incidentCommunicationSla._id ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCommunicationSla' does not exist... Remove this comment to see the full error message + initialValues.incidentCommunicationSla = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentCommunicationSla' does not exist... Remove this comment to see the full error message + monitor.incidentCommunicationSla._id; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorSla' does not exist on type '{}'. + if (monitor.monitorSla && monitor.monitorSla._id) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorSla' does not exist on type '{}'. + initialValues.monitorSla = monitor.monitorSla._id; } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + if (monitor.type === 'kubernetes') { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`configurationFile_${monitor._id}`] = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'kubernetesConfig' does not exist on type... Remove this comment to see the full error message + monitor.kubernetesConfig; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`kubernetesNamespace_${monitor._id}`] = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'kubernetesNamespace' does not exist on t... Remove this comment to see the full error message + monitor.kubernetesNamespace || 'default'; } if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + monitor.type === 'url' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + monitor.type === 'api' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + monitor.type === 'server-monitor' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + monitor.type === 'incomingHttpRequest' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + monitor.type === 'script' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + monitor.type === 'kubernetes' || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + monitor.type === 'ip' ) { // collect all criteria - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + if (monitor.criteria) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + monitor.criteria.up && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + monitor.criteria.down && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + monitor.criteria.degraded ) { currentMonitorCriteria = [ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + ...monitor.criteria.up, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + ...monitor.criteria.degraded, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + ...monitor.criteria.down, ].map((criterion, index) => { const monitorUpCriteriaCount = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + monitor.criteria.up.length; const monitorDegradedCriteriaCount = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'criteria' does not exist on type '{}'. + monitor.criteria.degraded.length; const type = index < monitorUpCriteriaCount @@ -1258,29 +1258,29 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { }); // set initial values for the criterion - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[criterionFieldName] = criterionBodyField; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`name_${criterionFieldName}`] = criterion.name; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`incidentTitle_${criterionFieldName}`] = criterion.title; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[ `incidentDescription_${criterionFieldName}` ] = criterion.description; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`createAlert_${criterionFieldName}`] = criterion.createAlert; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`autoAcknowledge_${criterionFieldName}`] = criterion.autoAcknowledge; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`autoResolve_${criterionFieldName}`] = criterion.autoResolve; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[ `script_${criterionFieldName}` ] = scriptName; @@ -1311,7 +1311,7 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { ), }); }); - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[ `criterion_${id}_schedules` ] = criterionSchedules; @@ -1328,27 +1328,27 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { } } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{}'. + if (monitor.type === 'api') { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'method' does not exist on type '{}'. + if (monitor.method && monitor.method.length) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`method_${monitor._id}`] = monitor.method; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'bodyType' does not exist on type '{}'. + if (monitor.bodyType && monitor.bodyType.length) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`bodyType_${monitor._id}`] = monitor.bodyType; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'text' does not exist on type '{}'. + if (monitor.text && monitor.text.length) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`text_${monitor._id}`] = monitor.text; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'formData' does not exist on type '{}'. + if (monitor.formData && monitor.formData.length) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`formData_${monitor._id}`] = monitor.formData; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'headers' does not exist on type '{}'. + if (monitor.headers && monitor.headers.length) - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + initialValues[`headers_${monitor._id}`] = monitor.headers; } } @@ -1400,7 +1400,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => { ); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + MonitorView.propTypes = { projectId: PropTypes.string, slug: PropTypes.string, @@ -1438,7 +1438,7 @@ MonitorView.propTypes = { switchToProjectViewerNav: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + MonitorView.displayName = 'MonitorView'; export default connect(mapStateToProps, mapDispatchToProps)(MonitorView); diff --git a/dashboard/src/pages/OnCall.tsx b/dashboard/src/pages/OnCall.tsx index 49501639e5..4ab039e2dd 100755 --- a/dashboard/src/pages/OnCall.tsx +++ b/dashboard/src/pages/OnCall.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { fetchProjectSchedule, @@ -10,7 +10,7 @@ import { paginate, } from '../actions/schedule'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { openModal, closeModal } from '../actions/modal'; import ScheduleProjectBox from '../components/schedule/ScheduleProjectBox'; @@ -28,13 +28,13 @@ export class OnCall extends Component { } ready() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSubProjectSchedules' does not exist... Remove this comment to see the full error message + const { fetchSubProjectSchedules, currentProjectId } = this.props; fetchSubProjectSchedules(currentProjectId); } componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProjectId' does not exist on type... Remove this comment to see the full error message + if (this.props.currentProjectId) { this.ready(); } @@ -42,25 +42,25 @@ export class OnCall extends Component { componentDidUpdate(prevProps: $TSFixMe) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + prevProps?.currentProject?._id !== this.props?.currentProject?._id ) { this.ready(); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + if (prevProps.projectId !== this.props.projectId) { this.ready(); } } componentWillUnmount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.paginate('reset'); } prevClicked = (subProjectId: $TSFixMe, skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectSchedule' does not exist on ... Remove this comment to see the full error message + const { fetchProjectSchedule, paginate } = this.props; fetchProjectSchedule( @@ -68,35 +68,35 @@ export class OnCall extends Component { (skip || 0) > (limit || 10) ? skip - limit : 0, 10 ); - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + this.setState({ [subProjectId]: this.state[subProjectId] - 1 }); paginate('prev'); }; nextClicked = (subProjectId: $TSFixMe, skip: $TSFixMe, limit: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectSchedule' does not exist on ... Remove this comment to see the full error message + const { fetchProjectSchedule, paginate } = this.props; fetchProjectSchedule(subProjectId, skip + limit, 10); this.setState({ - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + [subProjectId]: !this.state[subProjectId] ? 2 - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + : this.state[subProjectId] + 1, }); paginate('next'); }; createSchedule = (subProjectId: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createSchedule' does not exist on type '... Remove this comment to see the full error message + const { createSchedule, history } = this.props; createSchedule(subProjectId, { name: 'Unnamed' }).then(({ data }: $TSFixMe) => { history.push( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProject.slug}/schedule/${data[0].slug}` ); }); @@ -104,7 +104,7 @@ export class OnCall extends Component { handleKeyBoard = (e: $TSFixMe) => { const schedulesPerPage = 10; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectSchedules' does not exist on t... Remove this comment to see the full error message + const { subProjectSchedules, pages } = this.props; const canPaginateForward = subProjectSchedules.data ? subProjectSchedules.data.length >= @@ -113,10 +113,10 @@ export class OnCall extends Component { const canPaginateBackward = pages.counter > 1; switch (e.key) { case 'ArrowRight': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + return canPaginateForward && this.props.paginate('next'); case 'ArrowLeft': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + return canPaginateBackward && this.props.paginate('prev'); default: return false; @@ -125,19 +125,19 @@ export class OnCall extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + isRequesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectSchedules' does not exist on t... Remove this comment to see the full error message + subProjectSchedules, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjects' does not exist on type 'Rea... Remove this comment to see the full error message + subProjects, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProjectId' does not exist on type... Remove this comment to see the full error message + currentProjectId, } = this.props; @@ -166,7 +166,7 @@ export class OnCall extends Component { projectSchedule && projectSchedule.schedules ? ( any' is not assignable to type 'Key | ... Remove this comment to see the full error message + key={() => uuidv4()} >
@@ -188,9 +188,9 @@ export class OnCall extends Component { (obj: $TSFixMe) => obj._id === currentProjectId )?.name } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduleModalId' does not exist on type ... Remove this comment to see the full error message + scheduleModalId={this.state.scheduleModalId} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message + openModal={this.props.openModal} subProject={ subProjects && @@ -206,9 +206,9 @@ export class OnCall extends Component { allScheduleLength={ subProjectSchedules.length } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modalList' does not exist on type 'Reado... Remove this comment to see the full error message + modalList={this.props.modalList} - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + page={this.state[currentProjectId]} />
@@ -229,37 +229,37 @@ export class OnCall extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} />
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + {!this.props.isRequesting && allSchedules}
- // @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message + @@ -338,7 +338,7 @@ const mapStateToProps = (state: $TSFixMe) => { // loop through each of the tutorial stat, if they have a value based on the project id, replace it with it for (const key in tutorialStat) { if (projectCustomTutorial && projectCustomTutorial[key]) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + tutorialStat[key].show = projectCustomTutorial[key].show; } } @@ -357,7 +357,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + OnCall.propTypes = { subProjectSchedules: PropTypes.array.isRequired, subProjects: PropTypes.array.isRequired, @@ -380,7 +380,7 @@ OnCall.propTypes = { projectId: PropTypes.string, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + OnCall.displayName = 'OnCall'; export default connect(mapStateToProps, mapDispatchToProps)(OnCall); diff --git a/dashboard/src/pages/OneUptimeApi.tsx b/dashboard/src/pages/OneUptimeApi.tsx index 98c8fd687c..51a267a0fa 100644 --- a/dashboard/src/pages/OneUptimeApi.tsx +++ b/dashboard/src/pages/OneUptimeApi.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import BreadCrumbItem from '../components/breadCrumb/BreadCrumbItem'; import getParentRoute from '../utils/getParentRoute'; @@ -12,11 +12,11 @@ import RenderIfSubProjectMember from '../components/basic/RenderIfSubProjectMemb class OneUptimeApi extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const projectName = currentProject ? currentProject.name : ''; @@ -28,11 +28,11 @@ class OneUptimeApi extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> @@ -40,7 +40,7 @@ class OneUptimeApi extends Component {
- // @ts-expect-error ts-migrate(2741) FIXME: Property 'currentProjectId' is missing in type '{...Remove this comment to see the full error message + @@ -97,10 +97,10 @@ class OneUptimeApi extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + OneUptimeApi.displayName = 'OneUptimeApi'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + OneUptimeApi.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, diff --git a/dashboard/src/pages/PerformanceTracker.tsx b/dashboard/src/pages/PerformanceTracker.tsx index 4ffe93a7df..ea214e3a41 100644 --- a/dashboard/src/pages/PerformanceTracker.tsx +++ b/dashboard/src/pages/PerformanceTracker.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import BreadCrumbItem from '../components/breadCrumb/BreadCrumbItem'; import ShouldRender from '../components/basic/ShouldRender'; @@ -24,7 +24,7 @@ class PerformanceTracker extends Component { prevClicked = (projectId: $TSFixMe, componentId: $TSFixMe, skip: $TSFixMe, limit: $TSFixMe) => { this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchPerformanceTrackers' does not exist... Remove this comment to see the full error message + .fetchPerformanceTrackers({ projectId, componentId, @@ -36,11 +36,11 @@ class PerformanceTracker extends Component { this.setState(prevState => { return { page: - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + prevState.page === 1 - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + ? prevState.page - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + : prevState.page - 1, }; }); @@ -49,7 +49,7 @@ class PerformanceTracker extends Component { nextClicked = (projectId: $TSFixMe, componentId: $TSFixMe, skip: $TSFixMe, limit: $TSFixMe) => { this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchPerformanceTrackers' does not exist... Remove this comment to see the full error message + .fetchPerformanceTrackers({ projectId, componentId, @@ -60,7 +60,7 @@ class PerformanceTracker extends Component { .then(() => { this.setState(prevState => { return { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + page: prevState.page + 1, }; }); @@ -68,9 +68,9 @@ class PerformanceTracker extends Component { }; componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'loadPage' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.loadPage('Performance Tracker'); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + const { currentProject, fetchComponent, componentSlug } = this.props; if (currentProject) { this.setState({ requesting: true }); @@ -82,26 +82,26 @@ class PerformanceTracker extends Component { componentDidUpdate(prevProps: $TSFixMe) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + prevProps.currentProject !== this.props.currentProject || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + prevProps.componentId !== this.props.componentId || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentSlug' does not exist on type 'R... Remove this comment to see the full error message + prevProps.componentSlug !== this.props.componentSlug ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + const componentId = this.props.componentId; const projectId = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + this.props.currentProject && this.props.currentProject._id; if (projectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchComponent' does not exist on type '... Remove this comment to see the full error message + this.props.fetchComponent(projectId, this.props.componentSlug); } if (projectId && componentId) { this.setRequesting(); this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchPerformanceTrackers' does not exist... Remove this comment to see the full error message + .fetchPerformanceTrackers({ projectId, componentId, @@ -116,14 +116,14 @@ class PerformanceTracker extends Component { setRequesting = () => this.setState({ requesting: true }); ready = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentId' does not exist on type 'Rea... Remove this comment to see the full error message + const componentId = this.props.componentId; const projectId = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + this.props.currentProject && this.props.currentProject._id; if (projectId && componentId) { this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchPerformanceTrackers' does not exist... Remove this comment to see the full error message + .fetchPerformanceTrackers({ projectId, componentId, @@ -136,19 +136,19 @@ class PerformanceTracker extends Component { renderPerformanceTrackerList = () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTrackerList' does not exist o... Remove this comment to see the full error message + performanceTrackerList, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentSlug' does not exist on type 'R... Remove this comment to see the full error message + componentSlug, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectSlug' does not exist on type 'Rea... Remove this comment to see the full error message + projectSlug, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'component' does not exist on type 'Reado... Remove this comment to see the full error message + component, } = this.props; return performanceTrackerList.performanceTrackers.map( (performanceTracker: $TSFixMe) => this.setState(prevState => ({ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showNewPerformanceTrackerForm' does not ... Remove this comment to see the full error message + showNewPerformanceTrackerForm: !prevState.showNewPerformanceTrackerForm, })); render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + if (this.props.currentProject) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + document.title = this.props.currentProject.name + ' Dashboard'; } const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'component' does not exist on type 'Reado... Remove this comment to see the full error message + component, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTrackerList' does not exist o... Remove this comment to see the full error message + performanceTrackerList, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'numberOfPage' does not exist on type 'Re... Remove this comment to see the full error message + numberOfPage, } = this.props; @@ -206,7 +206,7 @@ class PerformanceTracker extends Component { const projectId = currentProject ? currentProject._id : ''; const isEmpty = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTrackerList' does not exist o... Remove this comment to see the full error message + this.props.performanceTrackerList.performanceTrackers.length === 0; return ( @@ -215,7 +215,7 @@ class PerformanceTracker extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTrackerList' does not exist o... Remove this comment to see the full error message + {!this.props.performanceTrackerList.requesting && !this.state.requesting && !this.state.showNewPerformanceTrackerForm && @@ -254,7 +254,7 @@ class PerformanceTracker extends Component { this.renderPerformanceTrackerList()}
@@ -419,7 +419,7 @@ class PerformanceTracker extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + PerformanceTracker.displayName = 'PerformanceTracker'; const mapDispatchToProps = (dispatch: $TSFixMe) => { @@ -451,7 +451,7 @@ const mapStateToProps = (state: $TSFixMe, ownProps: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + PerformanceTracker.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, diff --git a/dashboard/src/pages/PerformanceTrackerView.tsx b/dashboard/src/pages/PerformanceTrackerView.tsx index dd1a4e533d..c306092202 100644 --- a/dashboard/src/pages/PerformanceTrackerView.tsx +++ b/dashboard/src/pages/PerformanceTrackerView.tsx @@ -1,14 +1,14 @@ import React, { Component } from 'react'; import BreadCrumbItem from '../components/breadCrumb/BreadCrumbItem'; import getParentRoute from '../utils/getParentRoute'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; // import PerformanceView from '../components/performanceTracker/PerformanceView'; import WebTransactionsChart from '../components/performanceTracker/WebTransactionsChart'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'; import { fetchComponent } from '../actions/component'; import { @@ -36,29 +36,29 @@ class PerformanceTrackerView extends Component { componentDidUpdate(prevProps: $TSFixMe) { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTrackerSlug' does not exist o... Remove this comment to see the full error message + performanceTrackerSlug, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchPerformanceTracker' does not exist ... Remove this comment to see the full error message + fetchPerformanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchComponent' does not exist on type '... Remove this comment to see the full error message + fetchComponent, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateTimeMetrics' does not exist on typ... Remove this comment to see the full error message + updateTimeMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateThroughputMetrics' does not exist ... Remove this comment to see the full error message + updateThroughputMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateErrorMetrics' does not exist on ty... Remove this comment to see the full error message + updateErrorMetrics, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentSlug' does not exist on type 'R... Remove this comment to see the full error message + componentSlug, } = this.props; if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + prevProps.currentProject !== this.props.currentProject || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentSlug' does not exist on type 'R... Remove this comment to see the full error message + prevProps.componentSlug !== this.props.componentSlug ) { currentProject && fetchComponent(currentProject._id, componentSlug); @@ -88,21 +88,21 @@ class PerformanceTrackerView extends Component { componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentSlug' does not exist on type 'R... Remove this comment to see the full error message + componentSlug, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchComponent' does not exist on type '... Remove this comment to see the full error message + fetchComponent, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTrackerSlug' does not exist o... Remove this comment to see the full error message + performanceTrackerSlug, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchPerformanceTracker' does not exist ... Remove this comment to see the full error message + fetchPerformanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPerformanceTrackerKeyReset' does no... Remove this comment to see the full error message + resetPerformanceTrackerKeyReset, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateErrorMetrics' does not exist on ty... Remove this comment to see the full error message + updateErrorMetrics, } = this.props; @@ -133,7 +133,7 @@ class PerformanceTrackerView extends Component { tabSelected = (index: $TSFixMe) => { const tabSlider = document.getElementById('tab-slider'); - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + tabSlider.style.transform = `translate(calc(${tabSlider.offsetWidth}px*${index}), 0px)`; this.setState({ tabIndex: index, @@ -141,7 +141,7 @@ class PerformanceTrackerView extends Component { }; removeListeners = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + const { performanceTracker } = this.props; if (performanceTracker) { socket.removeListener(`timeMetrics-${performanceTracker._id}`); @@ -154,21 +154,21 @@ class PerformanceTrackerView extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'component' does not exist on type 'Reado... Remove this comment to see the full error message + component, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'performanceTracker' does not exist on ty... Remove this comment to see the full error message + performanceTracker, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'removeQuickStart' does not exist on type... Remove this comment to see the full error message + removeQuickStart, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'trackerObj' does not exist on type 'Read... Remove this comment to see the full error message + trackerObj, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resetTrackerObj' does not exist on type ... Remove this comment to see the full error message + resetTrackerObj, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; @@ -188,7 +188,7 @@ class PerformanceTrackerView extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> any;... Remove this comment to see the full error message + appId={performanceTracker._id} appKey={ (resetTrackerObj.performanceTracker && @@ -285,7 +285,7 @@ class PerformanceTrackerView extends Component {
{ return bindActionCreators( @@ -394,7 +394,7 @@ const mapStateToProps = (state: $TSFixMe, ownProps: $TSFixMe) => { switchToProjectViewerNav: state.project.switchToProjectViewerNav, }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + PerformanceTrackerView.propTypes = { component: PropTypes.shape({ name: PropTypes.any, diff --git a/dashboard/src/pages/Probe.tsx b/dashboard/src/pages/Probe.tsx index e8e9cde2fe..d857745697 100644 --- a/dashboard/src/pages/Probe.tsx +++ b/dashboard/src/pages/Probe.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import ProbeList from '../components/probe/ProbeList'; import { getProbes } from '../actions/probe'; @@ -12,7 +12,7 @@ import getParentRoute from '../utils/getParentRoute'; class Probe extends React.Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; this.state = { page: 1 }; } @@ -23,7 +23,7 @@ class Probe extends React.Component { componentDidUpdate(prevProps: $TSFixMe) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + prevProps?.currentProject?._id !== this.props?.currentProject?._id ) { this.ready(); @@ -31,49 +31,49 @@ class Probe extends React.Component { } ready = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getProbes' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.getProbes(this.props.currentProject._id, 0, 10); //0 -> skip, 10-> limit. }; prevClicked = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getProbes' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.getProbes( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + this.props.currentProject._id, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probes' does not exist on type 'Readonly... Remove this comment to see the full error message + this.props.probes.skip - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probes' does not exist on type 'Readonly... Remove this comment to see the full error message + ? parseInt(this.props.probes.skip, 10) - 10 : 10, 10 ); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page > 1 ? this.state.page - 1 : 1 }); }; nextClicked = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getProbes' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.getProbes( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + this.props.currentProject._id, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probes' does not exist on type 'Readonly... Remove this comment to see the full error message + this.props.probes.skip - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probes' does not exist on type 'Readonly... Remove this comment to see the full error message + ? parseInt(this.props.probes.skip, 10) + 10 : 10, 10 ); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.setState({ page: this.state.page + 1 }); }; render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const projectName = currentProject ? currentProject.name : ''; @@ -85,11 +85,11 @@ class Probe extends React.Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> @@ -136,9 +136,9 @@ class Probe extends React.Component {
void; ... Remove this comment to see the full error message + probesList={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'probes' does not exist on type 'Readonly... Remove this comment to see the full error message + this.props.probes } prevClicked={ @@ -147,7 +147,7 @@ class Probe extends React.Component { nextClicked={ this.nextClicked } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message + page={this.state.page} />
@@ -175,7 +175,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => { return bindActionCreators({ getProbes }, dispatch); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Probe.propTypes = { getProbes: PropTypes.func, currentProject: PropTypes.object, @@ -188,7 +188,7 @@ Probe.propTypes = { }), }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Probe.displayName = 'Probe'; export default connect(mapStateToProps, mapDispatchToProps)(Probe); diff --git a/dashboard/src/pages/Profile.tsx b/dashboard/src/pages/Profile.tsx index 093728a469..216a601fd3 100755 --- a/dashboard/src/pages/Profile.tsx +++ b/dashboard/src/pages/Profile.tsx @@ -1,10 +1,10 @@ import React from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import ProfileSetting from '../components/profileSettings/Profile'; import BreadCrumbItem from '../components/breadCrumb/BreadCrumbItem'; import BreadCrumbs from '../components/breadCrumb/BreadCrumbs'; -// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message + import { PropTypes } from 'prop-types'; const Profile = (props: $TSFixMe) => { diff --git a/dashboard/src/pages/ProfileBilling.tsx b/dashboard/src/pages/ProfileBilling.tsx index 7ba2da0608..26d529bd93 100644 --- a/dashboard/src/pages/ProfileBilling.tsx +++ b/dashboard/src/pages/ProfileBilling.tsx @@ -1,25 +1,25 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import Invoice from '../components/invoice/Invoice'; import PaymentCard from '../components/paymentCard/PaymentCard'; import BreadCrumbItem from '../components/breadCrumb/BreadCrumbItem'; -// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message + import { PropTypes } from 'prop-types'; import BreadCrumbs from '../components/breadCrumb/BreadCrumbs'; class ProfileBilling extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, } = this.props; @@ -38,10 +38,10 @@ class ProfileBilling extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ProfileBilling.displayName = 'ProfileBilling'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ProfileBilling.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, diff --git a/dashboard/src/pages/Reports.tsx b/dashboard/src/pages/Reports.tsx index c831ed91f5..a5c2960c77 100755 --- a/dashboard/src/pages/Reports.tsx +++ b/dashboard/src/pages/Reports.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import moment from 'moment'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import Members from '../components/reports/Members'; import Monitors from '../components/reports/Monitors'; @@ -88,12 +88,12 @@ export class Reports extends Component { handleMemberStartDateTimeChange = (val: $TSFixMe) => { const startDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'membersEnd' does not exist on type 'Read... Remove this comment to see the full error message + this.handleMembersChange(startDate, this.state.membersEnd); }; handleMemberEndDateTimeChange = (val: $TSFixMe) => { const endDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'membersStart' does not exist on type 'Re... Remove this comment to see the full error message + this.handleMembersChange(this.state.membersStart, endDate); }; handleMembersChange(startDate: $TSFixMe, endDate: $TSFixMe) { @@ -105,12 +105,12 @@ export class Reports extends Component { handleMonitorStartDateTimeChange = (val: $TSFixMe) => { const startDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorEnd' does not exist on type 'Read... Remove this comment to see the full error message + this.handleMonitorChange(startDate, this.state.monitorEnd); }; handleMonitorEndDateTimeChange = (val: $TSFixMe) => { const endDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorStart' does not exist on type 'Re... Remove this comment to see the full error message + this.handleMonitorChange(this.state.monitorStart, endDate); }; handleMonitorChange(startDate: $TSFixMe, endDate: $TSFixMe) { @@ -134,12 +134,12 @@ export class Reports extends Component { handleStartDateTimeChange = (val: $TSFixMe) => { const startDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resolveTimeEnd' does not exist on type '... Remove this comment to see the full error message + this.handleResolveTimeChange(startDate, this.state.resolveTimeEnd); }; handleEndDateTimeChange = (val: $TSFixMe) => { const endDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'resolveTimeStart' does not exist on type... Remove this comment to see the full error message + this.handleResolveTimeChange(this.state.resolveTimeStart, endDate); }; handleResolveTimeChange(startDate: $TSFixMe, endDate: $TSFixMe) { @@ -150,12 +150,12 @@ export class Reports extends Component { } handleIncidentStartDateTimeChange = (val: $TSFixMe) => { const startDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentEnd' does not exist on type 'Rea... Remove this comment to see the full error message + this.handleIncidentChange(startDate, this.state.incidentEnd); }; handleIncidentEndDateTimeChange = (val: $TSFixMe) => { const endDate = moment(val); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'incidentStart' does not exist on type 'R... Remove this comment to see the full error message + this.handleIncidentChange(this.state.incidentStart, endDate); }; @@ -168,11 +168,11 @@ export class Reports extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const projectName = currentProject ? currentProject.name : ''; @@ -184,7 +184,7 @@ export class Reports extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> @@ -237,7 +237,7 @@ export class Reports extends Component {
@@ -556,11 +556,11 @@ export class Reports extends Component { currentDateRange={{ startDate: this .state - // @ts-expect-error ts-migrate(2339) FIXME: Property 'membersStart' does not exist on type 'Re... Remove this comment to see the full error message + .membersStart, endDate: this .state - // @ts-expect-error ts-migrate(2339) FIXME: Property 'membersEnd' does not exist on type 'Read... Remove this comment to see the full error message + .membersEnd, }} handleStartDateTimeChange={ @@ -583,18 +583,18 @@ export class Reports extends Component {
{ }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Reports.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, @@ -709,7 +709,7 @@ Reports.propTypes = { switchToProjectViewerNav: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Reports.displayName = 'Reports'; export default connect(mapStateToProps, {})(Reports); diff --git a/dashboard/src/pages/Resources.tsx b/dashboard/src/pages/Resources.tsx index 2099121898..5d5644b706 100644 --- a/dashboard/src/pages/Resources.tsx +++ b/dashboard/src/pages/Resources.tsx @@ -1,10 +1,10 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message + import { PropTypes } from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; -// @ts-expect-error ts-migrate(2613) FIXME: Module '"/home/nawazdhandala/Projects/OneUptime/ap... Remove this comment to see the full error message + import ResourceCategories from '../components/settings/ResourceCategories'; import BreadCrumbItem from '../components/breadCrumb/BreadCrumbItem'; @@ -13,17 +13,17 @@ import getParentRoute from '../utils/getParentRoute'; class Resources extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const projectName = currentProject ? currentProject.name : ''; @@ -35,11 +35,11 @@ class Resources extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> @@ -65,7 +65,7 @@ class Resources extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Resources.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, @@ -74,7 +74,7 @@ Resources.propTypes = { switchToProjectViewerNav: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Resources.displayName = 'Resources'; const mapStateToProps = (state: $TSFixMe) => { diff --git a/dashboard/src/pages/Schedule.tsx b/dashboard/src/pages/Schedule.tsx index f855e7ea0e..ea84807239 100755 --- a/dashboard/src/pages/Schedule.tsx +++ b/dashboard/src/pages/Schedule.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import DeleteBox from '../components/schedule/DeleteBox'; import MonitorBox from '../components/schedule/MonitorBox'; @@ -24,15 +24,15 @@ class Schedule extends Component { async componentDidMount() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + subProjectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduleId' does not exist on type 'Read... Remove this comment to see the full error message + scheduleId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getEscalation' does not exist on type 'R... Remove this comment to see the full error message + getEscalation, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectTeamLoading' does not exist on... Remove this comment to see the full error message + subProjectTeamLoading, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'teamLoading' does not exist on type 'Rea... Remove this comment to see the full error message + teamLoading, } = this.props; if (scheduleId && subProjectId) { @@ -50,21 +50,21 @@ class Schedule extends Component { async componentDidUpdate(prevProps: $TSFixMe) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'schedule' does not exist on type 'Readon... Remove this comment to see the full error message + prevProps.schedule !== this.props.schedule || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + prevProps.subProjectId !== this.props.subProjectId ) { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + subProjectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduleId' does not exist on type 'Read... Remove this comment to see the full error message + scheduleId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getEscalation' does not exist on type 'R... Remove this comment to see the full error message + getEscalation, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectTeamLoading' does not exist on... Remove this comment to see the full error message + subProjectTeamLoading, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'teamLoading' does not exist on type 'Rea... Remove this comment to see the full error message + teamLoading, } = this.props; if (scheduleId && subProjectId) { @@ -80,12 +80,12 @@ class Schedule extends Component { } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeProjectId' does not exist on type ... Remove this comment to see the full error message + if (prevProps.activeProjectId !== this.props.activeProjectId) { // navigate back to main section - // @ts-expect-error ts-migrate(2339) FIXME: Property 'history' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.history.push( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProject.slug}/on-call` ); } @@ -96,26 +96,26 @@ class Schedule extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'editSchedule' does not exist on type 'Re... Remove this comment to see the full error message + const { editSchedule, error } = this.state; const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'escalations' does not exist on type 'Rea... Remove this comment to see the full error message + escalations, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'teamMembers' does not exist on type 'Rea... Remove this comment to see the full error message + teamMembers, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + subProjectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'schedule' does not exist on type 'Readon... Remove this comment to see the full error message + schedule, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'groups' does not exist on type 'Readonly... Remove this comment to see the full error message + groups, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requestingEscalations' does not exist on... Remove this comment to see the full error message + requestingEscalations, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const name = schedule ? schedule.name : null; @@ -131,11 +131,11 @@ class Schedule extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> @@ -167,7 +167,7 @@ class Schedule extends Component { {!editSchedule && escalations.length > 0 && ( void; escalations: an... Remove this comment to see the full error message + onEditClicked={() => { this.setState({ editSchedule: true, @@ -249,10 +249,10 @@ const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Schedule.displayName = 'Schedule'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Schedule.propTypes = { getEscalation: PropTypes.func.isRequired, subProjectTeamLoading: PropTypes.func.isRequired, diff --git a/dashboard/src/pages/ScheduledEvent.tsx b/dashboard/src/pages/ScheduledEvent.tsx index fde7cf8e16..4cc06f392b 100644 --- a/dashboard/src/pages/ScheduledEvent.tsx +++ b/dashboard/src/pages/ScheduledEvent.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { connect } from 'react-redux'; import ScheduledEventBox from '../components/scheduledEvent/ScheduledEvent'; @@ -11,11 +11,11 @@ import { LoadingState } from '../components/basic/Loader'; class ScheduledEvent extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const projectName = currentProject ? currentProject.name : ''; @@ -27,7 +27,7 @@ class ScheduledEvent extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} />
- // @ts-expect-error ts-migrate(2322) FIXME: Type '{projectId: any; }' is not assignable to ty... Remove this comment to see the full error message +
@@ -51,7 +51,7 @@ class ScheduledEvent extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + ScheduledEvent.displayName = 'ScheduledEvent'; const mapStateToProps = (state: $TSFixMe) => { @@ -65,7 +65,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + ScheduledEvent.propTypes = { projectId: PropTypes.string, location: PropTypes.shape({ diff --git a/dashboard/src/pages/ScheduledEventDetail.tsx b/dashboard/src/pages/ScheduledEventDetail.tsx index b5e735b608..ffcb26d653 100644 --- a/dashboard/src/pages/ScheduledEventDetail.tsx +++ b/dashboard/src/pages/ScheduledEventDetail.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import BreadCrumbItem from '../components/breadCrumb/BreadCrumbItem'; import { @@ -19,7 +19,7 @@ import { LoadingState } from '../components/basic/Loader'; import ShouldRender from '../components/basic/ShouldRender'; import ScheduledEventDescription from '../components/scheduledEvent/ScheduledEventDescription'; import ScheduledEventNote from '../components/scheduledEvent/ScheduledEventNote'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Tab, Tabs, TabList, TabPanel, resetIdCounter } from 'react-tabs'; import ScheduleEventDeleteBox from '../components/scheduledEvent/ScheduleEventDeleteBox'; import { socket } from '../components/basic/Socket'; @@ -36,7 +36,7 @@ class ScheduledEventDetail extends Component { resetIdCounter(); // remove listeners - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEventId' does not exist on type... Remove this comment to see the full error message + const scheduledEventId = this.props.scheduledEventId; socket.removeListener( `addScheduledEventInternalNote-${scheduledEventId}` @@ -59,7 +59,7 @@ class ScheduledEventDetail extends Component { } tabSelected = (index: $TSFixMe) => { const tabSlider = document.getElementById('tab-slider'); - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + tabSlider.style.transform = `translate(calc(${tabSlider.offsetWidth}px*${index}), 0px)`; }; @@ -70,21 +70,21 @@ class ScheduledEventDetail extends Component { componentDidUpdate(prevProps: $TSFixMe) { if ( String(prevProps.scheduledEventId) !== - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEventId' does not exist on type... Remove this comment to see the full error message + String(this.props.scheduledEventId) ) { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchScheduledEventNotesInternal' does n... Remove this comment to see the full error message + fetchScheduledEventNotesInternal, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateScheduledEventNoteInvestigationSuc... Remove this comment to see the full error message + updateScheduledEventNoteInvestigationSuccess, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateScheduledEventNoteInternalSuccess'... Remove this comment to see the full error message + updateScheduledEventNoteInternalSuccess, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteScheduledEventNoteSuccess' does no... Remove this comment to see the full error message + deleteScheduledEventNoteSuccess, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'createScheduledEventNoteSuccess' does no... Remove this comment to see the full error message + createScheduledEventNoteSuccess, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEventId' does not exist on type... Remove this comment to see the full error message + scheduledEventId, } = this.props; // fetch scheduled event notes @@ -93,7 +93,7 @@ class ScheduledEventDetail extends Component { socket.emit('schedule_switch', scheduledEventId); fetchScheduledEventNotesInternal( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.projectId, scheduledEventId, this.limit, @@ -128,37 +128,37 @@ class ScheduledEventDetail extends Component { } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeProjectId' does not exist on type ... Remove this comment to see the full error message + if (prevProps.activeProjectId !== this.props.activeProjectId) { // navigate back to main section - // @ts-expect-error ts-migrate(2339) FIXME: Property 'history' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.history.push( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProject.slug}/scheduledEvents` ); } } ready = () => { resetIdCounter(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEventSlug' does not exist on ty... Remove this comment to see the full error message + if (this.props.scheduledEventSlug) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchScheduledEvent' does not exist on t... Remove this comment to see the full error message + const { fetchScheduledEvent } = this.props; //fetch scheduledEvent with slug fetchScheduledEvent( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEventSlug' does not exist on ty... Remove this comment to see the full error message + this.props.scheduledEventSlug ); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEventId' does not exist on type... Remove this comment to see the full error message + if (this.props.scheduledEventId) { fetchScheduledEventNotesInternal( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEventId' does not exist on type... Remove this comment to see the full error message + this.props.scheduledEventId, this.limit, 0, @@ -169,21 +169,21 @@ class ScheduledEventDetail extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message + requesting, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEvent' does not exist on type '... Remove this comment to see the full error message + scheduledEvent, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'scheduledEventId' does not exist on type... Remove this comment to see the full error message + scheduledEventId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'internalNotesList' does not exist on typ... Remove this comment to see the full error message + internalNotesList, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorList' does not exist on type 'Rea... Remove this comment to see the full error message + monitorList, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const eventName = scheduledEvent ? scheduledEvent.name : ''; @@ -196,7 +196,7 @@ class ScheduledEventDetail extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} />
@@ -59,7 +59,7 @@ class Settings extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Settings.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, @@ -68,7 +68,7 @@ Settings.propTypes = { switchToProjectViewerNav: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Settings.displayName = 'Settings'; const mapStateToProps = (state: $TSFixMe) => { diff --git a/dashboard/src/pages/SmsTemplates.tsx b/dashboard/src/pages/SmsTemplates.tsx index 1277e532dd..3328c5fc18 100755 --- a/dashboard/src/pages/SmsTemplates.tsx +++ b/dashboard/src/pages/SmsTemplates.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { bindActionCreators } from 'redux'; import SmsTemplatesBox from '../components/smsTemplates/SmsTemplatesBox'; @@ -15,14 +15,14 @@ import AdvancedIncidentNotification from '../components/settings/AdvancedInciden class SmsTemplates extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } ready = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getSmsTemplates' does not exist on type ... Remove this comment to see the full error message + this.props.getSmsTemplates(this.props.currentProject._id); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getSmtpConfig' does not exist on type 'R... Remove this comment to see the full error message + this.props.getSmtpConfig(this.props.currentProject._id); }; @@ -32,7 +32,7 @@ class SmsTemplates extends Component { componentDidUpdate(prevProps: $TSFixMe) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + prevProps?.currentProject?._id !== this.props?.currentProject?._id ) { this.ready(); @@ -41,11 +41,11 @@ class SmsTemplates extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const projectName = currentProject ? currentProject.name : ''; @@ -57,11 +57,11 @@ class SmsTemplates extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> @@ -74,7 +74,7 @@ class SmsTemplates extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + SmsTemplates.propTypes = { getSmsTemplates: PropTypes.func.isRequired, currentProject: PropTypes.object.isRequired, @@ -94,7 +94,7 @@ const mapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + SmsTemplates.displayName = 'SmsTemplates'; export default connect(mapStateToProps, mapDispatchToProps)(SmsTemplates); diff --git a/dashboard/src/pages/Sso.tsx b/dashboard/src/pages/Sso.tsx index 67dc3e0a6c..2aecedd953 100644 --- a/dashboard/src/pages/Sso.tsx +++ b/dashboard/src/pages/Sso.tsx @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message + import { PropTypes } from 'prop-types'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { User, PricingPlan } from '../config'; @@ -13,10 +13,10 @@ import { history } from '../store'; class SsoPage extends Component { componentDidMount() { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string | null' is not assignable... Remove this comment to see the full error message + const currentProject = JSON.parse(User.getProject()); const isScalePlan = currentProject?.stripePlanId - // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'. + ? PricingPlan.getPlanById(currentProject.stripePlanId).category === 'Scale' : false; @@ -26,11 +26,11 @@ class SsoPage extends Component { } render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const projectName = currentProject ? currentProject.name : ''; @@ -42,23 +42,23 @@ class SsoPage extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> - // @ts-expect-error ts-migrate(2322) FIXME: Type '{projectId: any; }' is not assignable to ty... Remove this comment to see the full error message + ); } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + SsoPage.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, @@ -67,7 +67,7 @@ SsoPage.propTypes = { switchToProjectViewerNav: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + SsoPage.displayName = 'SsoPage'; const mapStateToProps = (state: $TSFixMe) => { diff --git a/dashboard/src/pages/StatusPage.tsx b/dashboard/src/pages/StatusPage.tsx index 08e16bbfa4..f21a5cc674 100755 --- a/dashboard/src/pages/StatusPage.tsx +++ b/dashboard/src/pages/StatusPage.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import ShouldRender from '../components/basic/ShouldRender'; import Setting from '../components/status-page/Setting'; @@ -32,12 +32,12 @@ import CustomStyles from '../components/status-page/CustomStyles'; import EmbeddedBubble from '../components/status-page/EmbeddedBubble'; import BreadCrumbItem from '../components/breadCrumb/BreadCrumbItem'; import getParentRoute from '../utils/getParentRoute'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Tab, Tabs, TabList, TabPanel, resetIdCounter } from 'react-tabs'; import Themes from '../components/status-page/Themes'; import StatusPageSubscriber from '../components/status-page/StatusPageSubscriber'; import Announcements from '../components/status-page/Announcements'; -// @ts-expect-error ts-migrate(2613) FIXME: Module '"/home/nawazdhandala/Projects/OneUptime/ap... Remove this comment to see the full error message + import StatusPageCategory from '../components/status-page/StatusPageCategory'; import { fetchAllStatusPageCategories } from '../actions/statusPageCategory'; import MonitorsWithCategory from '../components/status-page/MonitorsWithCategory'; @@ -54,7 +54,7 @@ class StatusPage extends Component { const tabSlider = document.getElementById('tab-slider'); setTimeout(() => { - // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'. + tabSlider.style.transform = `translate(calc(${tabSlider.offsetWidth}px*${index}), 0px)`; }); this.setState({ @@ -63,30 +63,30 @@ class StatusPage extends Component { }; async componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const projectId = this.props.projectId && this.props.projectId; const statusPageSlug = history.location.pathname .split('status-page/')[1] .split('/')[0]; if (projectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectStatusPage' does not exist o... Remove this comment to see the full error message + await this.props.fetchProjectStatusPage(projectId); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSubProjectStatusPages' does not exi... Remove this comment to see the full error message + await this.props.fetchSubProjectStatusPages(projectId); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchComponents' does not exist on type ... Remove this comment to see the full error message + this.props.fetchComponents({ projectId }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitors' does not exist on type 'R... Remove this comment to see the full error message + this.props.fetchMonitors(projectId); } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + if (!this.props.statusPage.status._id) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + this.props.statusPage.subProjectStatusPages && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + this.props.statusPage.subProjectStatusPages.length > 0 ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + const { subProjectStatusPages } = this.props.statusPage; subProjectStatusPages.forEach((subProject: $TSFixMe) => { const statusPages = subProject.statusPages; @@ -94,7 +94,7 @@ class StatusPage extends Component { (page: $TSFixMe) => page.slug === statusPageSlug ); if (statusPage) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchStatusPage' does not exist on type... Remove this comment to see the full error message + this.props.switchStatusPage(statusPage); } }); @@ -107,21 +107,21 @@ class StatusPage extends Component { async componentDidUpdate(prevProps: $TSFixMe) { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + prevProps.statusPage.status._id !== this.props.statusPage.status._id ) { this.tabSelected(0); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + if (this.props.statusPage.status.projectId) { const projectId = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + this.props.statusPage.status.projectId._id || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + this.props.statusPage.status.projectId; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + const statusPageId = this.props.statusPage.status._id; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchAllStatusPageCategories' does not e... Remove this comment to see the full error message + this.props.fetchAllStatusPageCategories({ projectId, statusPageId, @@ -131,32 +131,32 @@ class StatusPage extends Component { } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + if (prevProps.projectId !== this.props.projectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + if (!this.props.statusPage.status._id) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const projectId = this.props.projectId && this.props.projectId; const statusPageSlug = history.location.pathname .split('status-page/')[1] .split('/')[0]; if (projectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectStatusPage' does not exist o... Remove this comment to see the full error message + await this.props.fetchProjectStatusPage(projectId); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSubProjectStatusPages' does not exi... Remove this comment to see the full error message + await this.props.fetchSubProjectStatusPages(projectId); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchComponents' does not exist on type ... Remove this comment to see the full error message + this.props.fetchComponents({ projectId: projectId }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitors' does not exist on type 'R... Remove this comment to see the full error message + this.props.fetchMonitors(projectId); } if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + this.props.statusPage.subProjectStatusPages && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + this.props.statusPage.subProjectStatusPages.length > 0 ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + const { subProjectStatusPages } = this.props.statusPage; subProjectStatusPages.forEach((subProject: $TSFixMe) => { const statusPages = subProject.statusPages; @@ -164,7 +164,7 @@ class StatusPage extends Component { (page: $TSFixMe) => page.slug === statusPageSlug ); if (statusPage) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchStatusPage' does not exist on type... Remove this comment to see the full error message + this.props.switchStatusPage(statusPage); } }); @@ -172,12 +172,12 @@ class StatusPage extends Component { } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeProjectId' does not exist on type ... Remove this comment to see the full error message + if (prevProps.activeProjectId !== this.props.activeProjectId) { // navigate back to the parent section - // @ts-expect-error ts-migrate(2339) FIXME: Property 'history' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.history.push( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + `/dashboard/project/${this.props.currentProject.slug}/status-pages` ); } @@ -190,10 +190,10 @@ class StatusPage extends Component { const monitor = monitors[i]; if (!monitor.monitor) monitorError = 'Please select a monitor.'; else { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + if (selectedMonitor[monitor.monitor]) monitorError = 'Only unique monitors are allowed.'; - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + selectedMonitor[monitor.monitor] = true; } @@ -205,7 +205,7 @@ class StatusPage extends Component { }; updateMonitor = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'allStatusPageCategories' does not exist ... Remove this comment to see the full error message + const { allStatusPageCategories, formState, statusPage } = this.props; const { status } = statusPage; const { projectId } = status; @@ -219,16 +219,16 @@ class StatusPage extends Component { monitors.push(...values.monitors); values.monitors.forEach((monitorObj: $TSFixMe) => { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + if (!groupedMonitors[monitorObj.statusPageCategory]) { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + groupedMonitors[monitorObj.statusPageCategory] = [ monitorObj, ]; } else { - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + groupedMonitors[monitorObj.statusPageCategory] = [ - // @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + ...groupedMonitors[monitorObj.statusPageCategory], monitorObj, ]; @@ -239,16 +239,16 @@ class StatusPage extends Component { if (!this.validateMonitors(monitors)) { this.props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateStatusPageMonitors' does not exist... Remove this comment to see the full error message + .updateStatusPageMonitors(projectId._id || projectId, { _id: status._id, monitors, groupedMonitors, }) .then(() => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectStatusPage' does not exist o... Remove this comment to see the full error message + this.props.fetchProjectStatusPage( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + this.props.currentProject._id, true, 0, @@ -260,19 +260,19 @@ class StatusPage extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + statusPage: { status }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'loadingCategories' does not exist on typ... Remove this comment to see the full error message + loadingCategories, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'allStatusPageCategories' does not exist ... Remove this comment to see the full error message + allStatusPageCategories, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeProjectId' does not exist on type ... Remove this comment to see the full error message + activeProjectId, } = this.props; const pageName = status ? status.name : null; @@ -291,11 +291,11 @@ class StatusPage extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> @@ -383,7 +383,7 @@ class StatusPage extends Component {
@@ -405,7 +405,7 @@ class StatusPage extends Component { subProjectId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + .subProjectId } > @@ -421,7 +421,7 @@ class StatusPage extends Component { subProjectId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + .subProjectId } key={ @@ -436,7 +436,7 @@ class StatusPage extends Component { monitors={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitors' does not exist on type 'Readon... Remove this comment to see the full error message + .monitors } allStatusPageCategories={ @@ -457,7 +457,7 @@ class StatusPage extends Component { subProjectId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + .subProjectId } /> @@ -493,7 +493,7 @@ class StatusPage extends Component { if={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + .statusPage .monitors .error || @@ -514,7 +514,7 @@ class StatusPage extends Component { > {this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + .statusPage .monitors .error || @@ -537,7 +537,7 @@ class StatusPage extends Component { disabled={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + .statusPage .monitors .requesting @@ -550,7 +550,7 @@ class StatusPage extends Component { > {!this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + .statusPage .monitors .requesting && ( @@ -561,7 +561,7 @@ class StatusPage extends Component { )} {this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + .statusPage .monitors .requesting && ( @@ -579,7 +579,7 @@ class StatusPage extends Component {
@@ -604,7 +604,7 @@ class StatusPage extends Component {
@@ -633,7 +633,7 @@ class StatusPage extends Component { subProjectId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + .subProjectId } > @@ -672,7 +672,7 @@ class StatusPage extends Component { subProjectId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + .subProjectId } > @@ -691,11 +691,11 @@ class StatusPage extends Component {
@@ -726,7 +726,7 @@ class StatusPage extends Component { statusPageId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + .statusPage .status ._id @@ -734,7 +734,7 @@ class StatusPage extends Component { subProjectId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + .subProjectId } projectId={ @@ -753,7 +753,7 @@ class StatusPage extends Component { subProjectId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + .subProjectId } > @@ -761,13 +761,13 @@ class StatusPage extends Component { match={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'match' does not exist on type 'Readonly<... Remove this comment to see the full error message + .match } subProjectId={ this .props - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectId' does not exist on type 'Re... Remove this comment to see the full error message + .subProjectId } /> @@ -778,7 +778,7 @@ class StatusPage extends Component { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'tutorialStat' does not exist on type 'Re... Remove this comment to see the full error message + 1) { projectId = User.getActiveSubProjectId(); } else if (!projectId) { @@ -68,11 +68,11 @@ function TeamMemberProfile({ name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> diff --git a/dashboard/src/pages/TeamMembers.tsx b/dashboard/src/pages/TeamMembers.tsx index b3e5b0d50a..741f0e3796 100755 --- a/dashboard/src/pages/TeamMembers.tsx +++ b/dashboard/src/pages/TeamMembers.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { subProjectTeamLoading, @@ -10,7 +10,7 @@ import { } from '../actions/team'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message + import { v4 as uuidv4 } from 'uuid'; import { openModal, closeModal } from '../actions/modal'; import TeamMemberProjectBox from '../components/team/TeamMemberProjectBox'; @@ -87,7 +87,7 @@ const LoadedTeam = (props: $TSFixMe) => { projectTeamMembers && projectTeamMembers.teamMembers ? ( any' is not assignable to type 'Key | ... Remove this comment to see the full error message + key={() => uuidv4()} >
@@ -121,7 +121,7 @@ const LoadedTeam = (props: $TSFixMe) => { openModal={props.openModal} pages={pages} membersPerPage={membersPerPage} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ paginate: any; canPaginateBackward: boolea... Remove this comment to see the full error message + subProjects={subProjects} allTeamLength={ team.subProjectTeamMembers.length @@ -174,30 +174,30 @@ class TeamApp extends Component { } componentDidMount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeProjectId' does not exist on type ... Remove this comment to see the full error message + if (this.props.activeProjectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectTeamLoading' does not exist on... Remove this comment to see the full error message + this.props.subProjectTeamLoading(this.props.activeProjectId); } } componentDidUpdate(prevProps: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeProjectId' does not exist on type ... Remove this comment to see the full error message + if (prevProps.activeProjectId !== this.props.activeProjectId) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjectTeamLoading' does not exist on... Remove this comment to see the full error message + this.props.subProjectTeamLoading(this.props.activeProjectId); } } componentWillUnmount() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + this.props.paginate('reset'); } handleKeyBoard = (e: $TSFixMe) => { switch (e.key) { case 'Escape': - // @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message + this.props.closeModal({ id: this.state.inviteModalId }); return true; default: @@ -207,16 +207,16 @@ class TeamApp extends Component { render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'team' does not exist on type 'Readonly<{... Remove this comment to see the full error message + team: { teamLoading, teamMembers, pages }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'inviteModalId' does not exist on type 'R... Remove this comment to see the full error message + const { inviteModalId } = this.state; const projectName = currentProject ? currentProject.name : ''; const projectId = currentProject ? currentProject._id : ''; @@ -228,7 +228,7 @@ class TeamApp extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> @@ -255,17 +255,17 @@ class TeamApp extends Component { header={this.getTableHeaders()} {...this.props} pages={pages} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message + paginate={this.props.paginate} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'subProjects' does not exist on type 'Rea... Remove this comment to see the full error message + subProjects={this.props.subProjects} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ pages: any; paginate: any; subProjects: an... Remove this comment to see the full error message + currentProjectId={ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'activeProjectId' does not exist on type ... Remove this comment to see the full error message + this.props.activeProjectId } parent={pathname} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'modalList' does not exist on type 'Reado... Remove this comment to see the full error message + modalList={this.props.modalList} /> )} @@ -279,7 +279,7 @@ class TeamApp extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + TeamApp.propTypes = { team: PropTypes.object.isRequired, subProjectTeamLoading: PropTypes.func.isRequired, @@ -329,7 +329,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( dispatch ); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + TeamApp.displayName = 'TeamMembers'; export default connect(mapStateToProps, mapDispatchToProps)(TeamApp); diff --git a/dashboard/src/pages/WebhookSettings.tsx b/dashboard/src/pages/WebhookSettings.tsx index 84b8b3d355..e0e123edba 100644 --- a/dashboard/src/pages/WebhookSettings.tsx +++ b/dashboard/src/pages/WebhookSettings.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import { bindActionCreators } from 'redux'; import { getSmsTemplates, getSmtpConfig } from '../actions/smsTemplates'; @@ -13,19 +13,19 @@ import AdvancedIncidentNotification from '../components/settings/AdvancedInciden class WebhookSettings extends Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'icon' does not exist on type 'Readonly<{... Remove this comment to see the full error message + icon, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentProject' does not exist on type '... Remove this comment to see the full error message + currentProject, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'switchToProjectViewerNav' does not exist... Remove this comment to see the full error message + switchToProjectViewerNav, } = this.props; const projectName = currentProject ? currentProject.name : ''; @@ -38,11 +38,11 @@ class WebhookSettings extends Component { name={projectName} projectId={projectId} slug={currentProject ? currentProject.slug : null} - // @ts-expect-error ts-migrate(2322) FIXME: Type '{ route: string; name: any; projectId: any; ... Remove this comment to see the full error message + switchToProjectViewerNav={switchToProjectViewerNav} /> { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + WebhookSettings.displayName = 'WebhookSettings'; export default connect(mapStateToProps, mapDispatchToProps)(WebhookSettings); diff --git a/dashboard/src/pages/WebsiteMonitorIssues.tsx b/dashboard/src/pages/WebsiteMonitorIssues.tsx index 8a96141eda..463030e002 100755 --- a/dashboard/src/pages/WebsiteMonitorIssues.tsx +++ b/dashboard/src/pages/WebsiteMonitorIssues.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import PropTypes from 'prop-types'; import { fetchMonitorIssue } from '../actions/monitor'; @@ -56,7 +56,7 @@ WebsiteIssuesBox.propTypes = { class WebsiteMonitorIssues extends React.Component { constructor(props: $TSFixMe) { super(props); - // @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message + this.props = props; } componentDidMount() { @@ -65,9 +65,9 @@ class WebsiteMonitorIssues extends React.Component { componentDidUpdate(prevProps: $TSFixMe) { if ( String(prevProps.componentSlug) !== - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentSlug' does not exist on type 'R... Remove this comment to see the full error message + String(this.props.componentSlug) || - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + prevProps.projectId !== this.props.projectId ) { this.ready(); @@ -75,22 +75,22 @@ class WebsiteMonitorIssues extends React.Component { } ready = () => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'componentSlug' does not exist on type 'R... Remove this comment to see the full error message + const { componentSlug, fetchComponent, projectId } = this.props; if (projectId && componentSlug) { fetchComponent(projectId, componentSlug); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchMonitorIssue' does not exist on typ... Remove this comment to see the full error message + this.props.fetchMonitorIssue( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'match' does not exist on type 'Readonly<... Remove this comment to see the full error message + this.props.match.params.issueId ); } }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorState' does not exist on type 'Re... Remove this comment to see the full error message + const { monitorState } = this.props; let variable; @@ -400,11 +400,11 @@ class WebsiteMonitorIssues extends React.Component { ); } const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message + location: { pathname }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'component' does not exist on type 'Reado... Remove this comment to see the full error message + component, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitor' does not exist on type 'Readonl... Remove this comment to see the full error message + monitor, } = this.props; const componentName = @@ -421,9 +421,9 @@ class WebsiteMonitorIssues extends React.Component { ? monitorState.monitorIssue.url : 'URL'; - // @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 1. + const monitorDetailRoute = getParentRoute(pathname); - // @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 1. + const componentMonitorsRoute = getParentRoute(monitorDetailRoute); return ( @@ -501,7 +501,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => { ); }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + WebsiteMonitorIssues.propTypes = { fetchMonitorIssue: PropTypes.func, fetchComponent: PropTypes.func, @@ -520,7 +520,7 @@ WebsiteMonitorIssues.propTypes = { projectId: PropTypes.string, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + WebsiteMonitorIssues.displayName = 'WebsiteMonitorIssues'; export default connect( diff --git a/dashboard/src/pages/base/index.tsx b/dashboard/src/pages/base/index.tsx index 0fac10e70c..d0a8e3e0e6 100644 --- a/dashboard/src/pages/base/index.tsx +++ b/dashboard/src/pages/base/index.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import Fade from 'react-awesome-reveal/Fade'; import PropTypes from 'prop-types'; import ShouldRender from '../../components/basic/ShouldRender'; @@ -28,30 +28,30 @@ class Page extends Component { } goToPageInProject(pathName: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + const { projectId } = this.props; this.goToPage(`/dashboard/${projectId}/${pathName}`); } goToPage(pathName: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'history' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.history.push(pathName); } renderCommon(children: $TSFixMe) { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message + project, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'friendlyPageName' does not exist on type... Remove this comment to see the full error message + friendlyPageName, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pagePath' does not exist on type 'Readon... Remove this comment to see the full error message + pagePath, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showTutorial' does not exist on type 'Re... Remove this comment to see the full error message + showTutorial, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'pageName' does not exist on type 'Readon... Remove this comment to see the full error message + pageName, } = this.props; @@ -102,7 +102,7 @@ export const defaultMapStateToProps = (state: $TSFixMe) => { }; }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'defaultPropTypes' does not exist on type... Remove this comment to see the full error message + Page.defaultPropTypes = { projectId: PropTypes.string, subProjectId: PropTypes.string, @@ -127,13 +127,13 @@ Page.defaultPropTypes = { showTutorial: PropTypes.bool, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + Page.propTypes = { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'defaultPropTypes' does not exist on type... Remove this comment to see the full error message + ...Page.defaultPropTypes, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + Page.displayName = 'Page'; export default Page; diff --git a/dashboard/src/pages/status-page/list.tsx b/dashboard/src/pages/status-page/list.tsx index f11c6b363c..ea9a824e68 100644 --- a/dashboard/src/pages/status-page/list.tsx +++ b/dashboard/src/pages/status-page/list.tsx @@ -21,13 +21,13 @@ class StatusPages extends Page { }); } - componentDidMount() {} + componentDidMount() { } render() { return this.renderCommon( <> {}} - onPreviousClicked={() => {}} + onNextClicked={() => { }} + onPreviousClicked={() => { }} totalItemsCount={0} friendlyName="Status Page" friendlyNamePlural="Status Pages" @@ -106,13 +106,13 @@ function mapStateToProps(state: $TSFixMe) { }; } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + StatusPages.propTypes = { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'defaultPropTypes' does not exist on type... Remove this comment to see the full error message + ...Page.defaultPropTypes, }; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + StatusPages.displayName = 'StatusPages'; export default connect(mapStateToProps, mapDispatchToProps)(StatusPages); diff --git a/home/package.json b/home/package.json index 4bf776ca92..34b23e4128 100755 --- a/home/package.json +++ b/home/package.json @@ -4,7 +4,7 @@ "scripts": { "preinstall": "npx npm-force-resolutions || echo 'No package-lock.json file. Skipping force resolutions'", "start": "ts-node index.ts", - "build": "tsc", + "compile": "tsc", "dev": "cross-env NODE_ENV=development ts-node-dev --inspect=0.0.0.0 index.ts", "test": "echo 'no tests'", "lighthouse-test": "jest --forceExit lighthouse-tests/test/index.test.js --env=node", diff --git a/probe/package.json b/probe/package.json index 9853cb36bf..84d7bb01b1 100755 --- a/probe/package.json +++ b/probe/package.json @@ -6,7 +6,7 @@ "scripts": { "preinstall": "npx npm-force-resolutions || echo 'No package-lock.json file. Skipping force resolutions'", "start": "ts-node index.ts", - "build": "tsc", + "compile": "tsc", "dev": "cross-env NODE_ENV=development ts-node-dev --inspect=0.0.0.0 --max-http-header-size=80000 index.ts", "test": "echo 'no tests'", "audit": "npm audit --audit-level=low", diff --git a/script-runner/package.json b/script-runner/package.json index 30293594df..f050d9877c 100644 --- a/script-runner/package.json +++ b/script-runner/package.json @@ -5,7 +5,7 @@ "main": "index.ts", "scripts": { "start": "ts-node index.ts", - "build": "tsc", + "compile": "tsc", "dev": "cross-env NODE_ENV=development ts-node-dev --inspect=0.0.0.0 index.ts", "test": "echo \"Error: no test specified\" && exit 1", "audit": "npm audit --audit-level=low" diff --git a/status-page/src/App.tsx b/status-page/src/App.tsx index 8a6bf6799b..8a5900d03e 100755 --- a/status-page/src/App.tsx +++ b/status-page/src/App.tsx @@ -6,7 +6,7 @@ import { Route, Switch, Redirect, -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + } from 'react-router-dom'; import { User } from './config'; import queryString from 'query-string'; diff --git a/status-page/src/components/Announcement.tsx b/status-page/src/components/Announcement.tsx index 64247f0a64..1f4db785a2 100644 --- a/status-page/src/components/Announcement.tsx +++ b/status-page/src/components/Announcement.tsx @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message + import { Translate } from 'react-auto-translate'; import PropTypes from 'prop-types'; import { getAnnouncements } from '../actions/status'; @@ -22,9 +22,9 @@ class Announcement extends Component { handleRouting = (announcementSlug: $TSFixMe) => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'history' does not exist on type 'Readonl... Remove this comment to see the full error message + history, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + statusPage: { slug }, } = this.props; history.push(`/status-page/${slug}/announcement/${announcementSlug}`); @@ -32,9 +32,9 @@ class Announcement extends Component { addMore = async () => { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getAnnouncements' does not exist on type... Remove this comment to see the full error message + getAnnouncements, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPage' does not exist on type 'Read... Remove this comment to see the full error message + statusPage: { projectId, _id }, } = this.props; this.limit += this.counter; @@ -42,13 +42,13 @@ class Announcement extends Component { }; render() { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'announcement' does not exist on type 'Re... Remove this comment to see the full error message + const { announcement, monitorState } = this.props; return ( <> {announcement && ( <> - // @ts-expect-error ts-migrate(2339) FIXME: Property 'theme' does not exist on type 'Readonly<... Remove this comment to see the full error message + {this.props.theme ? (
- {} + { } { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchAnnouncementLogs' does not exist on... Remove this comment to see the full error message + fetchAnnouncementLogs, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message + projectId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusPageId' does not exist on type 'Re... Remove this comment to see the full error message + statusPageId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logs' does not exist on type 'Readonly<{... Remove this comment to see the full error message + logs, } = this.props; let { limit } = this.state; @@ -32,13 +32,13 @@ class AnnouncementLogs extends Component { }; render() { const { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'theme' does not exist on type 'Readonly<... Remove this comment to see the full error message + theme, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'logs' does not exist on type 'Readonly<{... Remove this comment to see the full error message + logs: { announcementLogs, limit, count }, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message + error, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorState' does not exist on type 'Re... Remove this comment to see the full error message + monitorState, } = this.props; return <> @@ -225,7 +225,7 @@ class AnnouncementLogs extends Component {
    {announcementLogs && - announcementLogs.length > 0 ? ( + announcementLogs.length > 0 ? ( announcementLogs.map( (log: $TSFixMe, index: $TSFixMe) => { return ( @@ -402,10 +402,10 @@ class AnnouncementLogs extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + AnnouncementLogs.displayName = 'AnnouncementLogs'; -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + AnnouncementLogs.propTypes = { theme: PropTypes.oneOfType([ PropTypes.string, diff --git a/status-page/src/components/BlockChart.tsx b/status-page/src/components/BlockChart.tsx index e191a2bf20..a6f08c3661 100755 --- a/status-page/src/components/BlockChart.tsx +++ b/status-page/src/components/BlockChart.tsx @@ -18,56 +18,56 @@ class BlockChart extends Component { } requestday = (need: $TSFixMe, date: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'showIncidentCard' does not exist on type... Remove this comment to see the full error message + this.props.showIncidentCard(false); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'theme' does not exist on type 'Readonly<... Remove this comment to see the full error message + const theme = this.props.theme ? true : false; if (need) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getStatusPageIndividualNote' does not ex... Remove this comment to see the full error message + this.props.getStatusPageIndividualNote( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusData' does not exist on type 'Read... Remove this comment to see the full error message + this.props.statusData.projectId._id, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.monitorId, date, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorName' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.monitorName, need, theme ); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.time && this.props.time.emptytime) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'notmonitoredDays' does not exist on type... Remove this comment to see the full error message + this.props.notmonitoredDays( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.monitorId, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.time.emptytime, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorName' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.monitorName, 'No data available for this date' ); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'notmonitoredDays' does not exist on type... Remove this comment to see the full error message + this.props.notmonitoredDays( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.monitorId, date, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorName' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.monitorName, 'No incidents yet' ); } } - // @ts-expect-error ts-migrate(2339) FIXME: Property 'getIndividualEvent' does not exist on ty... Remove this comment to see the full error message + this.props.getIndividualEvent( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusData' does not exist on type 'Read... Remove this comment to see the full error message + this.props.statusData.projectId._id, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorId' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.monitorId, date, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'monitorName' does not exist on type 'Rea... Remove this comment to see the full error message + this.props.monitorName, theme ); @@ -80,28 +80,26 @@ class BlockChart extends Component { let need = false; let backgroundColor; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusData' does not exist on type 'Read... Remove this comment to see the full error message + const { colors } = this.props.statusData; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.time && this.props.time.status) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.time.status === 'disabled') { let disabledTimeInMinutes, disabledtime; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.time.disabledTime < 60) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + disabledTimeInMinutes = this.props.time.disabledTime; - disabledtime = `${disabledTimeInMinutes} second${ - disabledTimeInMinutes === 1 ? '' : 's' - }`; + disabledtime = `${disabledTimeInMinutes} second${disabledTimeInMinutes === 1 ? '' : 's' + }`; } else { disabledTimeInMinutes = Math.floor( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.time.disabledTime / 60 ); - disabledtime = `${disabledTimeInMinutes} minute${ - disabledTimeInMinutes === 1 ? '' : 's' - }`; + disabledtime = `${disabledTimeInMinutes} minute${disabledTimeInMinutes === 1 ? '' : 's' + }`; } if (disabledTimeInMinutes > 60) { @@ -111,30 +109,28 @@ class BlockChart extends Component { } bar = 'bar down'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + title = moment(this.props.time.date).format('LL'); title1 = `Disabled for ${disabledtime}`; need = true; if (colors) backgroundColor = `rgba(${colors.disabled.r}, ${colors.disabled.g}, ${colors.disabled.b}, ${colors.disabled.a})`; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + } else if (this.props.time.status === 'offline') { let downTimeInMinutes, downtime; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.time.downTime < 60) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + downTimeInMinutes = this.props.time.downTime; - downtime = `${downTimeInMinutes} second${ - downTimeInMinutes === 1 ? '' : 's' - }`; + downtime = `${downTimeInMinutes} second${downTimeInMinutes === 1 ? '' : 's' + }`; } else { downTimeInMinutes = Math.floor( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.time.downTime / 60 ); - downtime = `${downTimeInMinutes} minute${ - downTimeInMinutes === 1 ? '' : 's' - }`; + downtime = `${downTimeInMinutes} minute${downTimeInMinutes === 1 ? '' : 's' + }`; } if (downTimeInMinutes > 60) { @@ -144,31 +140,29 @@ class BlockChart extends Component { } bar = 'bar down'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + title = moment(this.props.time.date).format('LL'); title1 = `Down for ${downtime}`; need = true; if (colors) backgroundColor = `rgba(${colors.downtime.r}, ${colors.downtime.g}, ${colors.downtime.b}, ${colors.downtime.a})`; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + } else if (this.props.time.status === 'degraded') { let degradedTimeInMinutes; let degradedtime; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.time.degradedTime < 60) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + degradedTimeInMinutes = this.props.time.degradedTime; - degradedtime = `${degradedTimeInMinutes} second${ - degradedTimeInMinutes === 1 ? '' : 's' - }`; + degradedtime = `${degradedTimeInMinutes} second${degradedTimeInMinutes === 1 ? '' : 's' + }`; } else { degradedTimeInMinutes = Math.floor( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.props.time.degradedTime / 60 ); - degradedtime = `${degradedTimeInMinutes} minute${ - degradedTimeInMinutes === 1 ? '' : 's' - }`; + degradedtime = `${degradedTimeInMinutes} minute${degradedTimeInMinutes === 1 ? '' : 's' + }`; } if (degradedTimeInMinutes > 60) { @@ -178,7 +172,7 @@ class BlockChart extends Component { } bar = 'bar mid'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + title = moment(this.props.time.date).format('LL'); title1 = `Degraded for ${degradedtime}`; need = true; @@ -186,7 +180,7 @@ class BlockChart extends Component { backgroundColor = `rgba(${colors.degraded.r}, ${colors.degraded.g}, ${colors.degraded.b}, ${colors.degraded.a})`; } else { bar = 'bar'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + title = moment(this.props.time.date).format('LL'); title1 = 'No downtime'; need = true; @@ -195,9 +189,9 @@ class BlockChart extends Component { } } else { bar = 'bar empty'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + title = this.props.time - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + ? moment(this.props.time.date).format('LL') : 'N/A'; title1 = '100% uptime'; @@ -209,7 +203,7 @@ class BlockChart extends Component { const extra = ' resize-style'; let style, classes, content; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'theme' does not exist on type 'Readonly<... Remove this comment to see the full error message + if (this.props.theme) { style = { outline: 'none', @@ -217,10 +211,10 @@ class BlockChart extends Component { backgroundColor === 'rgba(108, 219, 86, 1)' ? '#49c3b1' : backgroundColor === 'rgba(250, 109, 70, 1)' - ? '#FA6D46' - : backgroundColor === 'rgba(255, 222, 36, 1)' - ? '#e39f48' - : backgroundColor, + ? '#FA6D46' + : backgroundColor === 'rgba(255, 222, 36, 1)' + ? '#e39f48' + : backgroundColor, opacity: 1, width: '7px', }; @@ -228,12 +222,12 @@ class BlockChart extends Component { content = (
    - // @ts-expect-error ts-migrate(2339) FIXME: Property 'time' does not exist on type 'Readonly<{... Remove this comment to see the full error message + this.requestday(need, this.props.time.date) } >
    @@ -253,13 +247,13 @@ class BlockChart extends Component { classes = bar; content = (
    this.requestday(need, this.props.time.date)} >
    ); @@ -269,7 +263,7 @@ class BlockChart extends Component { } } -// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message + BlockChart.displayName = 'BlockChart'; const mapStateToProps = (state: $TSFixMe) => ({ @@ -286,7 +280,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators( dispatch ); -// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message + BlockChart.propTypes = { time: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), statusData: PropTypes.object, diff --git a/status-page/src/components/Collapsible/Collapsible.tsx b/status-page/src/components/Collapsible/Collapsible.tsx index 8e8fa03d42..0d84dfcd5f 100644 --- a/status-page/src/components/Collapsible/Collapsible.tsx +++ b/status-page/src/components/Collapsible/Collapsible.tsx @@ -36,14 +36,14 @@ class Collapsible extends Component { } componentDidUpdate(prevProps: $TSFixMe, prevState: $TSFixMe) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shouldOpenOnNextCycle' does not exist on... Remove this comment to see the full error message + if (this.state.shouldOpenOnNextCycle) { this.continueOpenCollapsible(); } if ( (prevState.height === 'auto' || prevState.height === 0) && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'shouldSwitchAutoOnNextCycle' does not ex... Remove this comment to see the full error message + this.state.shouldSwitchAutoOnNextCycle === true ) { window.clearTimeout(this.timeout); @@ -59,16 +59,16 @@ class Collapsible extends Component { } // If there has been a change in the open prop (controlled by accordion) - // @ts-expect-error ts-migrate(2339) FIXME: Property 'open' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (prevProps.open !== this.props.open) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'open' does not exist on type 'Readonly<{... Remove this comment to see the full error message + if (this.props.open === true) { this.openCollapsible(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onOpening' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.onOpening(); } else { this.closeCollapsible(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClosing' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.onClosing(); } } @@ -84,15 +84,13 @@ class Collapsible extends Component { this.setState({ shouldSwitchAutoOnNextCycle: true, height: innerRef.scrollHeight, - transition: `height ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'transitionCloseTime' does not exist on t... Remove this comment to see the full error message - this.props.transitionCloseTime - // @ts-expect-error ts-migrate(2339) FIXME: Property 'transitionCloseTime' does not exist on t... Remove this comment to see the full error message + transition: `height ${this.props.transitionCloseTime + ? this.props.transitionCloseTime - // @ts-expect-error ts-migrate(2339) FIXME: Property 'transitionTime' does not exist on type '... Remove this comment to see the full error message + : this.props.transitionTime - // @ts-expect-error ts-migrate(2339) FIXME: Property 'easing' does not exist on type 'Readonly... Remove this comment to see the full error message - }ms ${this.props.easing}`, + + }ms ${this.props.easing}`, inTransition: setInTransition(innerRef.scrollHeight), }); } @@ -109,7 +107,7 @@ class Collapsible extends Component { this.setState({ height: innerRef.scrollHeight, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'transitionTime' does not exist on type '... Remove this comment to see the full error message + transition: `height ${this.props.transitionTime}ms ${this.props.easing}`, isClosed: false, hasBeenOpened: true, @@ -119,30 +117,30 @@ class Collapsible extends Component { }; handleTriggerClick = (event: $TSFixMe) => { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerDisabled' does not exist on type ... Remove this comment to see the full error message + if (this.props.triggerDisabled || this.state.inTransition) { return; } event.preventDefault(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleTriggerClick' does not exist on ty... Remove this comment to see the full error message + if (this.props.handleTriggerClick) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'handleTriggerClick' does not exist on ty... Remove this comment to see the full error message + this.props.handleTriggerClick(this.props.accordionPosition); } else { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosed' does not exist on type 'Readon... Remove this comment to see the full error message + if (this.state.isClosed === true) { this.openCollapsible(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onOpening' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.onOpening(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onTriggerOpening' does not exist on type... Remove this comment to see the full error message + this.props.onTriggerOpening(); } else { this.closeCollapsible(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClosing' does not exist on type 'Reado... Remove this comment to see the full error message + this.props.onClosing(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onTriggerClosing' does not exist on type... Remove this comment to see the full error message + this.props.onTriggerClosing(); } } @@ -150,31 +148,31 @@ class Collapsible extends Component { renderNonClickableTriggerElement() { if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerSibling' does not exist on type '... Remove this comment to see the full error message + this.props.triggerSibling && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerSibling' does not exist on type '... Remove this comment to see the full error message + typeof this.props.triggerSibling === 'string' ) { return ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerSibling' does not exist on type '... Remove this comment to see the full error message + {this.props.triggerSibling} ); } else if ( - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerSibling' does not exist on type '... Remove this comment to see the full error message + this.props.triggerSibling && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerSibling' does not exist on type '... Remove this comment to see the full error message + typeof this.props.triggerSibling === 'function' ) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerSibling' does not exist on type '... Remove this comment to see the full error message + return this.props.triggerSibling(); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerSibling' does not exist on type '... Remove this comment to see the full error message + } else if (this.props.triggerSibling) { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerSibling' does not exist on type '... Remove this comment to see the full error message + return ; } return null; @@ -186,19 +184,19 @@ class Collapsible extends Component { return; } // Switch to height auto to make the container responsive - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosed' does not exist on type 'Readon... Remove this comment to see the full error message + if (!this.state.isClosed) { this.setState({ height: 'auto', - // @ts-expect-error ts-migrate(2339) FIXME: Property 'overflowWhenOpen' does not exist on type... Remove this comment to see the full error message + overflow: this.props.overflowWhenOpen, inTransition: false, }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onOpen' does not exist on type 'Readonly... Remove this comment to see the full error message + this.props.onOpen(); } else { this.setState({ inTransition: false }); - // @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message + this.props.onClose(); } }; @@ -207,114 +205,108 @@ class Collapsible extends Component { render() { const dropdownStyle = { - // @ts-expect-error ts-migrate(2339) FIXME: Property 'height' does not exist on type 'Readonly... Remove this comment to see the full error message + height: this.state.height, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'transition' does not exist on type 'Read... Remove this comment to see the full error message + WebkitTransition: this.state.transition, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'transition' does not exist on type 'Read... Remove this comment to see the full error message + msTransition: this.state.transition, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'transition' does not exist on type 'Read... Remove this comment to see the full error message + transition: this.state.transition, - // @ts-expect-error ts-migrate(2339) FIXME: Property 'overflow' does not exist on type 'Readon... Remove this comment to see the full error message + overflow: this.state.overflow, margin: '0 35px', }; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosed' does not exist on type 'Readon... Remove this comment to see the full error message + const openClass = this.state.isClosed ? 'is-closed' : 'is-open'; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerDisabled' does not exist on type ... Remove this comment to see the full error message + const disabledClass = this.props.triggerDisabled ? 'is-disabled' : ''; //If user wants different text when tray is open const trigger = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosed' does not exist on type 'Readon... Remove this comment to see the full error message + this.state.isClosed === false && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerWhenOpen' does not exist on type ... Remove this comment to see the full error message - this.props.triggerWhenOpen !== undefined - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerWhenOpen' does not exist on type ... Remove this comment to see the full error message + + this.props.triggerWhenOpen !== undefined + ? this.props.triggerWhenOpen - // @ts-expect-error ts-migrate(2339) FIXME: Property 'trigger' does not exist on type 'Readonl... Remove this comment to see the full error message + : this.props.trigger; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'contentContainerTagName' does not exist ... Remove this comment to see the full error message + const ContentContainerElement = this.props.contentContainerTagName; // If user wants a trigger wrapping element different than 'span' - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerTagName' does not exist on type '... Remove this comment to see the full error message + const TriggerElement = this.props.triggerTagName; // Don't render children until the first opening of the Collapsible if lazy rendering is enabled const children = - // @ts-expect-error ts-migrate(2339) FIXME: Property 'lazyRender' does not exist on type 'Read... Remove this comment to see the full error message + this.props.lazyRender && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'hasBeenOpened' does not exist on type 'R... Remove this comment to see the full error message - !this.state.hasBeenOpened && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosed' does not exist on type 'Readon... Remove this comment to see the full error message - this.state.isClosed && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'inTransition' does not exist on type 'Re... Remove this comment to see the full error message - !this.state.inTransition + + !this.state.hasBeenOpened && + + this.state.isClosed && + + !this.state.inTransition ? null : this.props.children; // Construct CSS classes strings - const triggerClassString = `${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'classParentString' does not exist on typ... Remove this comment to see the full error message - this.props.classParentString - }__trigger ${openClass} ${disabledClass} ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosed' does not exist on type 'Readon... Remove this comment to see the full error message - this.state.isClosed - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerClassName' does not exist on type... Remove this comment to see the full error message + const triggerClassString = `${this.props.classParentString + }__trigger ${openClass} ${disabledClass} ${this.state.isClosed + ? this.props.triggerClassName - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerOpenedClassName' does not exist o... Remove this comment to see the full error message + : this.props.triggerOpenedClassName - }`; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'classParentString' does not exist on typ... Remove this comment to see the full error message - const parentClassString = `${this.props.classParentString} ${ - // @ts-expect-error ts-migrate(2339) FIXME: Property 'isClosed' does not exist on type 'Readon... Remove this comment to see the full error message - this.state.isClosed - // @ts-expect-error ts-migrate(2339) FIXME: Property 'className' does not exist on type 'Reado... Remove this comment to see the full error message + }`; + + const parentClassString = `${this.props.classParentString} ${this.state.isClosed + ? this.props.className - // @ts-expect-error ts-migrate(2339) FIXME: Property 'openedClassName' does not exist on type ... Remove this comment to see the full error message + : this.props.openedClassName - }`; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'classParentString' does not exist on typ... Remove this comment to see the full error message + }`; + const outerClassString = `${this.props.classParentString}__contentOuter ${this.props.contentOuterClassName}`; - // @ts-expect-error ts-migrate(2339) FIXME: Property 'classParentString' does not exist on typ... Remove this comment to see the full error message + const innerClassString = `${this.props.classParentString}__contentInner ${this.props.contentInnerClassName}`; return ( { const { key } = event; if ( (key === ' ' && - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerTagName' does not exist on type '... Remove this comment to see the full error message + this.props.triggerTagName.toLowerCase() !== - 'button') || + 'button') || key === 'Enter' ) { this.handleTriggerClick(event); } }} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'tabIndex' does not exist on type 'Readon... Remove this comment to see the full error message + tabIndex={this.props.tabIndex && this.props.tabIndex} - // @ts-expect-error ts-migrate(2339) FIXME: Property 'triggerElementProps' does not exist on t... Remove this comment to see the full error message + {...this.props.triggerElementProps} >
    - // @ts-expect-error ts-migrate(2339) FIXME: Property 'statusColorStyle' does not exist on type... Remove this comment to see the full error message +
    {trigger}
    @@ -332,11 +324,11 @@ class Collapsible extends Component {