Skip to content

Feature request: option to pass our own ast-types fork to recast #1283

@jedwards1211

Description

@jedwards1211

This is something I might try to make a PR for soon...

For astx I have started building my own custom fork of ast-types from metadata in @babel/types so that it never lags behind what babel is able to parse.

However I'm running into #1230 because even if I build my own ast-types fork, I can't make recast use it.

The only long-term solution to issues like #1230 is to be able to do something like

const ast = recast.parse(code, {
  parser: myConfiguredBabelParser,
  types: myConfiguredAstTypes,
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions