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

typing for parse() #570

Closed
magwas opened this issue Apr 16, 2023 · 1 comment
Closed

typing for parse() #570

magwas opened this issue Apr 16, 2023 · 1 comment

Comments

@magwas
Copy link

magwas commented Apr 16, 2023

Here is a typing for parse()

declare module "espree" {
  import { type Program } from "estree";
  interface Options {
    range?: boolean;
    loc?: boolean;
    comment?: boolean;
    tokens?: boolean;
    ecmaVersion?: number;

    allowReserved?: boolean;
    sourceType?: "script" | "module" | "commonjs";

    ecmaFeatures?: {
      jsx?: boolean;

      globalReturn?: boolean;

      impliedStrict?: boolean;
    };
  }
  function parse(code: string, options: Options): Program;
}
@nzakas
Copy link
Member

nzakas commented Apr 18, 2023

Thanks. We decided not to do partial typings for this package as we try to explore doing a more full-featured type definition set.

@nzakas nzakas closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants