diff --git a/app/src/reducers/notificationReducers.ts b/app/src/reducers/notificationReducers.ts index 788c6b18e6..d6b0c5902c 100644 --- a/app/src/reducers/notificationReducers.ts +++ b/app/src/reducers/notificationReducers.ts @@ -46,11 +46,13 @@ export const notifications = (state = initialState, action) => { switch (type) { case CREATE_NOTIFICATION: { const { notification, id } = payload; +// @ts-expect-error TS(2339): Property 'id' does not exist on type 'never'. if (state.notifications.filter(e => e.id === id).length > 0) { console.log("Notification with id: " + id + " already exists.") return { ...state, notifications: state.notifications.map((oldNotification) => { +// @ts-expect-error TS(2339): Property 'id' does not exist on type 'never'. if (oldNotification.id === id) { return { id: id, diff --git a/app/src/thunks/eventThunks.ts b/app/src/thunks/eventThunks.ts index ad6c407f37..e9623e2e72 100644 --- a/app/src/thunks/eventThunks.ts +++ b/app/src/thunks/eventThunks.ts @@ -467,8 +467,10 @@ export const postNewEvent = (values, metadataInfo, extendedMetadata) => async ( // Process bar notification var config = { + // @ts-expect-error TS(7006): Parameter 'id' implicitly has an 'any' type. onUploadProgress: function(progressEvent) { var percentCompleted = (progressEvent.loaded * 100) / progressEvent.total; + // @ts-expect-error TS(2554): Expected 6 arguments, but got 5. dispatch(addNotificationWithId(-42000, "success", "EVENTS_UPLOAD_STARTED", -1, { "progress": percentCompleted.toFixed(2) } )) if (percentCompleted >= 100) { dispatch(removeNotification(-42000)) diff --git a/app/src/thunks/notificationThunks.ts b/app/src/thunks/notificationThunks.ts index 451c5acca1..2267a9e601 100644 --- a/app/src/thunks/notificationThunks.ts +++ b/app/src/thunks/notificationThunks.ts @@ -11,7 +11,7 @@ import { } from "../configs/generalConfig"; // @ts-expect-error TS(7006): Parameter 'dispatch' implicitly has an 'any' type. -export const addNotification = (type, key, duration, parameter, context, id) => ( +export const addNotification = (type, key, duration, parameter, context, id?) => ( // @ts-expect-error TS(7006): Parameter 'dispatch' implicitly has an 'any' type. dispatch, // @ts-expect-error TS(7006): Parameter 'getState' implicitly has an 'any' type.