Skip to content

Commit

Permalink
Ignore type errors
Browse files Browse the repository at this point in the history
Missed these in the last merge. Thanks to @owi92
  • Loading branch information
Arnei committed Sep 26, 2023
1 parent c5e8de7 commit 5ae6ca6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/src/reducers/notificationReducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions app/src/thunks/eventThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion app/src/thunks/notificationThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5ae6ca6

Please sign in to comment.