Skip to content
Discussion options

You must be logged in to vote

Hi @ajmas ,

the deep import (@atproto/api/dist/client/types/...) isn't the intended path — that's why you get the "missing declaration" warnings. The generated types are exposed as namespaces on the package root, so import the namespace and access the type as a member:

import { AppBskyFeedDefs } from '@atproto/api'

type Post = AppBskyFeedDefs.FeedViewPost

When you tried import { AppBskyFeedDefs } from '@atproto/api' earlier, the namespace itself is correct! FeedViewPost just lives inside it (AppBskyFeedDefs.FeedViewPost); it isn't a separate top-level export! So import { FeedViewPost } from '@atproto/api' won't work.

--> Runtime guards are generated the same way, e.g. AppBskyFeedDefs.isPo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ajmas
Comment options

Answer selected by ajmas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants