Fix Redux types (#26899)

local
Renaud Chaput 8 months ago committed by GitHub
parent 9ac9aca142
commit 0712cc2b99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/javascript/mastodon/store/middlewares/errors.ts
  2. 2
      app/javascript/mastodon/store/middlewares/loading_bar.ts
  3. 5
      app/javascript/mastodon/store/middlewares/sounds.ts
  4. 1
      app/javascript/mastodon/store/typed_functions.ts

@ -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 }) => {

@ -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 }) =>

@ -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(() => {

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

Loading…
Cancel
Save