Skip to content

Conversation

@skiniks
Copy link
Contributor

@skiniks skiniks commented Dec 3, 2024

This PR introduces @tsky/lex-cli, a TypeScript definition generator forked from @atcute/lex-cli.

Key changes:

  • Created @tsky/lex-cli package based on @atcute/lex-cli v1.0.3
  • Updated imports and package names to use @tsky namespace
  • Switched from @externdefs/collider to clipanion
  • Switched from @badrap/valita to typanion for schema validation
  • Simplified file structure by consolidating utility functions
  • Added support for subscriptions in type generation
  • Expanded JSDoc documentation handling

The PR includes generated type definitions for review in packages/lexicons/src/lib/lexicons.ts. Please review both the generator code and the resulting type definitions and let me know what you think!

Edit: Following suggestion from mary, replaced symbolic type branding with a more pragmatic approach using concrete $type fields. This change:

  • Removes Brand namespace and symbolic type system
  • Introduces TypedBase (optional $type) and RecordBase (required $type)
  • Uses real runtime properties instead of nonexistent unique symbols
  • Simplifies type unions with explicit type discrimination
  • Improves TypeScript type inference and debugging

related to #30

@netlify
Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for tsky canceled.

Name Link
🔨 Latest commit 9fd4170
🔍 Latest deploy log https://app.netlify.com/sites/tsky/deploys/67505c9149a1060009c55a22

@skiniks
Copy link
Contributor Author

skiniks commented Dec 4, 2024

@anbraten all set!

@anbraten
Copy link
Contributor

anbraten commented Dec 4, 2024

In general thanks again for the amazing work 👍🏾 . This will be a good starting point to continue building the client functions now. Would suggest to merge this as is and adjust further when necessary while using the types.

@anbraten anbraten merged commit bdf6c6e into tsky-dev:main Dec 4, 2024
6 checks passed
@skiniks skiniks deleted the feat/lex-cli-fork branch December 4, 2024 16:37
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.

5 participants