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 2023-09-08 18:51:44 +00:00
commit 857c18f458
Nie znaleziono w bazie danych klucza dla tego podpisu
4 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

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

Wyświetl plik

@ -38,7 +38,7 @@ const CaptchaField: React.FC<ICaptchaField> = ({
const dispatch = useAppDispatch();
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 = () => {
dispatch(fetchCaptcha()).then((response: AxiosResponse) => {

Wyświetl plik

@ -22,7 +22,7 @@ const HomeTimeline: React.FC = () => {
const features = useFeatures();
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 currentAccountId = useAppSelector(state => state.timelines.get('home')?.feedAccountId as string | undefined);

Wyświetl plik

@ -50,7 +50,7 @@ export const fromLegacyColors = (soapboxConfig: SoapboxConfig): TailwindColorPal
/** Convert Soapbox Config into Tailwind colors */
export const toTailwind = (soapboxConfig: SoapboxConfig): SoapboxConfig => {
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));
};