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

babel/packages/babel-parser/typings/babel-parser.d.ts lacks some plugins #10186

Open
hybloid opened this issue Jul 9, 2019 · 3 comments

Comments

Projects
None yet
5 participants
@hybloid
Copy link

commented Jul 9, 2019

Bug Report

Current Behavior
Currently, TS definition for ParserPlugin type (definded inbabel/packages/babel-parser/typings/babel-parser.d.ts) misses the plugins placeholders, partialApplication, logicalAssignment which could be enabled and used with the parser.

Current workaround is to specify alongside with the first plugin name to make tsc compiler work;

Input Code

const options: ParserOptions = {
    sourceType: 'unambiguous',
    strictMode: false,
    plugins: [
        <any>'placeholders',
        'logicalAssignment',
        'partialApplication',
   ],
};

Expected behavior/code
I expect definition to be modified allowing specify ParserOptions without

const options: ParserOptions = {
    sourceType: 'unambiguous',
    strictMode: false,
    plugins: [
        'placeholders',
        'logicalAssignment',
        'partialApplication',
   ],
};

Environment

  • Babel version(s): 7.5.0
  • Node/npm version: 10.16.0
  • OS: Ubuntu
  • How you are using Babel: npm package
@babel-bot

This comment has been minimized.

Copy link
Collaborator

commented Jul 9, 2019

Hey @hybloid! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community
that typically always has someone willing to help. You can sign-up here
for an invite.

@JLHwung

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2019

babel-parser.d.ts has not been updated since Feb. So PR's welcome.

It should be a good first issue.

@Letladi

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2019

I am willing to attempt this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.