Add @ts-ignore lines for strictFunctionTypes
This commit is contained in:
parent
67471638c3
commit
84d7d2ee38
|
@ -59,6 +59,7 @@ export function fetchInstance() {
|
||||||
return api(getState).get('/api/v1/instance').then(({ data: instance }: { data: Record<string, any> }) => {
|
return api(getState).get('/api/v1/instance').then(({ data: instance }: { data: Record<string, any> }) => {
|
||||||
dispatch({ type: INSTANCE_FETCH_SUCCESS, instance });
|
dispatch({ type: INSTANCE_FETCH_SUCCESS, instance });
|
||||||
if (needsNodeinfo(instance)) {
|
if (needsNodeinfo(instance)) {
|
||||||
|
// @ts-ignore: ???
|
||||||
dispatch(fetchNodeinfo()); // Pleroma < 2.1 backwards compatibility
|
dispatch(fetchNodeinfo()); // Pleroma < 2.1 backwards compatibility
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
@ -73,7 +74,9 @@ export function loadInstance() {
|
||||||
return (dispatch: AppDispatch, getState: () => RootState) => {
|
return (dispatch: AppDispatch, getState: () => RootState) => {
|
||||||
const host = getHost(getState());
|
const host = getHost(getState());
|
||||||
|
|
||||||
|
// @ts-ignore: ???
|
||||||
return dispatch(rememberInstance(host)).finally(() => {
|
return dispatch(rememberInstance(host)).finally(() => {
|
||||||
|
// @ts-ignore: ???
|
||||||
return dispatch(fetchInstance());
|
return dispatch(fetchInstance());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,6 +46,7 @@ const WhoToFollowPanel = ({ limit }: IWhoToFollowPanel) => {
|
||||||
{suggestionsToRender.map((suggestion: ImmutableMap<string, any>) => (
|
{suggestionsToRender.map((suggestion: ImmutableMap<string, any>) => (
|
||||||
<AccountContainer
|
<AccountContainer
|
||||||
key={suggestion.get('account')}
|
key={suggestion.get('account')}
|
||||||
|
// @ts-ignore: TS thinks `id` is passed to <Account>, but it isn't
|
||||||
id={suggestion.get('account')}
|
id={suggestion.get('account')}
|
||||||
actionIcon={require('@tabler/icons/icons/x.svg')}
|
actionIcon={require('@tabler/icons/icons/x.svg')}
|
||||||
actionTitle={intl.formatMessage(messages.dismissSuggestion)}
|
actionTitle={intl.formatMessage(messages.dismissSuggestion)}
|
||||||
|
|
|
@ -128,6 +128,7 @@ export const StateRecord = ImmutableRecord(
|
||||||
}, {}),
|
}, {}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// @ts-ignore: This type is fine but TS thinks it's wrong
|
||||||
const appReducer = combineReducers(reducers, StateRecord);
|
const appReducer = combineReducers(reducers, StateRecord);
|
||||||
|
|
||||||
// Clear the state (mostly) when the user logs out
|
// Clear the state (mostly) when the user logs out
|
||||||
|
|
Loading…
Reference in New Issue