Skip to content

Commit

Permalink
[Glitch] Fix Redux types
Browse files Browse the repository at this point in the history
Port 0712cc2 to glitch-soc

Signed-off-by: Claire <[email protected]>
  • Loading branch information
renchap authored and ClearlyClaire committed Dec 3, 2023
1 parent fcb3db9 commit fe2cf46
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/javascript/flavours/glitch/store/middlewares/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) =>
Expand Down
5 changes: 1 addition & 4 deletions app/javascript/flavours/glitch/store/middlewares/sounds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
1 change: 0 additions & 1 deletion app/javascript/flavours/glitch/store/typed_functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ export const createAppAsyncThunk = createAsyncThunk.withTypes<{
state: RootState;
dispatch: AppDispatch;
rejectValue: string;
extra: { s: string; n: number };
}>();

0 comments on commit fe2cf46

Please sign in to comment.