Use dangerousIsType

This commit is contained in:
Eric Bailey
2025-01-07 17:10:40 -06:00
parent 2622c85bf2
commit 9449edf07a
@@ -38,6 +38,7 @@ import {Default as ProfileCard} from '#/components/ProfileCard'
import * as Prompt from '#/components/Prompt'
import {RichText} from '#/components/RichText'
import {Text} from '#/components/Typography'
import * as atp from '#/types/atproto'
const AnimatedPressable = Animated.createAnimatedComponent(Pressable)
@@ -85,7 +86,12 @@ export function LandingScreen({
}
// Just for types, this cannot be hit
if (!AppBskyGraphStarterpack.isRecord(starterPack.record)) {
if (
!atp.dangerousIsType<AppBskyGraphStarterpack.Record>(
starterPack.record,
AppBskyGraphStarterpack.isRecord,
)
) {
return null
}