mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-26 04:23:48 -05:00
[Glitch] Fix Redux Middleware types
Port 07635228e2b2182888850cecddd4b09756d9edbc to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
0f756eaed2
commit
297c8c37b1
@ -30,7 +30,8 @@ function isActionWithmaybeAlertParams(
|
|||||||
return isAction(action);
|
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 }) =>
|
({ dispatch }) =>
|
||||||
(next) =>
|
(next) =>
|
||||||
(action) => {
|
(action) => {
|
||||||
|
@ -51,7 +51,8 @@ const play = (audio: HTMLAudioElement) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const soundsMiddleware = (): Middleware<
|
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
|
RootState
|
||||||
> => {
|
> => {
|
||||||
const soundCache: Record<string, HTMLAudioElement> = {};
|
const soundCache: Record<string, HTMLAudioElement> = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user