mirror of https://github.com/Siphonay/mastodon
Fix Redux types (#26899)
This commit is contained in:
parent
9ac9aca142
commit
0712cc2b99
|
@ -5,7 +5,7 @@ import { showAlertForError } from '../../actions/alerts';
|
||||||
|
|
||||||
const defaultFailSuffix = 'FAIL';
|
const defaultFailSuffix = 'FAIL';
|
||||||
|
|
||||||
export const errorsMiddleware: Middleware<Record<string, never>, RootState> =
|
export const errorsMiddleware: Middleware<unknown, RootState> =
|
||||||
({ dispatch }) =>
|
({ dispatch }) =>
|
||||||
(next) =>
|
(next) =>
|
||||||
(action: AnyAction & { skipAlert?: boolean; skipNotFound?: boolean }) => {
|
(action: AnyAction & { skipAlert?: boolean; skipNotFound?: boolean }) => {
|
||||||
|
|
|
@ -15,7 +15,7 @@ const defaultTypeSuffixes: Config['promiseTypeSuffixes'] = [
|
||||||
|
|
||||||
export const loadingBarMiddleware = (
|
export const loadingBarMiddleware = (
|
||||||
config: Config = {},
|
config: Config = {},
|
||||||
): Middleware<Record<string, never>, RootState> => {
|
): Middleware<unknown, RootState> => {
|
||||||
const promiseTypeSuffixes = config.promiseTypeSuffixes ?? defaultTypeSuffixes;
|
const promiseTypeSuffixes = config.promiseTypeSuffixes ?? defaultTypeSuffixes;
|
||||||
|
|
||||||
return ({ dispatch }) =>
|
return ({ dispatch }) =>
|
||||||
|
|
|
@ -34,10 +34,7 @@ const play = (audio: HTMLAudioElement) => {
|
||||||
void audio.play();
|
void audio.play();
|
||||||
};
|
};
|
||||||
|
|
||||||
export const soundsMiddleware = (): Middleware<
|
export const soundsMiddleware = (): Middleware<unknown, RootState> => {
|
||||||
Record<string, never>,
|
|
||||||
RootState
|
|
||||||
> => {
|
|
||||||
const soundCache: Record<string, HTMLAudioElement> = {};
|
const soundCache: Record<string, HTMLAudioElement> = {};
|
||||||
|
|
||||||
void ready(() => {
|
void ready(() => {
|
||||||
|
|
|
@ -12,5 +12,4 @@ export const createAppAsyncThunk = createAsyncThunk.withTypes<{
|
||||||
state: RootState;
|
state: RootState;
|
||||||
dispatch: AppDispatch;
|
dispatch: AppDispatch;
|
||||||
rejectValue: string;
|
rejectValue: string;
|
||||||
extra: { s: string; n: number };
|
|
||||||
}>();
|
}>();
|
||||||
|
|
Loading…
Reference in New Issue