Skip to content
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

lex-cli: Fix TS Errors with codegen #3282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tcyrus
Copy link

@tcyrus tcyrus commented Dec 21, 2024

These are fixes for the TypeScript Errors (#3230, #3231, #3232) that I encountered with the lex-cli codegen output.

The specific changes are:

  • updated ts-morph to ^24.0.0
  • added isTypeOnly to named imports in codegen where relevant
  • fixed incorrect type predicate from hasProp
  • use type only imports in lex-cli

The new codegen output should be functionally the same (if it was working before, it should still work). I tried to avoid making any breaking changes.

I'm already using this patched version of lex-cli for a personal project.

The fix to hasProp will conflict with #2956. Adding an explicit $type property and removing hasProp is probably the better long term solution, but I didn't want to make any breaking changes.

Fixes type-only imports as well as other strict errors with
codegen output.
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