mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 22:18:06 +01:00
Fix Redux Middleware types (#29800)
This commit is contained in:
parent
a3fe82e359
commit
07635228e2
2 changed files with 4 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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> = {};
|
||||
|
|
Loading…
Reference in a new issue