Skip to content

Conversation

tylersayshi
Copy link
Owner

@tylersayshi tylersayshi commented Oct 14, 2025

will merge this when the current tests are passing

next step will be to refactor the inference and tests so that they match the actual payloads expected that would be valid for atproto schema

something more like this will be more correct

export interface AppBskyFeedPost {
  $type: 'app.bsky.feed.post';
  text: string;
  entities?: Entity[];
  facets?: Facet[];
  reply?: ReplyRef;
  embed?: unknown; // union of embed types
  langs?: string[];
  labels?: unknown; // selfLabels
  createdAt: string;
}

it has the namespace as the $type, that part will be easy

then the main def is the main definition of the type, this is a special and always needed def afaict. I think it's always a record? not sure though.

then the other defs can be referred to like #facet

there will be a good bit of reworking to get that all wired up to infer correctly

@tylersayshi tylersayshi marked this pull request as ready for review October 15, 2025 05:33
@tylersayshi tylersayshi changed the title Infer fixing fix infer to be a close match of what's simplified from the json given Oct 15, 2025
@tylersayshi tylersayshi merged commit 5f3fa64 into main Oct 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant