1 | import { Expression, File } from "babel-types";
|
2 |
|
3 | export function parse(code: string, opts?: BabylonOptions): File;
|
4 |
|
5 | export function parseExpression(input: string, options?: BabylonOptions): Expression;
|
6 |
|
7 | export interface BabylonOptions {
|
8 | |
9 |
|
10 |
|
11 |
|
12 | allowImportExportEverywhere?: boolean | undefined;
|
13 |
|
14 | |
15 |
|
16 |
|
17 | allowReturnOutsideFunction?: boolean | undefined;
|
18 |
|
19 | allowSuperOutsideMethod?: boolean | undefined;
|
20 |
|
21 | |
22 |
|
23 |
|
24 | sourceType?: "script" | "module" | undefined;
|
25 |
|
26 | |
27 |
|
28 |
|
29 |
|
30 | sourceFilename?: string | undefined;
|
31 |
|
32 | |
33 |
|
34 |
|
35 | plugins?: PluginName[] | undefined;
|
36 | }
|
37 |
|
38 | export type PluginName =
|
39 | | "estree"
|
40 | | "jsx"
|
41 | | "flow"
|
42 | | "typescript"
|
43 | | "classConstructorCall"
|
44 | | "doExpressions"
|
45 | | "objectRestSpread"
|
46 | | "decorators"
|
47 | | "classProperties"
|
48 | | "exportExtensions"
|
49 | | "asyncGenerators"
|
50 | | "functionBind"
|
51 | | "functionSent"
|
52 | | "dynamicImport";
|