Merge branch 'bun-types' into 'develop'

bun: improve types so it runs with bun

See merge request soapbox-pub/soapbox!2658
environments/review-develop-3zknud/deployments/3755
Alex Gleason 1 year ago
commit 857c18f458
No known key found for this signature in database

@ -1,5 +1,5 @@
import { render } from '@testing-library/react'; import { render } from '@testing-library/react';
import { AxiosError } from 'axios'; import { AxiosError, AxiosHeaders } from 'axios';
import React from 'react'; import React from 'react';
import { IntlProvider } from 'react-intl'; import { IntlProvider } from 'react-intl';
@ -73,7 +73,9 @@ describe('toasts', () =>{
statusText: String(status), statusText: String(status),
status, status,
headers: {}, headers: {},
config: {}, config: {
headers: new AxiosHeaders(),
},
}); });
describe('with a 502 status code', () => { describe('with a 502 status code', () => {

@ -38,7 +38,7 @@ const CaptchaField: React.FC<ICaptchaField> = ({
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
const [captcha, setCaptcha] = useState(ImmutableMap<string, any>()); const [captcha, setCaptcha] = useState(ImmutableMap<string, any>());
const [refresh, setRefresh] = useState<NodeJS.Timer | undefined>(undefined); const [refresh, setRefresh] = useState<NodeJS.Timeout | undefined>(undefined);
const getCaptcha = () => { const getCaptcha = () => {
dispatch(fetchCaptcha()).then((response: AxiosResponse) => { dispatch(fetchCaptcha()).then((response: AxiosResponse) => {

@ -22,7 +22,7 @@ const HomeTimeline: React.FC = () => {
const features = useFeatures(); const features = useFeatures();
const instance = useInstance(); const instance = useInstance();
const polling = useRef<NodeJS.Timer | null>(null); const polling = useRef<NodeJS.Timeout | null>(null);
const isPartial = useAppSelector(state => state.timelines.get('home')?.isPartial === true); const isPartial = useAppSelector(state => state.timelines.get('home')?.isPartial === true);
const currentAccountId = useAppSelector(state => state.timelines.get('home')?.feedAccountId as string | undefined); const currentAccountId = useAppSelector(state => state.timelines.get('home')?.feedAccountId as string | undefined);

@ -50,7 +50,7 @@ export const fromLegacyColors = (soapboxConfig: SoapboxConfig): TailwindColorPal
/** Convert Soapbox Config into Tailwind colors */ /** Convert Soapbox Config into Tailwind colors */
export const toTailwind = (soapboxConfig: SoapboxConfig): SoapboxConfig => { export const toTailwind = (soapboxConfig: SoapboxConfig): SoapboxConfig => {
const colors: SoapboxColors = ImmutableMap(soapboxConfig.get('colors')); const colors: SoapboxColors = ImmutableMap(soapboxConfig.get('colors'));
const legacyColors: SoapboxColors = ImmutableMap(fromJS(fromLegacyColors(soapboxConfig))); const legacyColors = ImmutableMap(fromJS(fromLegacyColors(soapboxConfig))) as SoapboxColors;
return soapboxConfig.set('colors', legacyColors.mergeDeep(colors)); return soapboxConfig.set('colors', legacyColors.mergeDeep(colors));
}; };

Loading…
Cancel
Save