Merged
Conversation
Updates the type factories and various usage sites to add a generic for type nodes.
Updates the translator and AST factories to account for type nodes.
Updates the Babel and TypeScript AST factories to account to produce type nodes.
b0adfc4 to
3cb9755
Compare
atscott
reviewed
Mar 11, 2026
Initial pass to make sure some common cases produce code that compiles.
3cb9755 to
403ea80
Compare
atscott
approved these changes
Mar 11, 2026
Member
Author
|
Caretaker note: the presubmit failures are unrelated. |
mattrbeck
reviewed
Mar 12, 2026
| | 'string' | ||
| | 'function' | ||
| | 'never' | ||
| | 'unknown'; |
Member
There was a problem hiding this comment.
You're definitely more familiar than me so I trust your judgement, but do we also want null, symbol, and bigint here (and other places)? Are they just not necessary because we don't emit them?
Member
Author
There was a problem hiding this comment.
Yeah these are the only ones we generate through the output AST at the moment. I also want eventually to clean it up a bit, because some existing ones like function aren't used right now either.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes an initial set of changes to make sure that the code we generate in the template pipeline will compile when passed through TypeScript. This ended up being slightly more involved, because the code that translates the output AST to TypeScript was dropping all types.
Note that I added a few tests manually, but the ideal end state is to run the compilation checks against all of the current compliance tests.