Skip to content

feat(types): add lexicon type generation #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed

feat(types): add lexicon type generation #23

wants to merge 25 commits into from

Conversation

skiniks
Copy link
Contributor

@skiniks skiniks commented Dec 1, 2024

This PR adds a script to automatically:

  1. Download the latest lexicons from ATProto's repo
  2. Generate TypeScript types using @atproto/lex-cli

Not ready for merge yet, but sharing for early feedback. Current status:

  • ✅ Downloads latest lexicons from ATProto
  • ✅ Extracts only lexicon files
  • ✅ Generates types using official lex-cli
  • ⏳ Need to decide on additional type enhancements (see @atcute/lex-cli)

Next steps:

  • Evaluate if we want to add branded types (like @atcute/lex-cli)
  • Add CI integration

related to #30

Copy link

netlify bot commented Dec 1, 2024

Deploy Preview for tsky canceled.

Name Link
🔨 Latest commit b77f77b
🔍 Latest deploy log https://app.netlify.com/sites/tsky/deploys/67505a7df1fdfc000889ed84

@anbraten anbraten changed the title feat(types): Add lexicon type generation feat(types): add lexicon type generation Dec 2, 2024
@anbraten
Copy link
Contributor

anbraten commented Dec 2, 2024

Just tried your PR and those types look really handy already. One thing I noticed is that it currently is based on @atproto/xrpc. Would it be possible to only export types in this package sth like an object mapping xrpc calls to params and repsonse types, without an underlying api client.

Copy link
Member

@bdbch bdbch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just two comments we could clarify. Cool idea!

@bdbch bdbch added this to the Initial Release milestone Dec 4, 2024
@anbraten anbraten marked this pull request as draft December 4, 2024 15:54
@skiniks
Copy link
Contributor Author

skiniks commented Dec 4, 2024

Closing this PR as its functionality has been superseded by #28 which was just merged.

@skiniks skiniks closed this Dec 4, 2024
@skiniks skiniks deleted the feat/lexicon-type-generation branch December 4, 2024 16:40
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.

4 participants