[Glitch] Fix Redux types

Port 0712cc2b99 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2497/head
Renaud Chaput 2023-09-12 12:18:19 +02:00 committed by Claire
parent 6fb5fafd28
commit c3a0d5aca3
4 changed files with 3 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import { showAlertForError } from '../../actions/alerts';
const defaultFailSuffix = 'FAIL';
export const errorsMiddleware: Middleware<Record<string, never>, RootState> =
export const errorsMiddleware: Middleware<unknown, RootState> =
({ dispatch }) =>
(next) =>
(action: AnyAction & { skipAlert?: boolean; skipNotFound?: boolean }) => {

View File

@ -15,7 +15,7 @@ const defaultTypeSuffixes: Config['promiseTypeSuffixes'] = [
export const loadingBarMiddleware = (
config: Config = {},
): Middleware<Record<string, never>, RootState> => {
): Middleware<unknown, RootState> => {
const promiseTypeSuffixes = config.promiseTypeSuffixes ?? defaultTypeSuffixes;
return ({ dispatch }) =>

View File

@ -34,10 +34,7 @@ const play = (audio: HTMLAudioElement) => {
void audio.play();
};
export const soundsMiddleware = (): Middleware<
Record<string, never>,
RootState
> => {
export const soundsMiddleware = (): Middleware<unknown, RootState> => {
const soundCache: Record<string, HTMLAudioElement> = {};
void ready(() => {

View File

@ -12,5 +12,4 @@ export const createAppAsyncThunk = createAsyncThunk.withTypes<{
state: RootState;
dispatch: AppDispatch;
rejectValue: string;
extra: { s: string; n: number };
}>();