replace ts ignores with expect errors

This commit is contained in:
Samuel Newman
2026-08-13 11:54:52 +03:00
parent 8677387c23
commit 690219692a
60 changed files with 64 additions and 113 deletions
+2 -2
View File
@@ -1006,7 +1006,7 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) {
ax.metric('init', {
initMs: Math.round(
// @ts-ignore Emitted by Metro in the bundle prelude
// @ts-expect-error Emitted by Metro in the bundle prelude
performance.now() - global.__BUNDLE_START_TIME__,
),
})
@@ -1081,7 +1081,7 @@ function navigate<K extends keyof AllNavigatorParams>(
}
navigationRef.addListener('state', handler)
// @ts-ignore I don't know what would make typescript happy but I have a life -prf
// @ts-expect-error I don't know what would make typescript happy but I have a life -prf
navigationRef.navigate(name, params)
}),
timeout(1e3),
+3 -3
View File
@@ -20,9 +20,9 @@ import * as SplashScreen from 'expo-splash-screen'
import {Logotype} from '#/view/icons/Logotype'
import {atoms as a} from '#/alf'
// @ts-ignore
// @ts-expect-error
import splashImagePointer from '../assets/splash/splash.png'
// @ts-ignore
// @ts-expect-error
import darkSplashImagePointer from '../assets/splash/splash-dark.png'
const splashImageUri = RNImage.resolveAssetSource(splashImagePointer)!.uri
@@ -36,7 +36,7 @@ export const Logo = forwardRef(function LogoImpl(props: SvgProps, ref) {
return (
<Svg
fill="none"
// @ts-ignore it's fiiiiine
// @ts-expect-error it's fiiiiine
ref={ref}
viewBox="0 0 64 66"
style={[{width, height}, props.style]}>
@@ -149,7 +149,6 @@ export function RedirectOverlay() {
t.atoms.bg,
gtMobile ? a.p_2xl : a.p_xl,
a.align_center,
// @ts-ignore
platform({
web: {
paddingTop: '35vh',
-3
View File
@@ -39,11 +39,8 @@ function getThemeName(
}
function updateDocument(theme: ThemeName) {
// @ts-ignore web only
if (IS_WEB && typeof window !== 'undefined') {
// @ts-ignore web only
const html = window.document.documentElement
// @ts-ignore web only
const meta = window.document.querySelector('meta[name="theme-color"]')
// remove any other color mode classes
+1 -1
View File
@@ -14,7 +14,7 @@ import {
export function useMeta(metadata?: MergeableMetadata) {
const m = useMemo(() => metadata, [metadata])
if (!m) return
// @ts-ignore
// @ts-expect-error
m.__meta = true
return m
}
-1
View File
@@ -577,7 +577,6 @@ export const Button = forwardRef<React.ComponentRef<typeof View>, ButtonProps>(
role="button"
accessibilityHint={undefined} // optional
{...rest}
// @ts-ignore - this will always be a pressable
ref={ref}
aria-label={label}
aria-pressed={state.pressed}
+2 -3
View File
@@ -314,7 +314,7 @@ export function Composer({
style={[a.absolute, a.inset_0, a.z_10, {overflow: 'hidden'}]}
ref={node => {
if (IS_WEB && node) {
// @ts-ignore web only a11y
// @ts-expect-error web only a11y
node.setAttribute('inert', '')
}
}}>
@@ -367,11 +367,10 @@ export function Composer({
inputScrollSharedValue.value = e.nativeEvent.contentOffset.y
}
}}
// @ts-ignore web only
// @ts-expect-error web only
onCompositionStart={() => {
isComposing.current = true
}}
// @ts-ignore web only
onCompositionEnd={() => {
isComposing.current = false
}}
+1 -1
View File
@@ -712,7 +712,7 @@ export function Outer({
t.atoms.bg_contrast_25,
a.w_full,
// @ts-ignore react-native-web expects string, and this file is platform-split -sfn
// note: above @ts-ignore cannot be a @ts-expect-error because this does not cause an error
// note: above @ts-expect-error cannot be a @ts-expect-error because this does not cause an error
// in the typecheck CI - presumably because of RNW overriding the types
{
transformOrigin:
+1 -1
View File
@@ -276,7 +276,7 @@ export function ProfileGrid({
},
{threshold: 0.5},
)
// @ts-ignore - web only
// @ts-expect-error - web only
observer.observe(node)
return () => observer.disconnect()
} else {
-3
View File
@@ -446,9 +446,7 @@ function LightboxGalleryItem({
const styles = StyleSheet.create({
avi: {
// @ts-ignore web-only
maxWidth: `calc(min(400px, 100vw))`,
// @ts-ignore web-only
maxHeight: `calc(min(400px, 100vh))`,
padding: 16,
boxSizing: 'border-box',
@@ -458,7 +456,6 @@ const styles = StyleSheet.create({
// column via ScrollView's default flexGrow.
flexGrow: 0,
flexShrink: 0,
// @ts-ignore web-only -sfn
maxHeight: '50vh',
},
menuBtn: {
@@ -109,7 +109,6 @@ const ImageItem = ({
height: number
}) {
const scrollResponderRef = scrollViewRef?.current?.getScrollResponder()
// @ts-ignore
scrollResponderRef?.scrollResponderZoomTo({
...nextZoomRect, // This rect is in screen coordinates
animated: true,
@@ -218,7 +217,6 @@ const ImageItem = ({
return (
<GestureDetector gesture={composedGesture}>
<Animated.ScrollView
// @ts-ignore Something's up with the types here
ref={scrollViewRef}
pinchGestureEnabled
showsHorizontalScrollIndicator={false}
@@ -149,7 +149,7 @@ function canPlayBskyVideoCodecs(): boolean {
type CachedPromise<T> = Promise<T> & {value: undefined | T}
const promiseForHls = import(
// @ts-ignore
// @ts-expect-error
'hls.js/dist/hls.min'
// oxlint-disable-next-line typescript/no-unsafe-member-access
).then(mod => mod.default) as CachedPromise<typeof HlsTypes.default>
@@ -318,11 +318,10 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
return (
<View
// @ts-ignore View is being used as div
ref={refs.setReference}
onPointerMove={onPointerMoveTarget}
onPointerLeave={onPointerLeaveTarget}
// @ts-ignore web only prop
// @ts-expect-error web only prop
onMouseUp={onPress}
style={[a.flex_shrink, props.inline && a.inline]}>
{props.children}
+2 -5
View File
@@ -104,7 +104,6 @@ export function RichText({
style={[plainStyles, {fontSize}, suffixStyles]}
onLayout={onLayout}
onTextLayout={onTextLayout}
// @ts-ignore web only -prf
dataSet={WORD_WRAP}>
{text}
{suffix ? ' ' : null}
@@ -121,7 +120,6 @@ export function RichText({
numberOfLines={numberOfLines}
onLayout={onLayout}
onTextLayout={onTextLayout}
// @ts-ignore web only -prf
dataSet={WORD_WRAP}>
{text}
{suffix ? ' ' : null}
@@ -150,7 +148,7 @@ export function RichText({
selectable={selectable}
to={`/profile/${mention.did}`}
style={interactiveStyles}
// @ts-ignore TODO
// @ts-expect-error TODO
dataSet={WORD_WRAP}
shouldProxy={shouldProxyLinks}
onPress={onLinkPress}>
@@ -169,7 +167,7 @@ export function RichText({
key={key}
to={link.uri}
style={interactiveStyles}
// @ts-ignore TODO
// @ts-expect-error TODO
dataSet={WORD_WRAP}
shareOnLongPress
shouldProxy={shouldProxyLinks}
@@ -209,7 +207,6 @@ export function RichText({
numberOfLines={numberOfLines}
onLayout={onLayout}
onTextLayout={onTextLayout}
// @ts-ignore web only -prf
dataSet={WORD_WRAP}>
{els}
{suffix ? ' ' : null}
+1 -1
View File
@@ -117,7 +117,7 @@ function Inner({
}, [activeNux, setActiveNux])
if (__DEV__ && typeof window !== 'undefined') {
// @ts-ignore
// @ts-expect-error
window.clearNuxDialog = (id: Nux) => {
if (!__DEV__ || !id) return
resetNuxs([id])
@@ -38,7 +38,6 @@ export function UserSearchInput({
fill={interacted ? t.palette.primary_500 : t.palette.contrast_300}
/>
<TextInput
// @ts-ignore bottom sheet input types issue - esb
ref={inputRef}
placeholder={l`Search for people`}
value={value}
@@ -93,7 +93,6 @@ export function DateField({
open
timeZoneOffsetInMinutes={0}
theme={t.scheme}
// @ts-ignore TODO
buttonColor={t.name === 'light' ? '#000000' : '#ffffff'}
date={initialDate}
onConfirm={onChangeInternal}
-4
View File
@@ -245,12 +245,8 @@ export function createInput(Component: typeof TextInput) {
applyFonts(flattened, fonts.family)
// should always be defined on `typography`
// @ts-ignore
if (flattened.fontSize) {
// @ts-ignore
flattened.fontSize = Math.round(
// @ts-ignore
flattened.fontSize * fonts.scaleMultiplier,
)
}
+1 -1
View File
@@ -23,7 +23,7 @@ export const IconTemplate_Stroke2_Corner0_Rounded = forwardRef(
<Svg
fill="none"
{...rest}
// @ts-ignore it's fiiiiine
// @ts-expect-error it's fiiiiine
ref={ref}
viewBox="0 0 24 24"
width={size}
+1 -1
View File
@@ -43,7 +43,7 @@ function useWebOnlyDebugLiveEventPreferences() {
useEffect(() => {
if (env.IS_DEV && IS_WEB && typeof window !== 'undefined') {
// @ts-ignore
// @ts-expect-error
window.__updateLiveEventPreferences = async (
action: LiveEventPreferencesAction,
) => {
+1 -1
View File
@@ -334,7 +334,7 @@ class MergeFeedSource_Custom extends MergeFeedSource {
feed = feed.filter(post => new Date(post.post.indexedAt) > this.minDate)
// attach source info
for (const post of feed) {
// @ts-ignore
// @ts-expect-error
post.__source = this.sourceInfo
}
return {
+1 -1
View File
@@ -24,6 +24,6 @@ export function isJwtExpired(token: string) {
export function isAppPassword(token: string) {
const payload = jwtDecode(token)
// @ts-ignore
// @ts-expect-error
return payload.scope === 'com.atproto.appPass'
}
+2 -6
View File
@@ -5,8 +5,7 @@ import {IS_WEB} from '#/env'
const {height: SCREEN_HEIGHT} = Dimensions.get('window')
const IFRAME_HOST = IS_WEB
? // @ts-ignore only for web
window.location.host === 'localhost:8100'
? window.location.host === 'localhost:8100'
? 'http://localhost:8100'
: 'https://bsky.app'
: __DEV__ && !process.env.JEST_WORKER_ID
@@ -154,10 +153,7 @@ export function parseEmbedPlayerFromUrl(
urlp.hostname === 'www.twitch.tv' ||
urlp.hostname === 'm.twitch.tv'
) {
const parent = IS_WEB
? // @ts-ignore only for web
window.location.hostname
: 'localhost'
const parent = IS_WEB ? window.location.hostname : 'localhost'
const [__, channelOrVideo, clipOrId, id] = urlp.pathname.split('/')
+1 -1
View File
@@ -57,7 +57,7 @@ export function getLocales() {
}
}
// @ts-ignore checked above
// @ts-expect-error checked above
output.push(locale)
}
+3 -3
View File
@@ -366,7 +366,7 @@ describe('debug contexts', () => {
const timestamp = Date.now()
const message = nanoid()
const logger = new Logger({
// @ts-ignore
// @ts-expect-error
context: 'specific',
level: LogLevel.Debug,
})
@@ -388,7 +388,7 @@ describe('debug contexts', () => {
const timestamp = Date.now()
const message = nanoid()
const logger = new Logger({
// @ts-ignore
// @ts-expect-error
context: 'namespace:foo',
contextFilter: 'namespace:*',
level: LogLevel.Debug,
@@ -411,7 +411,7 @@ describe('debug contexts', () => {
const timestamp = Date.now()
const message = nanoid()
const logger = new Logger({
// @ts-ignore
// @ts-expect-error
context: 'namespace:bar:baz',
contextFilter: 'namespace:foo:*',
})
+1 -1
View File
@@ -1,2 +1,2 @@
// @ts-ignore Web-only. On RN, this is set by Metro.
// @ts-expect-error Web-only. On RN, this is set by Metro.
window.__BUNDLE_START_TIME__ = performance.now()
-1
View File
@@ -271,7 +271,6 @@ function HashtagScreenTab({
onEndReached={onEndReached}
onEndReachedThreshold={4}
onItemSeen={trackPostView}
// @ts-ignore web only -prf
desktopFixedHeight
ListFooterComponent={
<ListFooter
@@ -52,7 +52,6 @@ export const PlaceholderCanvas = forwardRef<PlaceholderCanvasRef, {}>(
<View style={styles.container}>
<Suspense fallback={null}>
<LazyViewShot
// @ts-ignore this library doesn't have types
ref={viewshotRef}
options={{
fileName: 'placeholderAvatar',
@@ -396,7 +396,7 @@ function SuggestedProfileCard({
},
{threshold: 0.5},
)
// @ts-ignore - web only
// @ts-expect-error - web only
observer.observe(node)
return () => observer.disconnect()
} else {
-1
View File
@@ -128,7 +128,6 @@ export const ProfileKnownFollowersScreen = ({route}: Props) => {
onRetry={fetchNextPage}
/>
}
// @ts-ignore our .web version only -prf
desktopFixedHeight
initialNumToRender={initialNumToRender}
windowSize={11}
@@ -3,7 +3,6 @@ import {StyleSheet} from 'react-native'
import {type CaptchaWebViewProps} from './CaptchaWebView.shared'
// @ts-ignore web only, we will always redirect to the app on web (CORS)
const REDIRECT_HOST = new URL(window.location.href).host
export function CaptchaWebView({
@@ -25,13 +24,11 @@ export function CaptchaWebView({
}, [onError])
const onLoad = useCallback(() => {
// @ts-ignore web
const frame: HTMLIFrameElement = document.getElementById(
'captcha-iframe',
) as HTMLIFrameElement
try {
// @ts-ignore web
const href = frame?.contentWindow?.location.href
if (!href) return
const urlp = new URL(href)
-1
View File
@@ -177,7 +177,6 @@ function TopicScreenTab({
onEndReached={onEndReached}
onEndReachedThreshold={4}
onItemSeen={trackPostView}
// @ts-ignore web only -prf
desktopFixedHeight
ListFooterComponent={
<ListFooter
-1
View File
@@ -77,7 +77,6 @@ function useMigrateMutes(setThreadMute: SetStateContext) {
while (!cancelled) {
const threads = persisted.get('mutedThreads')
// @ts-ignore findLast is polyfilled - esb
const root = threads.findLast(uri => uri.includes(currentAccount.did))
if (!root) break
+1 -1
View File
@@ -209,7 +209,7 @@ export function tryParse(rawData: string): Schema | undefined {
const errors =
parsed.error?.errors?.map(e => ({
code: e.code,
// @ts-ignore exists on some types
// @ts-expect-error exists on some types
expected: e?.expected,
path: e.path?.join('.'),
})) || []
+1 -1
View File
@@ -45,7 +45,7 @@ export function useNuxs():
// const queryClient = useQueryClient()
// const pdsClient = usePdsClient()
// // @ts-ignore
// // @ts-expect-error
// window.clearNux = async (ids: string[]) => {
// await pdsClient.call(removeNuxs, ids)
// // triggers a refetch
+3 -3
View File
@@ -90,7 +90,7 @@ export function getTraversalMetadata({
}
if (isDevMode()) {
// @ts-ignore dev only for debugging
// @ts-expect-error dev only for debugging
metadata.postData.text = getPostRecord(item.value.post).text
}
@@ -104,9 +104,9 @@ export function storeTraversalMetadata(
metadatas.set(metadata.postData.uri, metadata)
if (isDevMode()) {
// @ts-ignore dev only for debugging
// @ts-expect-error dev only for debugging
metadatas.set(metadata.postData.text, metadata)
// @ts-ignore
// @ts-expect-error
window.__thread = metadatas
}
}
+2 -2
View File
@@ -21,7 +21,7 @@ export function threadPostNoUnauthenticated({
uri,
depth,
value: value as app.bsky.unspecced.defs.ThreadItemNoUnauthenticated,
// @ts-ignore populated by the traversal
// @ts-expect-error populated by the traversal
ui: {},
}
}
@@ -91,7 +91,7 @@ export function threadPost({
},
isBlurred,
moderation,
// @ts-ignore populated by the traversal
// @ts-expect-error populated by the traversal
ui: {},
}
}
+1 -1
View File
@@ -63,7 +63,7 @@ test(`removes multiple keys at once`, () => {
test(`concatenates keys`, () => {
store.remove([scope, 'str'])
store.set([scope, 'str'], 'concat')
// @ts-ignore accessing these properties for testing purposes only
// @ts-expect-error accessing these properties for testing purposes only
expect(store.store.getString(`${scope}${store.sep}str`)).toBeTruthy()
})
+2 -2
View File
@@ -11,9 +11,9 @@ import {Logo} from '#/view/icons/Logo'
import {Logotype} from '#/view/icons/Logotype'
import {atoms as a, useTheme} from '#/alf'
import {Button, ButtonText} from '#/components/Button'
// @ts-ignore
// @ts-expect-error
import splashImagePointer from '../../../../assets/illustrations/illustration-mobile.png'
// @ts-ignore
// @ts-expect-error
import darkSplashImagePointer from '../../../../assets/illustrations/illustration-mobile-dark.png'
const splashImageUri = RNImage.resolveAssetSource(splashImagePointer)!.uri
const darkSplashImageUri = RNImage.resolveAssetSource(
@@ -177,7 +177,6 @@ export function TextInput({
* Android impl of `PasteInput` doesn't support the array syntax for `fontVariant`
*/
if (IS_ANDROID) {
// @ts-ignore
style.fontVariant =
typeof style.fontVariant === 'string'
? style.fontVariant
@@ -344,7 +344,7 @@ export function TextInput({
return (
<>
<View style={[styles.container, hasRightPadding && styles.rightPadding]}>
{/* @ts-ignore inputStyle is fine */}
{/* @ts-expect-error inputStyle is fine */}
<EditorContent editor={editor} style={inputStyle} />
</View>
@@ -479,7 +479,7 @@ const styles = StyleSheet.create({
pointerEvents: 'none',
alignItems: 'center',
justifyContent: 'center',
// @ts-ignore web only -prf
// @ts-expect-error web only -prf
position: 'fixed',
padding: 16,
top: 0,
@@ -488,7 +488,6 @@ const styles = StyleSheet.create({
right: 0,
},
dropModal: {
// @ts-ignore web only
boxShadow: 'rgba(0, 0, 0, 0.3) 0px 5px 20px',
padding: 8,
borderWidth: 1,
@@ -58,7 +58,7 @@ export function createSuggestion({
return
}
// @ts-ignore getReferenceClientRect doesnt like that clientRect can return null -prf
// @ts-expect-error getReferenceClientRect doesnt like that clientRect can return null -prf
popup = tippy('body', {
getReferenceClientRect: props.clientRect,
appendTo: () => document.body,
@@ -78,7 +78,7 @@ export function createSuggestion({
}
popup?.[0]?.setProps({
// @ts-ignore getReferenceClientRect doesnt like that clientRect can return null -prf
// @ts-expect-error getReferenceClientRect doesnt like that clientRect can return null -prf
getReferenceClientRect: props.clientRect,
})
},
-1
View File
@@ -135,7 +135,6 @@ export function PostQuotes({uri}: {uri: string}) {
endMessageText={_(msg`That's all, folks!`)}
/>
}
// @ts-ignore our .web version only -prf
desktopFixedHeight
initialNumToRender={initialNumToRender}
windowSize={11}
@@ -115,7 +115,6 @@ export function PostRepostedBy({uri}: {uri: string}) {
onRetry={fetchNextPage}
/>
}
// @ts-ignore our .web version only -prf
desktopFixedHeight
initialNumToRender={initialNumToRender}
windowSize={11}
-1
View File
@@ -276,7 +276,6 @@ const styles = StyleSheet.create({
paddingRight: 15,
paddingBottom: 5,
paddingLeft: 10,
// @ts-ignore web only -prf
cursor: 'pointer',
},
layout: {
@@ -246,7 +246,6 @@ export function ProfileFollowers({name}: {name: string}) {
onRetry={fetchNextPage}
/>
}
// @ts-ignore our .web version only -prf
desktopFixedHeight
initialNumToRender={initialNumToRender}
windowSize={11}
-1
View File
@@ -229,7 +229,6 @@ export function ProfileFollows({name}: {name: string}) {
onRetry={fetchNextPage}
/>
}
// @ts-ignore our .web version only -prf
desktopFixedHeight
initialNumToRender={initialNumToRender}
windowSize={11}
-1
View File
@@ -22,7 +22,6 @@ export function EventStopper({
<View
onStartShouldSetResponder={_ => true}
onTouchEnd={stop}
// @ts-ignore web only -prf
onClick={stop}
onKeyDown={onKeyDown ? stop : undefined}
style={style}>
+9 -11
View File
@@ -131,13 +131,13 @@ export const Link = memo(function Link({
onAccessibilityAction?.(e)
}
}}
// @ts-ignore web only -sfn
// @ts-expect-error web only -sfn
dataSet={dataSet}
{...props}
android_ripple={{
color: t.atoms.bg_contrast_25.backgroundColor,
}}>
{/* @ts-ignore web only -prf */}
{/* @ts-expect-error web only -prf */}
<View style={style} href={anchorHref}>
{children ? children : <Text>{title || 'link'}</Text>}
</View>
@@ -156,7 +156,7 @@ export const Link = memo(function Link({
accessibilityRole="link"
accessibilityLabel={props.accessibilityLabel ?? title}
accessibilityHint={props.accessibilityHint}
// @ts-ignore web only -prf
// @ts-expect-error web only -prf
href={anchorHref}
dataSet={dataSet}
{...props}>
@@ -281,7 +281,7 @@ export const TextLink = memo(function TextLink({
lineHeight={lineHeight}
dataSet={dataSet}
title={title}
// @ts-ignore web only -prf
// @ts-expect-error web only -prf
hrefAttrs={hrefAttrs} // hack to get open in new tab to work on safari. without this, safari will open in a new window
onPress={onPress}
accessibilityRole="link"
@@ -384,12 +384,12 @@ function onPressInner(
) {
let shouldHandle = false
const isLeftClick =
// @ts-ignore Web only -prf
// @ts-expect-error Web only -prf
Platform.OS === 'web' && (e.button == null || e.button === 0)
// @ts-ignore Web only -prf
// @ts-expect-error Web only -prf
const isMiddleClick = Platform.OS === 'web' && e.button === 1
const isMetaKey =
// @ts-ignore Web only -prf
// @ts-expect-error Web only -prf
Platform.OS === 'web' && (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)
const newTab = isMetaKey || isMiddleClick
@@ -398,7 +398,7 @@ function onPressInner(
} else if (
!e.defaultPrevented && // onPress prevented default
(isLeftClick || isMiddleClick) && // ignore everything but left and middle clicks
// @ts-ignore Web only -prf
// @ts-expect-error Web only -prf
[undefined, null, '', 'self'].includes(e.currentTarget?.target) // let browser handle "target=_blank" etc.
) {
e.preventDefault()
@@ -422,10 +422,8 @@ function onPressInner(
} else {
const [routeName, params] = router.matchPath(href)
if (navigationAction === 'push') {
// @ts-ignore we're not able to type check on this one -prf
navigation.dispatch(StackActions.push(routeName, params))
} else if (navigationAction === 'replace') {
// @ts-ignore we're not able to type check on this one -prf
navigation.dispatch(StackActions.replace(routeName, params))
} else if (navigationAction === 'navigate') {
const state = navigation.getState()
@@ -435,7 +433,7 @@ function onPressInner(
} else {
// note: 'navigate' actually acts the same as 'push' nowadays
// therefore we need to add 'pop' -sfn
// @ts-ignore we're not able to type check on this one -prf
// @ts-expect-error we're not able to type check on this one -prf
navigation.navigate(routeName, params, {pop: true})
}
} else {
+4 -5
View File
@@ -119,7 +119,7 @@ function ListImpl<ItemT>(
if (isValidElement(ListHeaderComponent)) {
headerComponent = ListHeaderComponent
} else {
// @ts-ignore Nah it's fine.
// @ts-expect-error Nah it's fine.
headerComponent = <ListHeaderComponent />
}
}
@@ -129,7 +129,7 @@ function ListImpl<ItemT>(
if (isValidElement(ListFooterComponent)) {
footerComponent = ListFooterComponent
} else {
// @ts-ignore Nah it's fine.
// @ts-expect-error Nah it's fine.
footerComponent = <ListFooterComponent />
}
}
@@ -139,7 +139,7 @@ function ListImpl<ItemT>(
if (isValidElement(ListEmptyComponent)) {
emptyComponent = ListEmptyComponent
} else {
// @ts-ignore Nah it's fine.
// @ts-expect-error Nah it's fine.
emptyComponent = <ListEmptyComponent />
}
}
@@ -793,11 +793,10 @@ export const List = memo(forwardRef(ListImpl)) as <ItemT>(
const styles = StyleSheet.create({
minHeightViewport: {
// @ts-ignore web only
minHeight: '100vh',
},
parentTreeVisibilityDetector: {
// @ts-ignore web only
// @ts-expect-error web only
position: 'fixed',
top: 0,
left: 0,
+1 -1
View File
@@ -21,7 +21,7 @@ export function WebAuxClickWrapper({children}: React.PropsWithChildren<{}>) {
if (Platform.OS !== 'web') return children
return (
// @ts-ignore web only
// @ts-expect-error web only
<div onMouseDown={onMouseDown} onMouseUp={onMouseUp}>
{children}
</div>
+1 -1
View File
@@ -82,7 +82,7 @@ const styles = StyleSheet.create({
borderRadius: 35,
},
outer: {
// @ts-ignore web-only
// @ts-expect-error web-only
position: IS_WEB ? 'fixed' : 'absolute',
zIndex: 1,
cursor: 'pointer',
@@ -98,7 +98,6 @@ export const LoggedOutLayout = ({
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
// @ts-ignore web only
height: '100vh',
},
side: {
-4
View File
@@ -68,12 +68,8 @@ function Text_DEPRECATED({
applyFonts(flattened, fonts.family)
// should always be defined on `typography`
// @ts-ignore
if (flattened.fontSize) {
// @ts-ignore
flattened.fontSize = Math.round(
// @ts-ignore
flattened.fontSize * fonts.scaleMultiplier,
)
}
+2 -2
View File
@@ -29,7 +29,7 @@ export const Logo = forwardRef(function LogoImpl(props: Props, ref) {
const _fill = gradient
? 'url(#sky)'
: fill || styles?.color || t.palette.primary_500
// @ts-ignore it's fiiiiine
// @ts-expect-error it's fiiiiine
const size = parseInt(rest.width || 32, 10)
const logoVariant = useLogoVariant(allowVariants)
@@ -56,7 +56,7 @@ export const Logo = forwardRef(function LogoImpl(props: Props, ref) {
return (
<Svg
fill="none"
// @ts-ignore it's fiiiiine
// @ts-expect-error it's fiiiiine
ref={ref}
viewBox="0 0 64 57"
{...rest}
+1 -1
View File
@@ -9,7 +9,7 @@ export function Logomark({
...rest
}: {fill?: PathProps['fill']} & SvgProps) {
const pal = usePalette('default')
// @ts-ignore it's fiiiiine
// @ts-expect-error it's fiiiiine
const size = parseInt(rest.width || 32)
return (
+1 -1
View File
@@ -9,7 +9,7 @@ export function Logotype({
...rest
}: {fill?: PathProps['fill']} & SvgProps) {
const pal = usePalette('default')
// @ts-ignore it's fiiiiine
// @ts-expect-error it's fiiiiine
const size = parseInt(rest.width || 32)
return (
+2 -2
View File
@@ -1160,10 +1160,10 @@ function MockAccountScreen({
screenDescription={_(msg`profile`)}
modui={moderation.ui('profileView')}>
<ProfileHeaderStandard
// @ts-ignore ProfileViewBasic is close enough -prf
// @ts-expect-error ProfileViewBasic is close enough -prf
profile={profile}
moderationOpts={moderationOpts}
// @ts-ignore ProfileViewBasic is close enough -esb
// @ts-expect-error ProfileViewBasic is close enough -esb
descriptionRT={new RichText({text: profile.description as string})}
/>
</ScreenHider>
+1 -1
View File
@@ -223,7 +223,7 @@ function HomeScreenReady({
{...props}
testID="homeScreenFeedTabs"
onPressSelected={onPressSelected}
// @ts-ignore
// @ts-expect-error
feeds={[{displayName: 'Following'}, {displayName: 'Discover'}]}
/>
)
+1 -1
View File
@@ -649,7 +649,7 @@ const styles = StyleSheet.create({
container: {
flexDirection: 'column',
height: '100%',
// @ts-ignore Web-only.
// @ts-expect-error Web-only.
overflowAnchor: 'none', // Fixes jumps when switching tabs while scrolled down.
},
loading: {