Merge branch 'bun-types' into 'develop'
bun: improve types so it runs with bun See merge request soapbox-pub/soapbox!2658
This commit is contained in:
commit
857c18f458
4 changed files with 7 additions and 5 deletions
|
@ -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', () => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue