forked from benjamn/ast-types
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
71 lines (68 loc) · 1.4 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import fork from "./fork";
import esProposalsDef from "./def/es-proposals";
import jsxDef from "./def/jsx";
import flowDef from "./def/flow";
import esprimaDef from "./def/esprima";
import babelDef from "./def/babel";
import typescriptDef from "./def/typescript";
import { ASTNode, Type, AnyType, Field } from "./lib/types";
import { NodePath } from "./lib/node-path";
import { namedTypes } from "./gen/namedTypes";
import { builders } from "./gen/builders";
import { Visitor } from "./gen/visitor";
const {
astNodesAreEquivalent,
builders,
builtInTypes,
defineMethod,
eachField,
finalize,
getBuilderName,
getFieldNames,
getFieldValue,
getSupertypeNames,
namedTypes: n,
NodePath,
Path,
PathVisitor,
someField,
Type,
use,
visit,
} = fork([
// Feel free to add to or remove from this list of extension modules to
// configure the precise type hierarchy that you need.
esProposalsDef,
jsxDef,
flowDef,
esprimaDef,
babelDef,
typescriptDef,
]);
// Populate the exported fields of the namedTypes namespace, while still
// retaining its member types.
Object.assign(namedTypes, n);
export {
AnyType,
ASTNode,
astNodesAreEquivalent,
builders,
builtInTypes,
defineMethod,
eachField,
Field,
finalize,
getBuilderName,
getFieldNames,
getFieldValue,
getSupertypeNames,
namedTypes,
NodePath,
Path,
PathVisitor,
someField,
Type,
use,
visit,
Visitor,
};