Improve reducer type

This commit is contained in:
Alex Gleason 2023-06-20 21:08:44 -05:00
parent c4ad5e5d78
commit 7e83039999
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 1 additions and 2 deletions

View File

@ -24,7 +24,6 @@ const store: any = {
}, },
instance: normalizeInstance({ instance: normalizeInstance({
version: '3.4.1 (compatible; TruthSocial 1.0.0)', version: '3.4.1 (compatible; TruthSocial 1.0.0)',
software: 'TRUTHSOCIAL',
}), }),
}; };

View File

@ -187,7 +187,7 @@ const accountsSelector = createSelector(
const extendedRootReducer = ( const extendedRootReducer = (
state: InferState<typeof appReducer>, state: InferState<typeof appReducer>,
action: AnyAction, action: AnyAction,
): ReturnType<typeof rootReducer> & { accounts: ReturnType<typeof accountsSelector> } => { ): ReturnType<typeof rootReducer> => {
const extendedState = rootReducer(state, action); const extendedState = rootReducer(state, action);
return extendedState.set('accounts', accountsSelector(extendedState)); return extendedState.set('accounts', accountsSelector(extendedState));
}; };