Babel types · Babel


See also t.isAnyTypeAnnotation(node, opts) and t.assertAnyTypeAnnotation(node, opts).

This is a companion discussion topic for the original entry at


While reading the API docs for the Babel types, I’ve noticed the button to try out each API example was leading to the Babel REPL, which don’t really work with ASTs. I think it would be better for the “Try” buttons to lead to somewhere like AST Explorer. Along with example code so it can be interacted right away. And the results are visible.

I’d love to help out and work on this if anyone in the Babel team thinks this is a good idea.