[Glitch] Fix Redux Middleware types

Port 07635228e2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
main-rebase-security-fix
Renaud Chaput 2024-04-02 11:56:03 +02:00 committed by Claire
parent 0f756eaed2
commit 297c8c37b1
2 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,8 @@ function isActionWithmaybeAlertParams(
return isAction(action);
}
export const errorsMiddleware: Middleware<Record<string, never>, RootState> =
// eslint-disable-next-line @typescript-eslint/ban-types -- we need to use `{}` here to ensure the dispatch types can be merged
export const errorsMiddleware: Middleware<{}, RootState> =
({ dispatch }) =>
(next) =>
(action) => {

View File

@ -51,7 +51,8 @@ const play = (audio: HTMLAudioElement) => {
};
export const soundsMiddleware = (): Middleware<
Record<string, never>,
// eslint-disable-next-line @typescript-eslint/ban-types -- we need to use `{}` here to ensure the dispatch types can be merged
{},
RootState
> => {
const soundCache: Record<string, HTMLAudioElement> = {};