Proper way to extract AST schema from @babel/types #15276
Unanswered
jedwards1211
asked this question in
Q&A
Replies: 2 comments 8 replies
-
Seems not, it's an internal implementation detail as I understand it. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been extracting the AST schema from
@babel/types
by looking atNODE_FIELDS
and thevalidate
function of each field. I've proposed using this inast-types
to ensure that it's using the same AST schema as Babel does, and I do the same thing in https://github.com/codemodsquad/astx.But my question is, can I rely on this? Are the properties of
validate
intended to be stable, publically-consumable API or not? If not, is there any better way, or can we work on making a public API for getting complete information about the AST schema?Beta Was this translation helpful? Give feedback.
All reactions