yuku-walk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +220 -0
- package/dist/index.d.mts +642 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# yuku-walk
|
|
2
|
+
|
|
3
|
+
A fast, fully typed AST walker for [`yuku-parser`](https://www.npmjs.com/package/yuku-parser).
|
|
4
|
+
|
|
5
|
+
Type-keyed visitors with `enter`/`leave`, alias groups, in-place mutation, and a
|
|
6
|
+
complete set of type guards and node builders. No runtime dependencies.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { parse } from "yuku-parser";
|
|
10
|
+
import { walk } from "yuku-walk";
|
|
11
|
+
|
|
12
|
+
const { program } = parse("const greet = (name) => `hi ${name}`;");
|
|
13
|
+
|
|
14
|
+
walk(program, {
|
|
15
|
+
Identifier(node) {
|
|
16
|
+
console.log(node.name); // greet, name, name
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
bun add yuku-walk yuku-parser
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`yuku-parser` is a peer dependency.
|
|
28
|
+
|
|
29
|
+
## Visitors
|
|
30
|
+
|
|
31
|
+
A visitor is keyed by node `type`, by an alias group, or by the universal
|
|
32
|
+
`enter` / `leave`. Each handler receives the typed node and a [`path`](#the-path).
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
walk(program, {
|
|
36
|
+
// a concrete node type, `node` is precisely typed
|
|
37
|
+
CallExpression(node, path) {
|
|
38
|
+
if (path.parent?.type === "AwaitExpression") return;
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
// an alias group fires for a whole family
|
|
42
|
+
Function(node) {
|
|
43
|
+
node.params; // FunctionDeclaration | FunctionExpression | ArrowFunctionExpression | ...
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
// enter/leave for any node type
|
|
47
|
+
MemberExpression: {
|
|
48
|
+
enter(node) {},
|
|
49
|
+
leave(node) {},
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
// run for every node
|
|
53
|
+
enter(node) {},
|
|
54
|
+
leave(node) {},
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Aliases: `Expression`, `Statement`, `Declaration`, `ModuleDeclaration`,
|
|
59
|
+
`Function`, `Class`, `Method`, `Loop`, `Pattern`, `JSX`, `TSType`.
|
|
60
|
+
|
|
61
|
+
When several handlers match a node, `enter` runs outermost first
|
|
62
|
+
(universal, alias, concrete) and `leave` runs in reverse.
|
|
63
|
+
|
|
64
|
+
## The path
|
|
65
|
+
|
|
66
|
+
Every visitor receives a `path` describing where it is and how to change the tree.
|
|
67
|
+
Each node has its own path, so it stays valid after the visit returns.
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
node: T // the current node
|
|
71
|
+
parent: Node | null // owner, or null at the root
|
|
72
|
+
key: string | null // field on the parent holding this node
|
|
73
|
+
index: number | null // position within an array field, else null
|
|
74
|
+
ancestors: readonly Node[] // root down to the parent
|
|
75
|
+
state: S // value threaded through the walk
|
|
76
|
+
|
|
77
|
+
skip() // do not descend into this node
|
|
78
|
+
stop() // end the walk
|
|
79
|
+
replace(next) // swap this node, then walk the replacement
|
|
80
|
+
remove() // detach from the parent
|
|
81
|
+
insertBefore(node) // add a sibling before (array fields)
|
|
82
|
+
insertAfter(node) // add a sibling after (array fields)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
walk(program, {
|
|
87
|
+
DebuggerStatement(_node, path) {
|
|
88
|
+
path.remove();
|
|
89
|
+
},
|
|
90
|
+
Identifier(node, path) {
|
|
91
|
+
if (node.name === "foo") path.replace(b.identifier("bar"));
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`replace` walks into the replacement's children but does not re-run its own
|
|
97
|
+
`enter`. A synthetic replacement (one built with `b.*`) inherits the replaced
|
|
98
|
+
node's source span, so generated output still maps back to the original.
|
|
99
|
+
|
|
100
|
+
## Type guards (`is`)
|
|
101
|
+
|
|
102
|
+
A guard for every node `type`, the alias families, and the variants that share a
|
|
103
|
+
`type` string. All accept `null` / `undefined` and return `false`.
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
import { is } from "yuku-walk";
|
|
107
|
+
|
|
108
|
+
is.CallExpression(node); // every concrete type
|
|
109
|
+
is.Expression(node); // families
|
|
110
|
+
is.StringLiteral(node); // Literal variants
|
|
111
|
+
is.StaticMemberExpression(node); // MemberExpression variants
|
|
112
|
+
is.BindingIdentifier(node); // Identifier roles, via `kind`
|
|
113
|
+
|
|
114
|
+
walk(program, {
|
|
115
|
+
Literal(node, path) {
|
|
116
|
+
if (is.ArrayExpression(path.parent)) {
|
|
117
|
+
// path.parent is narrowed to ArrayExpression
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Builders (`b`)
|
|
124
|
+
|
|
125
|
+
A builder for every node type. Required fields are positional, the rest go in a
|
|
126
|
+
trailing options object. Synthetic nodes get a zero span.
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
import { b } from "yuku-walk";
|
|
130
|
+
|
|
131
|
+
b.identifier("x");
|
|
132
|
+
b.callExpression(b.identifier("f"), [b.numericLiteral(1)]);
|
|
133
|
+
b.arrowFunctionExpression([b.identifier("a", "binding")], b.identifier("a"));
|
|
134
|
+
b.variableDeclaration("const", [
|
|
135
|
+
b.variableDeclarator(b.identifier("x", "binding"), b.numericLiteral(0)),
|
|
136
|
+
]);
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Transform and print
|
|
140
|
+
|
|
141
|
+
Pair it with [`yuku-codegen`](https://www.npmjs.com/package/yuku-codegen) to parse,
|
|
142
|
+
rewrite, and print back to source.
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
import { parse } from "yuku-parser";
|
|
146
|
+
import { print } from "yuku-codegen";
|
|
147
|
+
import { walk, is, b } from "yuku-walk";
|
|
148
|
+
|
|
149
|
+
const { program } = parse("const x = 1; debugger; foo(x, 2);");
|
|
150
|
+
|
|
151
|
+
walk(program, {
|
|
152
|
+
DebuggerStatement(_node, path) {
|
|
153
|
+
path.remove();
|
|
154
|
+
},
|
|
155
|
+
Identifier(node, path) {
|
|
156
|
+
if (node.name === "foo") path.replace(b.identifier("bar"));
|
|
157
|
+
},
|
|
158
|
+
Literal(node, path) {
|
|
159
|
+
if (is.NumericLiteral(node)) path.replace(b.numericLiteral((node.value ?? 0) * 10));
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
console.log(print(program).code);
|
|
164
|
+
// const x = 10;
|
|
165
|
+
// bar(x, 20);
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
`walk` edits the tree in place, so a transform is just a reusable visitor object,
|
|
169
|
+
and passes compose: run as many as you like, then print once.
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import { walk, b, type Visitors } from "yuku-walk";
|
|
173
|
+
|
|
174
|
+
const stripDebugger: Visitors = {
|
|
175
|
+
DebuggerStatement: (_node, path) => path.remove(),
|
|
176
|
+
};
|
|
177
|
+
const inlineDevFlag: Visitors = {
|
|
178
|
+
Identifier(node, path) {
|
|
179
|
+
if (node.name === "__DEV__") path.replace(b.booleanLiteral(false));
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const { program } = parse("if (__DEV__) log(); debugger; run();");
|
|
184
|
+
for (const transform of [stripDebugger, inlineDevFlag]) {
|
|
185
|
+
walk(program, transform);
|
|
186
|
+
}
|
|
187
|
+
console.log(print(program).code);
|
|
188
|
+
// if (false) log();
|
|
189
|
+
// run();
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Replacements built with `b.*` inherit the replaced node's source span, so
|
|
193
|
+
`yuku-codegen` source maps still point back to the original input.
|
|
194
|
+
|
|
195
|
+
## Async
|
|
196
|
+
|
|
197
|
+
`walkAsync` is the same walk with awaitable visitors, run sequentially in
|
|
198
|
+
depth-first order. Reach for it only when a visitor must await I/O; `walk` is
|
|
199
|
+
faster otherwise.
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
import { walkAsync } from "yuku-walk";
|
|
203
|
+
|
|
204
|
+
await walkAsync(program, {
|
|
205
|
+
async ImportDeclaration(node, path) {
|
|
206
|
+
if (!(await exists(node.source.value))) path.remove();
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Performance
|
|
212
|
+
|
|
213
|
+
The walk reads a fixed table of child fields per node type rather than reflecting
|
|
214
|
+
over keys, and dispatches through a cached, per-type handler list. On a large
|
|
215
|
+
TypeScript file it walks several times faster than `@babel/traverse` and on par
|
|
216
|
+
with the lightest reflection walkers, while staying fully typed.
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
MIT
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
import * as t from "yuku-parser";
|
|
2
|
+
import { BigIntLiteral, BindingIdentifier, BooleanLiteral, ComputedMemberExpression, Directive, IdentifierName, IdentifierReference, LabelIdentifier, Node, NullLiteral, NumericLiteral, PrivateFieldExpression, RegExpLiteral, StaticMemberExpression, StringLiteral } from "yuku-parser";
|
|
3
|
+
|
|
4
|
+
//#region src/aliases.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Node types grouped under a shared alias. A visitor registered under an alias
|
|
7
|
+
* name runs for every member type. Membership is by node `type`.
|
|
8
|
+
*/
|
|
9
|
+
declare const ALIAS_GROUPS: {
|
|
10
|
+
readonly Expression: readonly ["Identifier", "Literal", "ThisExpression", "Super", "ArrayExpression", "ObjectExpression", "FunctionExpression", "ArrowFunctionExpression", "ClassExpression", "TaggedTemplateExpression", "TemplateLiteral", "MemberExpression", "CallExpression", "NewExpression", "ChainExpression", "SequenceExpression", "ParenthesizedExpression", "BinaryExpression", "LogicalExpression", "ConditionalExpression", "UnaryExpression", "UpdateExpression", "AssignmentExpression", "YieldExpression", "AwaitExpression", "ImportExpression", "MetaProperty", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression", "TSInstantiationExpression", "JSXElement", "JSXFragment"];
|
|
11
|
+
readonly Statement: readonly ["ExpressionStatement", "BlockStatement", "EmptyStatement", "DebuggerStatement", "ReturnStatement", "LabeledStatement", "BreakStatement", "ContinueStatement", "IfStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "WhileStatement", "DoWhileStatement", "ForStatement", "ForInStatement", "ForOfStatement", "WithStatement", "FunctionDeclaration", "ClassDeclaration", "VariableDeclaration", "TSDeclareFunction", "TSTypeAliasDeclaration", "TSInterfaceDeclaration", "TSEnumDeclaration", "TSModuleDeclaration", "TSImportEqualsDeclaration"];
|
|
12
|
+
readonly Declaration: readonly ["FunctionDeclaration", "ClassDeclaration", "VariableDeclaration", "TSDeclareFunction", "TSTypeAliasDeclaration", "TSInterfaceDeclaration", "TSEnumDeclaration", "TSModuleDeclaration", "TSImportEqualsDeclaration"];
|
|
13
|
+
readonly ModuleDeclaration: readonly ["ImportDeclaration", "ExportNamedDeclaration", "ExportDefaultDeclaration", "ExportAllDeclaration", "TSExportAssignment", "TSNamespaceExportDeclaration"];
|
|
14
|
+
readonly Function: readonly ["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression", "TSDeclareFunction", "TSEmptyBodyFunctionExpression"];
|
|
15
|
+
readonly Class: readonly ["ClassDeclaration", "ClassExpression"];
|
|
16
|
+
readonly Method: readonly ["MethodDefinition", "TSAbstractMethodDefinition"];
|
|
17
|
+
readonly Loop: readonly ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"];
|
|
18
|
+
readonly Pattern: readonly ["Identifier", "ArrayPattern", "ObjectPattern", "AssignmentPattern", "RestElement"];
|
|
19
|
+
readonly JSX: readonly ["JSXElement", "JSXOpeningElement", "JSXClosingElement", "JSXFragment", "JSXOpeningFragment", "JSXClosingFragment", "JSXIdentifier", "JSXNamespacedName", "JSXMemberExpression", "JSXAttribute", "JSXSpreadAttribute", "JSXExpressionContainer", "JSXEmptyExpression", "JSXText", "JSXSpreadChild"];
|
|
20
|
+
readonly TSType: readonly ["TSAnyKeyword", "TSUnknownKeyword", "TSNeverKeyword", "TSVoidKeyword", "TSNullKeyword", "TSUndefinedKeyword", "TSStringKeyword", "TSNumberKeyword", "TSBigIntKeyword", "TSBooleanKeyword", "TSSymbolKeyword", "TSObjectKeyword", "TSIntrinsicKeyword", "TSThisType", "TSTypeReference", "TSTypeQuery", "TSImportType", "TSLiteralType", "TSTemplateLiteralType", "TSArrayType", "TSIndexedAccessType", "TSTupleType", "TSNamedTupleMember", "TSJSDocNullableType", "TSJSDocNonNullableType", "TSJSDocUnknownType", "TSUnionType", "TSIntersectionType", "TSConditionalType", "TSInferType", "TSTypeOperator", "TSParenthesizedType", "TSFunctionType", "TSConstructorType", "TSTypePredicate", "TSTypeLiteral", "TSMappedType"];
|
|
21
|
+
};
|
|
22
|
+
/** Name of an alias group. */
|
|
23
|
+
type AliasName = keyof typeof ALIAS_GROUPS;
|
|
24
|
+
/** Node union matched by each alias group. */
|
|
25
|
+
type AliasMap = { [K in AliasName]: NodeOfType<(typeof ALIAS_GROUPS)[K][number]> };
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/types.d.ts
|
|
28
|
+
/** Discriminant `type` string of every AST node. */
|
|
29
|
+
type NodeType = Node["type"];
|
|
30
|
+
/** The node, or union of nodes, carrying a given `type`. */
|
|
31
|
+
type NodeOfType<K extends NodeType> = Extract<Node, {
|
|
32
|
+
type: K;
|
|
33
|
+
}>;
|
|
34
|
+
/** Field names of a node whose values hold child nodes. */
|
|
35
|
+
type ChildKeys<N> = { [K in keyof N]-?: [NonNullable<N[K]>] extends [never] ? never : NonNullable<N[K]> extends Node ? K : NonNullable<N[K]> extends readonly (infer E)[] ? NonNullable<E> extends Node ? K : never : never }[keyof N];
|
|
36
|
+
/**
|
|
37
|
+
* A node's position in the tree, passed to every visitor. It exposes the
|
|
38
|
+
* surrounding context and the operations for changing the tree. Each node has
|
|
39
|
+
* its own path, so a path stays valid after its visit returns.
|
|
40
|
+
*/
|
|
41
|
+
interface Path<T extends Node = Node, S = unknown> {
|
|
42
|
+
/** The node being visited. */
|
|
43
|
+
readonly node: T;
|
|
44
|
+
/** The node that holds {@link node}, or null at the root. */
|
|
45
|
+
readonly parent: Node | null;
|
|
46
|
+
/** The field on {@link parent} that holds {@link node} or its array, or null at the root. */
|
|
47
|
+
readonly key: string | null;
|
|
48
|
+
/** Index of {@link node} within an array field, or null when it sits in a plain field. */
|
|
49
|
+
readonly index: number | null;
|
|
50
|
+
/** Ancestors from the root down to {@link parent}, excluding {@link node}. */
|
|
51
|
+
readonly ancestors: readonly Node[];
|
|
52
|
+
/** State threaded through the walk. */
|
|
53
|
+
state: S;
|
|
54
|
+
/** Do not descend into the current node's children. */
|
|
55
|
+
skip(): void;
|
|
56
|
+
/** Stop the walk entirely. */
|
|
57
|
+
stop(): void;
|
|
58
|
+
/** Replace the current node, then walk the replacement's children. */
|
|
59
|
+
replace(next: Node): void;
|
|
60
|
+
/** Remove the current node from its parent. */
|
|
61
|
+
remove(): void;
|
|
62
|
+
/** Insert a sibling before the current node. Only valid in an array field. */
|
|
63
|
+
insertBefore(node: Node): void;
|
|
64
|
+
/** Insert a sibling after the current node. Only valid in an array field. */
|
|
65
|
+
insertAfter(node: Node): void;
|
|
66
|
+
}
|
|
67
|
+
/** Handler invoked with a node and the {@link Path} cursor. */
|
|
68
|
+
type VisitFn<T extends Node, S> = (node: T, path: Path<T, S>) => void;
|
|
69
|
+
/** A visitor: a function run on enter, or an object with `enter` and/or `leave`. */
|
|
70
|
+
type Visitor<T extends Node, S> = VisitFn<T, S> | {
|
|
71
|
+
enter?: VisitFn<T, S>;
|
|
72
|
+
leave?: VisitFn<T, S>;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Visitors passed to {@link walk}. A key may be a node `type`, an alias group
|
|
76
|
+
* such as `Function` or `Expression`, or `enter`/`leave` to match every node.
|
|
77
|
+
*/
|
|
78
|
+
type Visitors<S = unknown> = { [K in NodeType]?: Visitor<NodeOfType<K>, S> } & { [K in keyof AliasMap]?: Visitor<AliasMap[K], S> } & {
|
|
79
|
+
enter?: VisitFn<Node, S>;
|
|
80
|
+
leave?: VisitFn<Node, S>;
|
|
81
|
+
};
|
|
82
|
+
/** Like {@link VisitFn}, but may return a promise that the walk awaits. */
|
|
83
|
+
type AsyncVisitFn<T extends Node, S> = (node: T, path: Path<T, S>) => void | Promise<void>;
|
|
84
|
+
/** A visitor for {@link walkAsync}: a function, or an object with `enter` and/or `leave`. */
|
|
85
|
+
type AsyncVisitor<T extends Node, S> = AsyncVisitFn<T, S> | {
|
|
86
|
+
enter?: AsyncVisitFn<T, S>;
|
|
87
|
+
leave?: AsyncVisitFn<T, S>;
|
|
88
|
+
};
|
|
89
|
+
/** Visitors passed to {@link walkAsync}. Shaped like {@link Visitors}, with awaitable handlers. */
|
|
90
|
+
type AsyncVisitors<S = unknown> = { [K in NodeType]?: AsyncVisitor<NodeOfType<K>, S> } & { [K in keyof AliasMap]?: AsyncVisitor<AliasMap[K], S> } & {
|
|
91
|
+
enter?: AsyncVisitFn<Node, S>;
|
|
92
|
+
leave?: AsyncVisitFn<Node, S>;
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/walk.d.ts
|
|
96
|
+
/**
|
|
97
|
+
* Walk an AST depth first, dispatching to typed visitors and mutating in place.
|
|
98
|
+
*
|
|
99
|
+
* @param root The node to start from, usually a `Program`.
|
|
100
|
+
* @param visitors Handlers keyed by node `type`, alias group, or `enter`/`leave`.
|
|
101
|
+
* @param state Optional value exposed as `path.state` throughout the walk.
|
|
102
|
+
* @returns The root node, or its replacement if the root was replaced.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* walk(program, {
|
|
107
|
+
* Identifier(node) {
|
|
108
|
+
* console.log(node.name);
|
|
109
|
+
* },
|
|
110
|
+
* CallExpression(node, path) {
|
|
111
|
+
* if (node.callee.type === "MemberExpression") path.skip();
|
|
112
|
+
* },
|
|
113
|
+
* });
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
declare function walk<T extends Node, S = unknown>(root: T, visitors: Visitors<S>, state?: S): T;
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/walk-async.d.ts
|
|
119
|
+
/**
|
|
120
|
+
* Like {@link walk}, but visitors may be `async`. Handlers are awaited one at a
|
|
121
|
+
* time in depth-first order, so mutation behaves exactly as in the sync walk.
|
|
122
|
+
* Reach for this only when a visitor needs to await I/O; prefer {@link walk}
|
|
123
|
+
* otherwise, as awaiting has per-node overhead.
|
|
124
|
+
*
|
|
125
|
+
* @returns A promise of the root node, or its replacement if the root was replaced.
|
|
126
|
+
*/
|
|
127
|
+
declare function walkAsync<T extends Node, S = unknown>(root: T, visitors: AsyncVisitors<S>, state?: S): Promise<T>;
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/predicates.d.ts
|
|
130
|
+
type MaybeNode = Node | null | undefined;
|
|
131
|
+
declare const is: {
|
|
132
|
+
Expression: (node: MaybeNode) => node is NodeOfType<"Identifier" | "Literal" | "ThisExpression" | "Super" | "ArrayExpression" | "ObjectExpression" | "FunctionExpression" | "ArrowFunctionExpression" | "ClassExpression" | "TaggedTemplateExpression" | "TemplateLiteral" | "MemberExpression" | "CallExpression" | "NewExpression" | "ChainExpression" | "SequenceExpression" | "ParenthesizedExpression" | "BinaryExpression" | "LogicalExpression" | "ConditionalExpression" | "UnaryExpression" | "UpdateExpression" | "AssignmentExpression" | "YieldExpression" | "AwaitExpression" | "ImportExpression" | "MetaProperty" | "TSAsExpression" | "TSSatisfiesExpression" | "TSTypeAssertion" | "TSNonNullExpression" | "TSInstantiationExpression" | "JSXElement" | "JSXFragment">;
|
|
133
|
+
Statement: (node: MaybeNode) => node is AliasMap["Statement"];
|
|
134
|
+
Declaration: (node: MaybeNode) => node is AliasMap["Declaration"];
|
|
135
|
+
ModuleDeclaration: (node: MaybeNode) => node is AliasMap["ModuleDeclaration"];
|
|
136
|
+
Function: (node: MaybeNode) => node is AliasMap["Function"];
|
|
137
|
+
Class: (node: MaybeNode) => node is AliasMap["Class"];
|
|
138
|
+
Method: (node: MaybeNode) => node is AliasMap["Method"];
|
|
139
|
+
Loop: (node: MaybeNode) => node is AliasMap["Loop"];
|
|
140
|
+
Pattern: (node: MaybeNode) => node is AliasMap["Pattern"];
|
|
141
|
+
JSX: (node: MaybeNode) => node is AliasMap["JSX"];
|
|
142
|
+
TSType: (node: MaybeNode) => node is AliasMap["TSType"];
|
|
143
|
+
IdentifierReference: (node: MaybeNode) => node is IdentifierReference;
|
|
144
|
+
BindingIdentifier: (node: MaybeNode) => node is BindingIdentifier;
|
|
145
|
+
LabelIdentifier: (node: MaybeNode) => node is LabelIdentifier;
|
|
146
|
+
IdentifierName: (node: MaybeNode) => node is IdentifierName;
|
|
147
|
+
StringLiteral: (node: MaybeNode) => node is StringLiteral;
|
|
148
|
+
NumericLiteral: (node: MaybeNode) => node is NumericLiteral;
|
|
149
|
+
BooleanLiteral: (node: MaybeNode) => node is BooleanLiteral;
|
|
150
|
+
NullLiteral: (node: MaybeNode) => node is NullLiteral;
|
|
151
|
+
BigIntLiteral: (node: MaybeNode) => node is BigIntLiteral;
|
|
152
|
+
RegExpLiteral: (node: MaybeNode) => node is RegExpLiteral;
|
|
153
|
+
ComputedMemberExpression: (node: MaybeNode) => node is ComputedMemberExpression;
|
|
154
|
+
StaticMemberExpression: (node: MaybeNode) => node is StaticMemberExpression;
|
|
155
|
+
PrivateFieldExpression: (node: MaybeNode) => node is PrivateFieldExpression;
|
|
156
|
+
Directive: (node: MaybeNode) => node is Directive;
|
|
157
|
+
Program: (node: MaybeNode) => node is import("yuku-parser").Program;
|
|
158
|
+
Hashbang: (node: MaybeNode) => node is import("yuku-parser").Hashbang;
|
|
159
|
+
ExpressionStatement: (node: MaybeNode) => node is NodeOfType<"ExpressionStatement">;
|
|
160
|
+
BlockStatement: (node: MaybeNode) => node is import("yuku-parser").BlockStatement;
|
|
161
|
+
EmptyStatement: (node: MaybeNode) => node is import("yuku-parser").EmptyStatement;
|
|
162
|
+
DebuggerStatement: (node: MaybeNode) => node is import("yuku-parser").DebuggerStatement;
|
|
163
|
+
ReturnStatement: (node: MaybeNode) => node is import("yuku-parser").ReturnStatement;
|
|
164
|
+
LabeledStatement: (node: MaybeNode) => node is import("yuku-parser").LabeledStatement;
|
|
165
|
+
BreakStatement: (node: MaybeNode) => node is import("yuku-parser").BreakStatement;
|
|
166
|
+
ContinueStatement: (node: MaybeNode) => node is import("yuku-parser").ContinueStatement;
|
|
167
|
+
IfStatement: (node: MaybeNode) => node is import("yuku-parser").IfStatement;
|
|
168
|
+
SwitchStatement: (node: MaybeNode) => node is import("yuku-parser").SwitchStatement;
|
|
169
|
+
ThrowStatement: (node: MaybeNode) => node is import("yuku-parser").ThrowStatement;
|
|
170
|
+
TryStatement: (node: MaybeNode) => node is import("yuku-parser").TryStatement;
|
|
171
|
+
WhileStatement: (node: MaybeNode) => node is import("yuku-parser").WhileStatement;
|
|
172
|
+
DoWhileStatement: (node: MaybeNode) => node is import("yuku-parser").DoWhileStatement;
|
|
173
|
+
ForStatement: (node: MaybeNode) => node is import("yuku-parser").ForStatement;
|
|
174
|
+
ForInStatement: (node: MaybeNode) => node is import("yuku-parser").ForInStatement;
|
|
175
|
+
ForOfStatement: (node: MaybeNode) => node is import("yuku-parser").ForOfStatement;
|
|
176
|
+
WithStatement: (node: MaybeNode) => node is import("yuku-parser").WithStatement;
|
|
177
|
+
FunctionDeclaration: (node: MaybeNode) => node is import("yuku-parser").FunctionDeclaration;
|
|
178
|
+
ClassDeclaration: (node: MaybeNode) => node is import("yuku-parser").ClassDeclaration;
|
|
179
|
+
VariableDeclaration: (node: MaybeNode) => node is import("yuku-parser").VariableDeclaration;
|
|
180
|
+
TSDeclareFunction: (node: MaybeNode) => node is import("yuku-parser").TSDeclareFunction;
|
|
181
|
+
TSTypeAliasDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSTypeAliasDeclaration;
|
|
182
|
+
TSInterfaceDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSInterfaceDeclaration;
|
|
183
|
+
TSEnumDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSEnumDeclaration;
|
|
184
|
+
TSModuleDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSModuleDeclaration;
|
|
185
|
+
TSImportEqualsDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSImportEqualsDeclaration;
|
|
186
|
+
Identifier: (node: MaybeNode) => node is import("yuku-parser").Identifier;
|
|
187
|
+
Literal: (node: MaybeNode) => node is NodeOfType<"Literal">;
|
|
188
|
+
ThisExpression: (node: MaybeNode) => node is import("yuku-parser").ThisExpression;
|
|
189
|
+
Super: (node: MaybeNode) => node is import("yuku-parser").Super;
|
|
190
|
+
ArrayExpression: (node: MaybeNode) => node is import("yuku-parser").ArrayExpression;
|
|
191
|
+
ObjectExpression: (node: MaybeNode) => node is import("yuku-parser").ObjectExpression;
|
|
192
|
+
FunctionExpression: (node: MaybeNode) => node is import("yuku-parser").FunctionExpression;
|
|
193
|
+
ArrowFunctionExpression: (node: MaybeNode) => node is import("yuku-parser").ArrowFunctionExpression;
|
|
194
|
+
ClassExpression: (node: MaybeNode) => node is import("yuku-parser").ClassExpression;
|
|
195
|
+
TaggedTemplateExpression: (node: MaybeNode) => node is import("yuku-parser").TaggedTemplateExpression;
|
|
196
|
+
TemplateLiteral: (node: MaybeNode) => node is import("yuku-parser").TemplateLiteral;
|
|
197
|
+
MemberExpression: (node: MaybeNode) => node is NodeOfType<"MemberExpression">;
|
|
198
|
+
CallExpression: (node: MaybeNode) => node is import("yuku-parser").CallExpression;
|
|
199
|
+
NewExpression: (node: MaybeNode) => node is import("yuku-parser").NewExpression;
|
|
200
|
+
ChainExpression: (node: MaybeNode) => node is import("yuku-parser").ChainExpression;
|
|
201
|
+
SequenceExpression: (node: MaybeNode) => node is import("yuku-parser").SequenceExpression;
|
|
202
|
+
ParenthesizedExpression: (node: MaybeNode) => node is import("yuku-parser").ParenthesizedExpression;
|
|
203
|
+
BinaryExpression: (node: MaybeNode) => node is import("yuku-parser").BinaryExpression;
|
|
204
|
+
LogicalExpression: (node: MaybeNode) => node is import("yuku-parser").LogicalExpression;
|
|
205
|
+
ConditionalExpression: (node: MaybeNode) => node is import("yuku-parser").ConditionalExpression;
|
|
206
|
+
UnaryExpression: (node: MaybeNode) => node is import("yuku-parser").UnaryExpression;
|
|
207
|
+
UpdateExpression: (node: MaybeNode) => node is import("yuku-parser").UpdateExpression;
|
|
208
|
+
AssignmentExpression: (node: MaybeNode) => node is import("yuku-parser").AssignmentExpression;
|
|
209
|
+
YieldExpression: (node: MaybeNode) => node is import("yuku-parser").YieldExpression;
|
|
210
|
+
AwaitExpression: (node: MaybeNode) => node is import("yuku-parser").AwaitExpression;
|
|
211
|
+
ImportExpression: (node: MaybeNode) => node is import("yuku-parser").ImportExpression;
|
|
212
|
+
MetaProperty: (node: MaybeNode) => node is import("yuku-parser").MetaProperty;
|
|
213
|
+
TSAsExpression: (node: MaybeNode) => node is import("yuku-parser").TSAsExpression;
|
|
214
|
+
TSSatisfiesExpression: (node: MaybeNode) => node is import("yuku-parser").TSSatisfiesExpression;
|
|
215
|
+
TSTypeAssertion: (node: MaybeNode) => node is import("yuku-parser").TSTypeAssertion;
|
|
216
|
+
TSNonNullExpression: (node: MaybeNode) => node is import("yuku-parser").TSNonNullExpression;
|
|
217
|
+
TSInstantiationExpression: (node: MaybeNode) => node is import("yuku-parser").TSInstantiationExpression;
|
|
218
|
+
JSXElement: (node: MaybeNode) => node is import("yuku-parser").JSXElement;
|
|
219
|
+
JSXFragment: (node: MaybeNode) => node is import("yuku-parser").JSXFragment;
|
|
220
|
+
ImportDeclaration: (node: MaybeNode) => node is import("yuku-parser").ImportDeclaration;
|
|
221
|
+
ExportNamedDeclaration: (node: MaybeNode) => node is import("yuku-parser").ExportNamedDeclaration;
|
|
222
|
+
ExportDefaultDeclaration: (node: MaybeNode) => node is import("yuku-parser").ExportDefaultDeclaration;
|
|
223
|
+
ExportAllDeclaration: (node: MaybeNode) => node is import("yuku-parser").ExportAllDeclaration;
|
|
224
|
+
TSExportAssignment: (node: MaybeNode) => node is import("yuku-parser").TSExportAssignment;
|
|
225
|
+
TSNamespaceExportDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSNamespaceExportDeclaration;
|
|
226
|
+
Property: (node: MaybeNode) => node is NodeOfType<"Property">;
|
|
227
|
+
SpreadElement: (node: MaybeNode) => node is import("yuku-parser").SpreadElement;
|
|
228
|
+
PrivateIdentifier: (node: MaybeNode) => node is import("yuku-parser").PrivateIdentifier;
|
|
229
|
+
TemplateElement: (node: MaybeNode) => node is import("yuku-parser").TemplateElement;
|
|
230
|
+
VariableDeclarator: (node: MaybeNode) => node is import("yuku-parser").VariableDeclarator;
|
|
231
|
+
CatchClause: (node: MaybeNode) => node is import("yuku-parser").CatchClause;
|
|
232
|
+
SwitchCase: (node: MaybeNode) => node is import("yuku-parser").SwitchCase;
|
|
233
|
+
RestElement: (node: MaybeNode) => node is import("yuku-parser").RestElement;
|
|
234
|
+
ArrayPattern: (node: MaybeNode) => node is import("yuku-parser").ArrayPattern;
|
|
235
|
+
ObjectPattern: (node: MaybeNode) => node is import("yuku-parser").ObjectPattern;
|
|
236
|
+
AssignmentPattern: (node: MaybeNode) => node is import("yuku-parser").AssignmentPattern;
|
|
237
|
+
ClassBody: (node: MaybeNode) => node is import("yuku-parser").ClassBody;
|
|
238
|
+
MethodDefinition: (node: MaybeNode) => node is import("yuku-parser").MethodDefinition;
|
|
239
|
+
TSAbstractMethodDefinition: (node: MaybeNode) => node is import("yuku-parser").TSAbstractMethodDefinition;
|
|
240
|
+
PropertyDefinition: (node: MaybeNode) => node is import("yuku-parser").PropertyDefinition;
|
|
241
|
+
TSAbstractPropertyDefinition: (node: MaybeNode) => node is import("yuku-parser").TSAbstractPropertyDefinition;
|
|
242
|
+
AccessorProperty: (node: MaybeNode) => node is import("yuku-parser").AccessorProperty;
|
|
243
|
+
TSAbstractAccessorProperty: (node: MaybeNode) => node is import("yuku-parser").TSAbstractAccessorProperty;
|
|
244
|
+
StaticBlock: (node: MaybeNode) => node is import("yuku-parser").StaticBlock;
|
|
245
|
+
Decorator: (node: MaybeNode) => node is import("yuku-parser").Decorator;
|
|
246
|
+
TSEmptyBodyFunctionExpression: (node: MaybeNode) => node is import("yuku-parser").TSEmptyBodyFunctionExpression;
|
|
247
|
+
ImportSpecifier: (node: MaybeNode) => node is import("yuku-parser").ImportSpecifier;
|
|
248
|
+
ImportDefaultSpecifier: (node: MaybeNode) => node is import("yuku-parser").ImportDefaultSpecifier;
|
|
249
|
+
ImportNamespaceSpecifier: (node: MaybeNode) => node is import("yuku-parser").ImportNamespaceSpecifier;
|
|
250
|
+
ImportAttribute: (node: MaybeNode) => node is import("yuku-parser").ImportAttribute;
|
|
251
|
+
ExportSpecifier: (node: MaybeNode) => node is import("yuku-parser").ExportSpecifier;
|
|
252
|
+
JSXOpeningElement: (node: MaybeNode) => node is import("yuku-parser").JSXOpeningElement;
|
|
253
|
+
JSXClosingElement: (node: MaybeNode) => node is import("yuku-parser").JSXClosingElement;
|
|
254
|
+
JSXOpeningFragment: (node: MaybeNode) => node is import("yuku-parser").JSXOpeningFragment;
|
|
255
|
+
JSXClosingFragment: (node: MaybeNode) => node is import("yuku-parser").JSXClosingFragment;
|
|
256
|
+
JSXIdentifier: (node: MaybeNode) => node is import("yuku-parser").JSXIdentifier;
|
|
257
|
+
JSXNamespacedName: (node: MaybeNode) => node is import("yuku-parser").JSXNamespacedName;
|
|
258
|
+
JSXMemberExpression: (node: MaybeNode) => node is import("yuku-parser").JSXMemberExpression;
|
|
259
|
+
JSXAttribute: (node: MaybeNode) => node is import("yuku-parser").JSXAttribute;
|
|
260
|
+
JSXSpreadAttribute: (node: MaybeNode) => node is import("yuku-parser").JSXSpreadAttribute;
|
|
261
|
+
JSXExpressionContainer: (node: MaybeNode) => node is import("yuku-parser").JSXExpressionContainer;
|
|
262
|
+
JSXEmptyExpression: (node: MaybeNode) => node is import("yuku-parser").JSXEmptyExpression;
|
|
263
|
+
JSXText: (node: MaybeNode) => node is import("yuku-parser").JSXText;
|
|
264
|
+
JSXSpreadChild: (node: MaybeNode) => node is import("yuku-parser").JSXSpreadChild;
|
|
265
|
+
TSTypeAnnotation: (node: MaybeNode) => node is import("yuku-parser").TSTypeAnnotation;
|
|
266
|
+
TSAnyKeyword: (node: MaybeNode) => node is import("yuku-parser").TSAnyKeyword;
|
|
267
|
+
TSUnknownKeyword: (node: MaybeNode) => node is import("yuku-parser").TSUnknownKeyword;
|
|
268
|
+
TSNeverKeyword: (node: MaybeNode) => node is import("yuku-parser").TSNeverKeyword;
|
|
269
|
+
TSVoidKeyword: (node: MaybeNode) => node is import("yuku-parser").TSVoidKeyword;
|
|
270
|
+
TSNullKeyword: (node: MaybeNode) => node is import("yuku-parser").TSNullKeyword;
|
|
271
|
+
TSUndefinedKeyword: (node: MaybeNode) => node is import("yuku-parser").TSUndefinedKeyword;
|
|
272
|
+
TSStringKeyword: (node: MaybeNode) => node is import("yuku-parser").TSStringKeyword;
|
|
273
|
+
TSNumberKeyword: (node: MaybeNode) => node is import("yuku-parser").TSNumberKeyword;
|
|
274
|
+
TSBigIntKeyword: (node: MaybeNode) => node is import("yuku-parser").TSBigIntKeyword;
|
|
275
|
+
TSBooleanKeyword: (node: MaybeNode) => node is import("yuku-parser").TSBooleanKeyword;
|
|
276
|
+
TSSymbolKeyword: (node: MaybeNode) => node is import("yuku-parser").TSSymbolKeyword;
|
|
277
|
+
TSObjectKeyword: (node: MaybeNode) => node is import("yuku-parser").TSObjectKeyword;
|
|
278
|
+
TSIntrinsicKeyword: (node: MaybeNode) => node is import("yuku-parser").TSIntrinsicKeyword;
|
|
279
|
+
TSThisType: (node: MaybeNode) => node is import("yuku-parser").TSThisType;
|
|
280
|
+
TSTypeReference: (node: MaybeNode) => node is import("yuku-parser").TSTypeReference;
|
|
281
|
+
TSTypeQuery: (node: MaybeNode) => node is import("yuku-parser").TSTypeQuery;
|
|
282
|
+
TSImportType: (node: MaybeNode) => node is import("yuku-parser").TSImportType;
|
|
283
|
+
TSLiteralType: (node: MaybeNode) => node is import("yuku-parser").TSLiteralType;
|
|
284
|
+
TSTemplateLiteralType: (node: MaybeNode) => node is import("yuku-parser").TSTemplateLiteralType;
|
|
285
|
+
TSArrayType: (node: MaybeNode) => node is import("yuku-parser").TSArrayType;
|
|
286
|
+
TSIndexedAccessType: (node: MaybeNode) => node is import("yuku-parser").TSIndexedAccessType;
|
|
287
|
+
TSTupleType: (node: MaybeNode) => node is import("yuku-parser").TSTupleType;
|
|
288
|
+
TSNamedTupleMember: (node: MaybeNode) => node is import("yuku-parser").TSNamedTupleMember;
|
|
289
|
+
TSJSDocNullableType: (node: MaybeNode) => node is import("yuku-parser").TSJSDocNullableType;
|
|
290
|
+
TSJSDocNonNullableType: (node: MaybeNode) => node is import("yuku-parser").TSJSDocNonNullableType;
|
|
291
|
+
TSJSDocUnknownType: (node: MaybeNode) => node is import("yuku-parser").TSJSDocUnknownType;
|
|
292
|
+
TSUnionType: (node: MaybeNode) => node is import("yuku-parser").TSUnionType;
|
|
293
|
+
TSIntersectionType: (node: MaybeNode) => node is import("yuku-parser").TSIntersectionType;
|
|
294
|
+
TSConditionalType: (node: MaybeNode) => node is import("yuku-parser").TSConditionalType;
|
|
295
|
+
TSInferType: (node: MaybeNode) => node is import("yuku-parser").TSInferType;
|
|
296
|
+
TSTypeOperator: (node: MaybeNode) => node is import("yuku-parser").TSTypeOperator;
|
|
297
|
+
TSParenthesizedType: (node: MaybeNode) => node is import("yuku-parser").TSParenthesizedType;
|
|
298
|
+
TSFunctionType: (node: MaybeNode) => node is import("yuku-parser").TSFunctionType;
|
|
299
|
+
TSConstructorType: (node: MaybeNode) => node is import("yuku-parser").TSConstructorType;
|
|
300
|
+
TSTypePredicate: (node: MaybeNode) => node is import("yuku-parser").TSTypePredicate;
|
|
301
|
+
TSTypeLiteral: (node: MaybeNode) => node is import("yuku-parser").TSTypeLiteral;
|
|
302
|
+
TSMappedType: (node: MaybeNode) => node is import("yuku-parser").TSMappedType;
|
|
303
|
+
TSTypeParameter: (node: MaybeNode) => node is import("yuku-parser").TSTypeParameter;
|
|
304
|
+
TSTypeParameterDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSTypeParameterDeclaration;
|
|
305
|
+
TSTypeParameterInstantiation: (node: MaybeNode) => node is import("yuku-parser").TSTypeParameterInstantiation;
|
|
306
|
+
TSQualifiedName: (node: MaybeNode) => node is import("yuku-parser").TSQualifiedName;
|
|
307
|
+
TSPropertySignature: (node: MaybeNode) => node is import("yuku-parser").TSPropertySignature;
|
|
308
|
+
TSMethodSignature: (node: MaybeNode) => node is import("yuku-parser").TSMethodSignature;
|
|
309
|
+
TSCallSignatureDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSCallSignatureDeclaration;
|
|
310
|
+
TSConstructSignatureDeclaration: (node: MaybeNode) => node is import("yuku-parser").TSConstructSignatureDeclaration;
|
|
311
|
+
TSIndexSignature: (node: MaybeNode) => node is import("yuku-parser").TSIndexSignature;
|
|
312
|
+
TSInterfaceBody: (node: MaybeNode) => node is import("yuku-parser").TSInterfaceBody;
|
|
313
|
+
TSInterfaceHeritage: (node: MaybeNode) => node is import("yuku-parser").TSInterfaceHeritage;
|
|
314
|
+
TSClassImplements: (node: MaybeNode) => node is import("yuku-parser").TSClassImplements;
|
|
315
|
+
TSEnumBody: (node: MaybeNode) => node is import("yuku-parser").TSEnumBody;
|
|
316
|
+
TSEnumMember: (node: MaybeNode) => node is import("yuku-parser").TSEnumMember;
|
|
317
|
+
TSModuleBlock: (node: MaybeNode) => node is import("yuku-parser").TSModuleBlock;
|
|
318
|
+
TSParameterProperty: (node: MaybeNode) => node is import("yuku-parser").TSParameterProperty;
|
|
319
|
+
TSExternalModuleReference: (node: MaybeNode) => node is import("yuku-parser").TSExternalModuleReference;
|
|
320
|
+
TSOptionalType: (node: MaybeNode) => node is import("yuku-parser").TSOptionalType;
|
|
321
|
+
TSRestType: (node: MaybeNode) => node is import("yuku-parser").TSRestType;
|
|
322
|
+
};
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/builders.d.ts
|
|
325
|
+
declare const b: {
|
|
326
|
+
identifier(name: string, kind?: t.IdentifierKind, opts?: {
|
|
327
|
+
typeAnnotation?: t.TSTypeAnnotation | null;
|
|
328
|
+
optional?: boolean;
|
|
329
|
+
decorators?: t.Decorator[];
|
|
330
|
+
}): t.Identifier;
|
|
331
|
+
privateIdentifier(name: string): t.PrivateIdentifier;
|
|
332
|
+
stringLiteral(value: string): t.StringLiteral;
|
|
333
|
+
numericLiteral(value: number): t.NumericLiteral;
|
|
334
|
+
booleanLiteral(value: boolean): t.BooleanLiteral;
|
|
335
|
+
nullLiteral(): t.NullLiteral;
|
|
336
|
+
bigIntLiteral(value: bigint): t.BigIntLiteral;
|
|
337
|
+
regExpLiteral(pattern: string, flags?: string): t.RegExpLiteral;
|
|
338
|
+
templateLiteral(quasis: t.TemplateElement[], expressions: t.Expression[]): t.TemplateLiteral;
|
|
339
|
+
templateElement(cooked: string, tail?: boolean): t.TemplateElement;
|
|
340
|
+
thisExpression(): t.ThisExpression;
|
|
341
|
+
super(): t.Super;
|
|
342
|
+
arrayPattern(elements: Array<t.BindingPattern | t.RestElement | null>): t.ArrayPattern;
|
|
343
|
+
objectPattern(properties: Array<t.BindingProperty | t.RestElement>): t.ObjectPattern;
|
|
344
|
+
assignmentPattern(left: t.BindingPattern, right: t.Expression): t.AssignmentPattern;
|
|
345
|
+
restElement(argument: t.BindingPattern): t.RestElement; /** A member of an `ObjectExpression`. For an `ObjectPattern` member, use {@link bindingProperty}. */
|
|
346
|
+
objectProperty(key: t.PropertyKey, value: t.Expression, opts?: {
|
|
347
|
+
computed?: boolean;
|
|
348
|
+
shorthand?: boolean;
|
|
349
|
+
kind?: t.PropertyKind;
|
|
350
|
+
method?: boolean;
|
|
351
|
+
}): t.ObjectProperty; /** A member of an `ObjectPattern`, whose value is a binding target. For an `ObjectExpression` member, use {@link objectProperty}. */
|
|
352
|
+
bindingProperty(key: t.PropertyKey, value: t.BindingPattern, opts?: {
|
|
353
|
+
computed?: boolean;
|
|
354
|
+
shorthand?: boolean;
|
|
355
|
+
}): t.BindingProperty;
|
|
356
|
+
arrayExpression(elements?: t.ArrayExpressionElement[]): t.ArrayExpression;
|
|
357
|
+
objectExpression(properties?: t.ObjectPropertyKind[]): t.ObjectExpression;
|
|
358
|
+
spreadElement(argument: t.Expression): t.SpreadElement;
|
|
359
|
+
sequenceExpression(expressions: t.Expression[]): t.SequenceExpression;
|
|
360
|
+
parenthesizedExpression(expression: t.Expression): t.ParenthesizedExpression;
|
|
361
|
+
unaryExpression(operator: t.UnaryOperator, argument: t.Expression): t.UnaryExpression;
|
|
362
|
+
updateExpression(operator: t.UpdateOperator, argument: t.Expression, prefix?: boolean): t.UpdateExpression;
|
|
363
|
+
binaryExpression(operator: t.BinaryOperator, left: t.Expression | t.PrivateIdentifier, right: t.Expression): t.BinaryExpression;
|
|
364
|
+
logicalExpression(operator: t.LogicalOperator, left: t.Expression, right: t.Expression): t.LogicalExpression;
|
|
365
|
+
assignmentExpression(operator: t.AssignmentOperator, left: t.AssignmentTarget, right: t.Expression): t.AssignmentExpression;
|
|
366
|
+
conditionalExpression(test: t.Expression, consequent: t.Expression, alternate: t.Expression): t.ConditionalExpression;
|
|
367
|
+
yieldExpression(argument?: t.Expression | null, delegate?: boolean): t.YieldExpression;
|
|
368
|
+
awaitExpression(argument: t.Expression): t.AwaitExpression;
|
|
369
|
+
memberExpression(object: t.Expression | t.Super, property: t.Expression | t.IdentifierName | t.PrivateIdentifier, opts?: {
|
|
370
|
+
computed?: boolean;
|
|
371
|
+
optional?: boolean;
|
|
372
|
+
}): t.MemberExpression;
|
|
373
|
+
callExpression(callee: t.Expression | t.Super, args?: t.Argument[], opts?: {
|
|
374
|
+
optional?: boolean;
|
|
375
|
+
typeArguments?: t.TSTypeParameterInstantiation | null;
|
|
376
|
+
}): t.CallExpression;
|
|
377
|
+
newExpression(callee: t.Expression, args?: t.Argument[], opts?: {
|
|
378
|
+
typeArguments?: t.TSTypeParameterInstantiation | null;
|
|
379
|
+
}): t.NewExpression;
|
|
380
|
+
chainExpression(expression: t.ChainElement): t.ChainExpression;
|
|
381
|
+
taggedTemplateExpression(tag: t.Expression, quasi: t.TemplateLiteral, opts?: {
|
|
382
|
+
typeArguments?: t.TSTypeParameterInstantiation | null;
|
|
383
|
+
}): t.TaggedTemplateExpression;
|
|
384
|
+
metaProperty(meta: string, property: string): t.MetaProperty;
|
|
385
|
+
importExpression(source: t.Expression, opts?: {
|
|
386
|
+
options?: t.Expression | null;
|
|
387
|
+
phase?: t.ImportPhase | null;
|
|
388
|
+
}): t.ImportExpression;
|
|
389
|
+
arrowFunctionExpression(params: t.FunctionParameter[], body: t.BlockStatement | t.Expression, opts?: {
|
|
390
|
+
async?: boolean;
|
|
391
|
+
typeParameters?: t.TSTypeParameterDeclaration | null;
|
|
392
|
+
returnType?: t.TSTypeAnnotation | null;
|
|
393
|
+
}): t.ArrowFunctionExpression;
|
|
394
|
+
functionExpression(params: t.FunctionParameter[], body: t.BlockStatement, opts?: {
|
|
395
|
+
id?: t.Identifier | null;
|
|
396
|
+
async?: boolean;
|
|
397
|
+
generator?: boolean;
|
|
398
|
+
}): t.FunctionExpression;
|
|
399
|
+
functionDeclaration(id: t.Identifier | null, params: t.FunctionParameter[], body: t.BlockStatement | null, opts?: {
|
|
400
|
+
async?: boolean;
|
|
401
|
+
generator?: boolean;
|
|
402
|
+
}): t.FunctionDeclaration;
|
|
403
|
+
classDeclaration(id: t.Identifier | null, body: t.ClassBody, opts?: {
|
|
404
|
+
superClass?: t.Expression | null;
|
|
405
|
+
decorators?: t.Decorator[];
|
|
406
|
+
typeParameters?: t.TSTypeParameterDeclaration | null;
|
|
407
|
+
abstract?: boolean;
|
|
408
|
+
}): t.ClassDeclaration;
|
|
409
|
+
classExpression(id: t.Identifier | null, body: t.ClassBody, opts?: {
|
|
410
|
+
superClass?: t.Expression | null;
|
|
411
|
+
decorators?: t.Decorator[];
|
|
412
|
+
}): t.ClassExpression;
|
|
413
|
+
classBody(body?: t.ClassElement[]): t.ClassBody;
|
|
414
|
+
methodDefinition(key: t.PropertyKey, value: t.FunctionExpression | t.TSEmptyBodyFunctionExpression, opts?: {
|
|
415
|
+
kind?: t.MethodDefinitionKind;
|
|
416
|
+
computed?: boolean;
|
|
417
|
+
static?: boolean;
|
|
418
|
+
}): t.MethodDefinition;
|
|
419
|
+
propertyDefinition(key: t.PropertyKey, value?: t.Expression | null, opts?: {
|
|
420
|
+
computed?: boolean;
|
|
421
|
+
static?: boolean;
|
|
422
|
+
decorators?: t.Decorator[];
|
|
423
|
+
}): t.PropertyDefinition;
|
|
424
|
+
accessorProperty(key: t.PropertyKey, value?: t.Expression | null, opts?: {
|
|
425
|
+
computed?: boolean;
|
|
426
|
+
static?: boolean;
|
|
427
|
+
}): t.AccessorProperty;
|
|
428
|
+
tsAbstractMethodDefinition(key: t.PropertyKey, value: t.FunctionExpression | t.TSEmptyBodyFunctionExpression, opts?: {
|
|
429
|
+
kind?: t.MethodDefinitionKind;
|
|
430
|
+
computed?: boolean;
|
|
431
|
+
static?: boolean;
|
|
432
|
+
}): t.TSAbstractMethodDefinition;
|
|
433
|
+
tsAbstractPropertyDefinition(key: t.PropertyKey, value?: t.Expression | null, opts?: {
|
|
434
|
+
computed?: boolean;
|
|
435
|
+
static?: boolean;
|
|
436
|
+
}): t.TSAbstractPropertyDefinition;
|
|
437
|
+
tsAbstractAccessorProperty(key: t.PropertyKey, value?: t.Expression | null, opts?: {
|
|
438
|
+
computed?: boolean;
|
|
439
|
+
static?: boolean;
|
|
440
|
+
}): t.TSAbstractAccessorProperty;
|
|
441
|
+
staticBlock(body?: t.Statement[]): t.StaticBlock;
|
|
442
|
+
decorator(expression: t.Expression): t.Decorator;
|
|
443
|
+
expressionStatement(expression: t.Expression): t.ExpressionStatement;
|
|
444
|
+
directive(value: string): t.Directive;
|
|
445
|
+
blockStatement(body?: t.Statement[]): t.BlockStatement;
|
|
446
|
+
emptyStatement(): t.EmptyStatement;
|
|
447
|
+
debuggerStatement(): t.DebuggerStatement;
|
|
448
|
+
returnStatement(argument?: t.Expression | null): t.ReturnStatement;
|
|
449
|
+
ifStatement(test: t.Expression, consequent: t.Statement, alternate?: t.Statement | null): t.IfStatement;
|
|
450
|
+
switchStatement(discriminant: t.Expression, cases: t.SwitchCase[]): t.SwitchStatement;
|
|
451
|
+
switchCase(test: t.Expression | null, consequent: t.Statement[]): t.SwitchCase;
|
|
452
|
+
throwStatement(argument: t.Expression): t.ThrowStatement;
|
|
453
|
+
tryStatement(block: t.BlockStatement, handler?: t.CatchClause | null, finalizer?: t.BlockStatement | null): t.TryStatement;
|
|
454
|
+
catchClause(param: t.BindingPattern | null, body: t.BlockStatement): t.CatchClause;
|
|
455
|
+
whileStatement(test: t.Expression, body: t.Statement): t.WhileStatement;
|
|
456
|
+
doWhileStatement(body: t.Statement, test: t.Expression): t.DoWhileStatement;
|
|
457
|
+
forStatement(init: t.ForStatementInit | null, test: t.Expression | null, update: t.Expression | null, body: t.Statement): t.ForStatement;
|
|
458
|
+
forInStatement(left: t.ForStatementLeft, right: t.Expression, body: t.Statement): t.ForInStatement;
|
|
459
|
+
forOfStatement(left: t.ForStatementLeft, right: t.Expression, body: t.Statement, isAwait?: boolean): t.ForOfStatement;
|
|
460
|
+
labeledStatement(label: t.LabelIdentifier, body: t.Statement): t.LabeledStatement;
|
|
461
|
+
breakStatement(label?: t.LabelIdentifier | null): t.BreakStatement;
|
|
462
|
+
continueStatement(label?: t.LabelIdentifier | null): t.ContinueStatement;
|
|
463
|
+
withStatement(object: t.Expression, body: t.Statement): t.WithStatement;
|
|
464
|
+
variableDeclaration(kind: t.VariableDeclarationKind, declarations: t.VariableDeclarator[]): t.VariableDeclaration;
|
|
465
|
+
variableDeclarator(id: t.BindingPattern, init?: t.Expression | null): t.VariableDeclarator;
|
|
466
|
+
importDeclaration(specifiers: t.ImportDeclarationSpecifier[], source: t.StringLiteral, opts?: {
|
|
467
|
+
attributes?: t.ImportAttribute[];
|
|
468
|
+
phase?: t.ImportPhase | null;
|
|
469
|
+
importKind?: t.ImportOrExportKind;
|
|
470
|
+
}): t.ImportDeclaration;
|
|
471
|
+
importSpecifier(imported: t.IdentifierName | t.StringLiteral, local: t.BindingIdentifier): t.ImportSpecifier;
|
|
472
|
+
importDefaultSpecifier(local: t.BindingIdentifier): t.ImportDefaultSpecifier;
|
|
473
|
+
importNamespaceSpecifier(local: t.BindingIdentifier): t.ImportNamespaceSpecifier;
|
|
474
|
+
importAttribute(key: t.ImportAttributeKey, value: t.StringLiteral): t.ImportAttribute;
|
|
475
|
+
exportNamedDeclaration(declaration: t.Declaration | null, specifiers?: t.ExportSpecifier[], opts?: {
|
|
476
|
+
source?: t.StringLiteral | null;
|
|
477
|
+
attributes?: t.ImportAttribute[];
|
|
478
|
+
exportKind?: t.ImportOrExportKind;
|
|
479
|
+
}): t.ExportNamedDeclaration;
|
|
480
|
+
exportDefaultDeclaration(declaration: t.ExportDefaultDeclarationKind): t.ExportDefaultDeclaration;
|
|
481
|
+
exportAllDeclaration(source: t.StringLiteral, opts?: {
|
|
482
|
+
exported?: t.ModuleExportName | null;
|
|
483
|
+
attributes?: t.ImportAttribute[];
|
|
484
|
+
exportKind?: t.ImportOrExportKind;
|
|
485
|
+
}): t.ExportAllDeclaration;
|
|
486
|
+
exportSpecifier(local: t.ModuleExportName, exported: t.ModuleExportName): t.ExportSpecifier;
|
|
487
|
+
jsxIdentifier(name: string): t.JSXIdentifier;
|
|
488
|
+
jsxNamespacedName(namespace: t.JSXIdentifier, name: t.JSXIdentifier): t.JSXNamespacedName;
|
|
489
|
+
jsxMemberExpression(object: t.JSXMemberExpressionObject, property: t.JSXIdentifier): t.JSXMemberExpression;
|
|
490
|
+
jsxElement(openingElement: t.JSXOpeningElement, children?: t.JSXChild[], closingElement?: t.JSXClosingElement | null): t.JSXElement;
|
|
491
|
+
jsxOpeningElement(name: t.JSXElementName, attributes?: t.JSXAttributeItem[], selfClosing?: boolean): t.JSXOpeningElement;
|
|
492
|
+
jsxClosingElement(name: t.JSXElementName): t.JSXClosingElement;
|
|
493
|
+
jsxOpeningFragment(): t.JSXOpeningFragment;
|
|
494
|
+
jsxClosingFragment(): t.JSXClosingFragment;
|
|
495
|
+
jsxFragment(children?: t.JSXChild[]): t.JSXFragment;
|
|
496
|
+
jsxAttribute(name: t.JSXAttributeName, value?: t.JSXAttributeValue | null): t.JSXAttribute;
|
|
497
|
+
jsxSpreadAttribute(argument: t.Expression): t.JSXSpreadAttribute;
|
|
498
|
+
jsxExpressionContainer(expression: t.JSXExpression): t.JSXExpressionContainer;
|
|
499
|
+
jsxEmptyExpression(): t.JSXEmptyExpression;
|
|
500
|
+
jsxText(value: string): t.JSXText;
|
|
501
|
+
jsxSpreadChild(expression: t.Expression): t.JSXSpreadChild;
|
|
502
|
+
tsTypeAnnotation(typeAnnotation: t.TSType): t.TSTypeAnnotation;
|
|
503
|
+
tsAnyKeyword: () => t.TSAnyKeyword;
|
|
504
|
+
tsUnknownKeyword: () => t.TSUnknownKeyword;
|
|
505
|
+
tsNeverKeyword: () => t.TSNeverKeyword;
|
|
506
|
+
tsVoidKeyword: () => t.TSVoidKeyword;
|
|
507
|
+
tsNullKeyword: () => t.TSNullKeyword;
|
|
508
|
+
tsUndefinedKeyword: () => t.TSUndefinedKeyword;
|
|
509
|
+
tsStringKeyword: () => t.TSStringKeyword;
|
|
510
|
+
tsNumberKeyword: () => t.TSNumberKeyword;
|
|
511
|
+
tsBigIntKeyword: () => t.TSBigIntKeyword;
|
|
512
|
+
tsBooleanKeyword: () => t.TSBooleanKeyword;
|
|
513
|
+
tsSymbolKeyword: () => t.TSSymbolKeyword;
|
|
514
|
+
tsObjectKeyword: () => t.TSObjectKeyword;
|
|
515
|
+
tsIntrinsicKeyword: () => t.TSIntrinsicKeyword;
|
|
516
|
+
tsThisType: () => t.TSThisType;
|
|
517
|
+
tsTypeReference(typeName: t.TSTypeName, typeArguments?: t.TSTypeParameterInstantiation | null): t.TSTypeReference;
|
|
518
|
+
tsQualifiedName(left: t.TSTypeName, right: t.IdentifierName): t.TSQualifiedName;
|
|
519
|
+
tsTypeQuery(exprName: t.TSTypeQueryExprName, typeArguments?: t.TSTypeParameterInstantiation | null): t.TSTypeQuery;
|
|
520
|
+
tsImportType(source: t.StringLiteral, opts?: {
|
|
521
|
+
options?: t.ObjectExpression | null;
|
|
522
|
+
qualifier?: t.TSImportTypeQualifier | null;
|
|
523
|
+
typeArguments?: t.TSTypeParameterInstantiation | null;
|
|
524
|
+
}): t.TSImportType;
|
|
525
|
+
tsTypeParameter(name: t.BindingIdentifier, opts?: {
|
|
526
|
+
constraint?: t.TSType | null;
|
|
527
|
+
default?: t.TSType | null;
|
|
528
|
+
in?: boolean;
|
|
529
|
+
out?: boolean;
|
|
530
|
+
const?: boolean;
|
|
531
|
+
}): t.TSTypeParameter;
|
|
532
|
+
tsTypeParameterDeclaration(params: t.TSTypeParameter[]): t.TSTypeParameterDeclaration;
|
|
533
|
+
tsTypeParameterInstantiation(params: t.TSType[]): t.TSTypeParameterInstantiation;
|
|
534
|
+
tsLiteralType(literal: t.TSLiteralType["literal"]): t.TSLiteralType;
|
|
535
|
+
tsTemplateLiteralType(quasis: t.TemplateElement[], types: t.TSType[]): t.TSTemplateLiteralType;
|
|
536
|
+
tsArrayType(elementType: t.TSType): t.TSArrayType;
|
|
537
|
+
tsIndexedAccessType(objectType: t.TSType, indexType: t.TSType): t.TSIndexedAccessType;
|
|
538
|
+
tsTupleType(elementTypes: t.TSTupleElement[]): t.TSTupleType;
|
|
539
|
+
tsNamedTupleMember(label: t.IdentifierName, elementType: t.TSType, optional?: boolean): t.TSNamedTupleMember;
|
|
540
|
+
tsOptionalType(typeAnnotation: t.TSType): t.TSOptionalType;
|
|
541
|
+
tsRestType(typeAnnotation: t.TSType | t.TSNamedTupleMember): t.TSRestType;
|
|
542
|
+
tsJSDocNullableType(typeAnnotation: t.TSType, postfix?: boolean): t.TSJSDocNullableType;
|
|
543
|
+
tsJSDocNonNullableType(typeAnnotation: t.TSType, postfix?: boolean): t.TSJSDocNonNullableType;
|
|
544
|
+
tsJSDocUnknownType(): t.TSJSDocUnknownType;
|
|
545
|
+
tsUnionType(types: t.TSType[]): t.TSUnionType;
|
|
546
|
+
tsIntersectionType(types: t.TSType[]): t.TSIntersectionType;
|
|
547
|
+
tsConditionalType(checkType: t.TSType, extendsType: t.TSType, trueType: t.TSType, falseType: t.TSType): t.TSConditionalType;
|
|
548
|
+
tsInferType(typeParameter: t.TSTypeParameter): t.TSInferType;
|
|
549
|
+
tsTypeOperator(operator: t.TSTypeOperator["operator"], typeAnnotation: t.TSType): t.TSTypeOperator;
|
|
550
|
+
tsParenthesizedType(typeAnnotation: t.TSType): t.TSParenthesizedType;
|
|
551
|
+
tsFunctionType(params: t.FunctionParameter[], returnType: t.TSTypeAnnotation | null, typeParameters?: t.TSTypeParameterDeclaration | null): t.TSFunctionType;
|
|
552
|
+
tsConstructorType(params: t.FunctionParameter[], returnType: t.TSTypeAnnotation | null, opts?: {
|
|
553
|
+
abstract?: boolean;
|
|
554
|
+
typeParameters?: t.TSTypeParameterDeclaration | null;
|
|
555
|
+
}): t.TSConstructorType;
|
|
556
|
+
tsTypePredicate(parameterName: t.TSTypePredicateName, typeAnnotation?: t.TSTypeAnnotation | null, asserts?: boolean): t.TSTypePredicate;
|
|
557
|
+
tsTypeLiteral(members: t.TSSignature[]): t.TSTypeLiteral;
|
|
558
|
+
tsMappedType(key: t.BindingIdentifier, constraint: t.TSType, opts?: {
|
|
559
|
+
nameType?: t.TSType | null;
|
|
560
|
+
typeAnnotation?: t.TSType | null;
|
|
561
|
+
optional?: t.TSMappedTypeModifierOperator | false;
|
|
562
|
+
readonly?: t.TSMappedTypeModifierOperator | null;
|
|
563
|
+
}): t.TSMappedType;
|
|
564
|
+
tsPropertySignature(key: t.PropertyKey, opts?: {
|
|
565
|
+
typeAnnotation?: t.TSTypeAnnotation | null;
|
|
566
|
+
computed?: boolean;
|
|
567
|
+
optional?: boolean;
|
|
568
|
+
readonly?: boolean;
|
|
569
|
+
}): t.TSPropertySignature;
|
|
570
|
+
tsMethodSignature(key: t.PropertyKey, params: t.FunctionParameter[], opts?: {
|
|
571
|
+
kind?: t.TSMethodSignatureKind;
|
|
572
|
+
computed?: boolean;
|
|
573
|
+
optional?: boolean;
|
|
574
|
+
typeParameters?: t.TSTypeParameterDeclaration | null;
|
|
575
|
+
returnType?: t.TSTypeAnnotation | null;
|
|
576
|
+
}): t.TSMethodSignature;
|
|
577
|
+
tsCallSignatureDeclaration(params: t.FunctionParameter[], returnType?: t.TSTypeAnnotation | null, typeParameters?: t.TSTypeParameterDeclaration | null): t.TSCallSignatureDeclaration;
|
|
578
|
+
tsConstructSignatureDeclaration(params: t.FunctionParameter[], returnType?: t.TSTypeAnnotation | null, typeParameters?: t.TSTypeParameterDeclaration | null): t.TSConstructSignatureDeclaration;
|
|
579
|
+
tsIndexSignature(parameters: t.BindingIdentifier[], typeAnnotation: t.TSTypeAnnotation, opts?: {
|
|
580
|
+
readonly?: boolean;
|
|
581
|
+
static?: boolean;
|
|
582
|
+
}): t.TSIndexSignature;
|
|
583
|
+
tsTypeAliasDeclaration(id: t.BindingIdentifier, typeAnnotation: t.TSType, opts?: {
|
|
584
|
+
typeParameters?: t.TSTypeParameterDeclaration | null;
|
|
585
|
+
declare?: boolean;
|
|
586
|
+
}): t.TSTypeAliasDeclaration;
|
|
587
|
+
tsInterfaceDeclaration(id: t.BindingIdentifier, body: t.TSInterfaceBody, opts?: {
|
|
588
|
+
extends?: t.TSInterfaceHeritage[];
|
|
589
|
+
typeParameters?: t.TSTypeParameterDeclaration | null;
|
|
590
|
+
declare?: boolean;
|
|
591
|
+
}): t.TSInterfaceDeclaration;
|
|
592
|
+
tsInterfaceBody(body: t.TSSignature[]): t.TSInterfaceBody;
|
|
593
|
+
tsInterfaceHeritage(expression: t.Expression, typeArguments?: t.TSTypeParameterInstantiation | null): t.TSInterfaceHeritage;
|
|
594
|
+
tsClassImplements(expression: t.Expression, typeArguments?: t.TSTypeParameterInstantiation | null): t.TSClassImplements;
|
|
595
|
+
tsEnumDeclaration(id: t.BindingIdentifier, body: t.TSEnumBody, opts?: {
|
|
596
|
+
const?: boolean;
|
|
597
|
+
declare?: boolean;
|
|
598
|
+
}): t.TSEnumDeclaration;
|
|
599
|
+
tsEnumBody(members: t.TSEnumMember[]): t.TSEnumBody;
|
|
600
|
+
tsEnumMember(id: t.TSEnumMemberName, initializer?: t.Expression | null): t.TSEnumMember;
|
|
601
|
+
tsModuleDeclaration(id: t.TSModuleDeclaration["id"], body: t.TSModuleBlock | undefined, opts?: {
|
|
602
|
+
kind?: t.TSModuleDeclarationKind;
|
|
603
|
+
declare?: boolean;
|
|
604
|
+
global?: boolean;
|
|
605
|
+
}): t.TSModuleDeclaration;
|
|
606
|
+
tsModuleBlock(body?: t.Statement[]): t.TSModuleBlock;
|
|
607
|
+
tsParameterProperty(parameter: t.BindingIdentifier | t.AssignmentPattern, opts?: {
|
|
608
|
+
accessibility?: t.TSAccessibility | null;
|
|
609
|
+
readonly?: boolean;
|
|
610
|
+
override?: boolean;
|
|
611
|
+
decorators?: t.Decorator[];
|
|
612
|
+
}): t.TSParameterProperty;
|
|
613
|
+
tsAsExpression(expression: t.Expression, typeAnnotation: t.TSType): t.TSAsExpression;
|
|
614
|
+
tsSatisfiesExpression(expression: t.Expression, typeAnnotation: t.TSType): t.TSSatisfiesExpression;
|
|
615
|
+
tsTypeAssertion(typeAnnotation: t.TSType, expression: t.Expression): t.TSTypeAssertion;
|
|
616
|
+
tsNonNullExpression(expression: t.Expression): t.TSNonNullExpression;
|
|
617
|
+
tsInstantiationExpression(expression: t.Expression, typeArguments: t.TSTypeParameterInstantiation): t.TSInstantiationExpression;
|
|
618
|
+
tsExportAssignment(expression: t.Expression): t.TSExportAssignment;
|
|
619
|
+
tsNamespaceExportDeclaration(id: t.IdentifierName): t.TSNamespaceExportDeclaration;
|
|
620
|
+
tsImportEqualsDeclaration(id: t.BindingIdentifier, moduleReference: t.TSModuleReference, importKind?: t.ImportOrExportKind): t.TSImportEqualsDeclaration;
|
|
621
|
+
tsExternalModuleReference(expression: t.StringLiteral): t.TSExternalModuleReference;
|
|
622
|
+
tsDeclareFunction(id: t.BindingIdentifier | null, params: t.FunctionParameter[], opts?: {
|
|
623
|
+
async?: boolean;
|
|
624
|
+
generator?: boolean;
|
|
625
|
+
returnType?: t.TSTypeAnnotation | null;
|
|
626
|
+
typeParameters?: t.TSTypeParameterDeclaration | null;
|
|
627
|
+
declare?: boolean;
|
|
628
|
+
}): t.TSDeclareFunction;
|
|
629
|
+
tsEmptyBodyFunctionExpression(params: t.FunctionParameter[], opts?: {
|
|
630
|
+
id?: t.BindingIdentifier | null;
|
|
631
|
+
returnType?: t.TSTypeAnnotation | null;
|
|
632
|
+
typeParameters?: t.TSTypeParameterDeclaration | null;
|
|
633
|
+
}): t.TSEmptyBodyFunctionExpression;
|
|
634
|
+
hashbang(value: string): t.Hashbang;
|
|
635
|
+
program(body?: Array<t.Statement | t.ModuleDeclaration | t.Directive>, opts?: {
|
|
636
|
+
sourceType?: t.ModuleKind;
|
|
637
|
+
hashbang?: t.Hashbang | null;
|
|
638
|
+
}): t.Program;
|
|
639
|
+
};
|
|
640
|
+
//#endregion
|
|
641
|
+
export { type AliasMap, type AliasName, type AsyncVisitFn, type AsyncVisitor, type AsyncVisitors, type ChildKeys, type NodeOfType, type NodeType, type Path, type VisitFn, type Visitor, type Visitors, b, is, walk, walkAsync };
|
|
642
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e={Expression:`Identifier.Literal.ThisExpression.Super.ArrayExpression.ObjectExpression.FunctionExpression.ArrowFunctionExpression.ClassExpression.TaggedTemplateExpression.TemplateLiteral.MemberExpression.CallExpression.NewExpression.ChainExpression.SequenceExpression.ParenthesizedExpression.BinaryExpression.LogicalExpression.ConditionalExpression.UnaryExpression.UpdateExpression.AssignmentExpression.YieldExpression.AwaitExpression.ImportExpression.MetaProperty.TSAsExpression.TSSatisfiesExpression.TSTypeAssertion.TSNonNullExpression.TSInstantiationExpression.JSXElement.JSXFragment`.split(`.`),Statement:`ExpressionStatement.BlockStatement.EmptyStatement.DebuggerStatement.ReturnStatement.LabeledStatement.BreakStatement.ContinueStatement.IfStatement.SwitchStatement.ThrowStatement.TryStatement.WhileStatement.DoWhileStatement.ForStatement.ForInStatement.ForOfStatement.WithStatement.FunctionDeclaration.ClassDeclaration.VariableDeclaration.TSDeclareFunction.TSTypeAliasDeclaration.TSInterfaceDeclaration.TSEnumDeclaration.TSModuleDeclaration.TSImportEqualsDeclaration`.split(`.`),Declaration:[`FunctionDeclaration`,`ClassDeclaration`,`VariableDeclaration`,`TSDeclareFunction`,`TSTypeAliasDeclaration`,`TSInterfaceDeclaration`,`TSEnumDeclaration`,`TSModuleDeclaration`,`TSImportEqualsDeclaration`],ModuleDeclaration:[`ImportDeclaration`,`ExportNamedDeclaration`,`ExportDefaultDeclaration`,`ExportAllDeclaration`,`TSExportAssignment`,`TSNamespaceExportDeclaration`],Function:[`FunctionDeclaration`,`FunctionExpression`,`ArrowFunctionExpression`,`TSDeclareFunction`,`TSEmptyBodyFunctionExpression`],Class:[`ClassDeclaration`,`ClassExpression`],Method:[`MethodDefinition`,`TSAbstractMethodDefinition`],Loop:[`ForStatement`,`ForInStatement`,`ForOfStatement`,`WhileStatement`,`DoWhileStatement`],Pattern:[`Identifier`,`ArrayPattern`,`ObjectPattern`,`AssignmentPattern`,`RestElement`],JSX:[`JSXElement`,`JSXOpeningElement`,`JSXClosingElement`,`JSXFragment`,`JSXOpeningFragment`,`JSXClosingFragment`,`JSXIdentifier`,`JSXNamespacedName`,`JSXMemberExpression`,`JSXAttribute`,`JSXSpreadAttribute`,`JSXExpressionContainer`,`JSXEmptyExpression`,`JSXText`,`JSXSpreadChild`],TSType:`TSAnyKeyword.TSUnknownKeyword.TSNeverKeyword.TSVoidKeyword.TSNullKeyword.TSUndefinedKeyword.TSStringKeyword.TSNumberKeyword.TSBigIntKeyword.TSBooleanKeyword.TSSymbolKeyword.TSObjectKeyword.TSIntrinsicKeyword.TSThisType.TSTypeReference.TSTypeQuery.TSImportType.TSLiteralType.TSTemplateLiteralType.TSArrayType.TSIndexedAccessType.TSTupleType.TSNamedTupleMember.TSJSDocNullableType.TSJSDocNonNullableType.TSJSDocUnknownType.TSUnionType.TSIntersectionType.TSConditionalType.TSInferType.TSTypeOperator.TSParenthesizedType.TSFunctionType.TSConstructorType.TSTypePredicate.TSTypeLiteral.TSMappedType`.split(`.`)},t={Program:[`hashbang`,`body`],Hashbang:[],Identifier:[`decorators`,`typeAnnotation`],PrivateIdentifier:[],Literal:[],TemplateElement:[],Super:[],ThisExpression:[],ArrayPattern:[`decorators`,`elements`,`typeAnnotation`],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],AssignmentPattern:[`decorators`,`left`,`right`,`typeAnnotation`],RestElement:[`decorators`,`argument`,`typeAnnotation`],Property:[`key`,`value`],SequenceExpression:[`expressions`],ParenthesizedExpression:[`expression`],BinaryExpression:[`left`,`right`],LogicalExpression:[`left`,`right`],ConditionalExpression:[`test`,`consequent`,`alternate`],UnaryExpression:[`argument`],UpdateExpression:[`argument`],AssignmentExpression:[`left`,`right`],YieldExpression:[`argument`],AwaitExpression:[`argument`],ArrayExpression:[`elements`],ObjectExpression:[`properties`],SpreadElement:[`argument`],MemberExpression:[`object`,`property`],CallExpression:[`callee`,`typeArguments`,`arguments`],ChainExpression:[`expression`],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],NewExpression:[`callee`,`typeArguments`,`arguments`],MetaProperty:[`meta`,`property`],ImportExpression:[`source`,`options`],TemplateLiteral:[`quasis`,`expressions`],ExpressionStatement:[`expression`],BlockStatement:[`body`],IfStatement:[`test`,`consequent`,`alternate`],SwitchStatement:[`discriminant`,`cases`],SwitchCase:[`test`,`consequent`],ForStatement:[`init`,`test`,`update`,`body`],ForInStatement:[`left`,`right`,`body`],ForOfStatement:[`left`,`right`,`body`],WhileStatement:[`test`,`body`],DoWhileStatement:[`body`,`test`],BreakStatement:[`label`],ContinueStatement:[`label`],LabeledStatement:[`label`,`body`],WithStatement:[`object`,`body`],ReturnStatement:[`argument`],ThrowStatement:[`argument`],TryStatement:[`block`,`handler`,`finalizer`],CatchClause:[`param`,`body`],DebuggerStatement:[],EmptyStatement:[],VariableDeclaration:[`declarations`],VariableDeclarator:[`id`,`init`],FunctionDeclaration:[`id`,`typeParameters`,`params`,`returnType`,`body`],FunctionExpression:[`id`,`typeParameters`,`params`,`returnType`,`body`],TSDeclareFunction:[`id`,`typeParameters`,`params`,`returnType`],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],ArrowFunctionExpression:[`typeParameters`,`params`,`returnType`,`body`],ClassDeclaration:[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`implements`,`body`],ClassExpression:[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`implements`,`body`],ClassBody:[`body`],MethodDefinition:[`decorators`,`key`,`value`],TSAbstractMethodDefinition:[`decorators`,`key`,`value`],PropertyDefinition:[`decorators`,`key`,`typeAnnotation`,`value`],TSAbstractPropertyDefinition:[`decorators`,`key`,`typeAnnotation`,`value`],AccessorProperty:[`decorators`,`key`,`typeAnnotation`,`value`],TSAbstractAccessorProperty:[`decorators`,`key`,`typeAnnotation`,`value`],StaticBlock:[`body`],Decorator:[`expression`],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportSpecifier:[`imported`,`local`],ImportDefaultSpecifier:[`local`],ImportNamespaceSpecifier:[`local`],ImportAttribute:[`key`,`value`],ExportNamedDeclaration:[`declaration`,`specifiers`,`source`,`attributes`],ExportDefaultDeclaration:[`declaration`],ExportAllDeclaration:[`exported`,`source`,`attributes`],ExportSpecifier:[`local`,`exported`],JSXElement:[`openingElement`,`children`,`closingElement`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXClosingElement:[`name`],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXOpeningFragment:[],JSXClosingFragment:[],JSXIdentifier:[],JSXNamespacedName:[`namespace`,`name`],JSXMemberExpression:[`object`,`property`],JSXAttribute:[`name`,`value`],JSXSpreadAttribute:[`argument`],JSXExpressionContainer:[`expression`],JSXEmptyExpression:[],JSXText:[],JSXSpreadChild:[`expression`],TSTypeAnnotation:[`typeAnnotation`],TSAnyKeyword:[],TSUnknownKeyword:[],TSNeverKeyword:[],TSVoidKeyword:[],TSNullKeyword:[],TSUndefinedKeyword:[],TSStringKeyword:[],TSNumberKeyword:[],TSBigIntKeyword:[],TSBooleanKeyword:[],TSSymbolKeyword:[],TSObjectKeyword:[],TSIntrinsicKeyword:[],TSThisType:[],TSTypeReference:[`typeName`,`typeArguments`],TSQualifiedName:[`left`,`right`],TSTypeQuery:[`exprName`,`typeArguments`],TSImportType:[`source`,`options`,`qualifier`,`typeArguments`],TSTypeParameter:[`name`,`constraint`,`default`],TSTypeParameterDeclaration:[`params`],TSTypeParameterInstantiation:[`params`],TSLiteralType:[`literal`],TSTemplateLiteralType:[`quasis`,`types`],TSArrayType:[`elementType`],TSIndexedAccessType:[`objectType`,`indexType`],TSTupleType:[`elementTypes`],TSNamedTupleMember:[`label`,`elementType`],TSOptionalType:[`typeAnnotation`],TSRestType:[`typeAnnotation`],TSJSDocNullableType:[`typeAnnotation`],TSJSDocNonNullableType:[`typeAnnotation`],TSJSDocUnknownType:[],TSUnionType:[`types`],TSIntersectionType:[`types`],TSConditionalType:[`checkType`,`extendsType`,`trueType`,`falseType`],TSInferType:[`typeParameter`],TSTypeOperator:[`typeAnnotation`],TSParenthesizedType:[`typeAnnotation`],TSFunctionType:[`typeParameters`,`params`,`returnType`],TSConstructorType:[`typeParameters`,`params`,`returnType`],TSTypePredicate:[`parameterName`,`typeAnnotation`],TSTypeLiteral:[`members`],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSPropertySignature:[`key`,`typeAnnotation`],TSMethodSignature:[`key`,`typeParameters`,`params`,`returnType`],TSCallSignatureDeclaration:[`typeParameters`,`params`,`returnType`],TSConstructSignatureDeclaration:[`typeParameters`,`params`,`returnType`],TSIndexSignature:[`parameters`,`typeAnnotation`],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSInterfaceDeclaration:[`id`,`typeParameters`,`extends`,`body`],TSInterfaceBody:[`body`],TSInterfaceHeritage:[`expression`,`typeArguments`],TSClassImplements:[`expression`,`typeArguments`],TSEnumDeclaration:[`id`,`body`],TSEnumBody:[`members`],TSEnumMember:[`id`,`initializer`],TSModuleDeclaration:[`id`,`body`],TSModuleBlock:[`body`],TSParameterProperty:[`decorators`,`parameter`],TSAsExpression:[`expression`,`typeAnnotation`],TSSatisfiesExpression:[`expression`,`typeAnnotation`],TSTypeAssertion:[`typeAnnotation`,`expression`],TSNonNullExpression:[`expression`],TSInstantiationExpression:[`expression`,`typeArguments`],TSExportAssignment:[`expression`],TSNamespaceExportDeclaration:[`id`],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSExternalModuleReference:[`expression`]},n=Symbol(`yuku-walk/removed`),r=e=>e;var i=class{walker;parentPath;node;parent;key;index;constructor(e,t,n,r,i,a){this.walker=e,this.parentPath=t,this.node=n,this.parent=r,this.key=i,this.index=a}get state(){return this.walker.state}set state(e){this.walker.state=e}get ancestors(){let e=[];for(let t=this.parentPath;t!==null;t=t.parentPath)e.push(t.node);return e.reverse()}skip(){this.walker.skipFlag=!0}stop(){this.walker.stopFlag=!0}replace(e){e.start===0&&e.end===0&&(e.start=this.node.start,e.end=this.node.end),this.node=e,this.walker.replacement=e;let{parent:t,key:n,index:i}=this;if(t===null||n===null)return;let a=r(t);i===null?a[n]=e:a[n][i]=e}remove(){if(this.parent===null)throw Error(`yuku-walk: cannot remove the root node`);this.walker.removeFlag=!0}insertBefore(e){this.insertSibling(e,0)}insertAfter(e){this.insertSibling(e,1)}insertSibling(e,t){let{parent:n,key:i,index:a}=this;if(n===null||i===null||a===null)throw Error(`yuku-walk: insertBefore/insertAfter require a node in an array field`);let o=r(n)[i],s=o.indexOf(this.node);s!==-1&&o.splice(s+t,0,e)}},a=class{state;skipFlag=!1;stopFlag=!1;removeFlag=!1;replacement=null;universalEnter;universalLeave;concrete=new Map;aliasHandlers=[];cache=Object.create(null);constructor(t,n){this.state=n;let r=t,i=e;for(let e in r){let t=r[e];if(!t)continue;if(e===`enter`){typeof t==`function`&&(this.universalEnter=t);continue}if(e===`leave`){typeof t==`function`&&(this.universalLeave=t);continue}let n=typeof t==`function`?t:t.enter,a=typeof t==`function`?void 0:t.leave,o=i[e];if(o)this.aliasHandlers.push({types:new Set(o),enter:n,leave:a});else{let t=this.concrete.get(e);this.concrete.set(e,{enter:n??t?.enter,leave:a??t?.leave})}}}dispatchFor(e){let n=this.cache[e];if(n!==void 0)return n;let r=[],i=[],a=this.concrete.get(e);this.universalEnter&&r.push(this.universalEnter);for(let t=0;t<this.aliasHandlers.length;t++){let n=this.aliasHandlers[t];n.enter&&n.types.has(e)&&r.push(n.enter)}a?.enter&&r.push(a.enter),a?.leave&&i.push(a.leave);for(let t=this.aliasHandlers.length-1;t>=0;t--){let n=this.aliasHandlers[t];n.leave&&n.types.has(e)&&i.push(n.leave)}return this.universalLeave&&i.push(this.universalLeave),this.cache[e]={enter:r,leave:i,keys:t[e]}}newPath(e,t,n,r,a){return new i(this,e,n,t,r,a)}},o=class extends a{run(e){let t=this.visit(null,null,e,null,null);return t===n?e:t}apply(e,t,n){this.removeFlag=!1;for(let r=0;r<e.length&&(this.replacement=null,e[r](t,n),this.replacement!==null&&(t=this.replacement),!(this.removeFlag||this.stopFlag));r++);return t}visit(e,t,r,i,a){if(this.stopFlag)return r;let o=this.newPath(e,t,r,i,a);this.skipFlag=!1;let s=this.dispatchFor(r.type);if(s.enter.length>0){let e=r;if(r=this.apply(s.enter,r,o),this.removeFlag)return n;if(this.stopFlag)return r;r!==e&&(s=this.dispatchFor(r.type))}if(!this.skipFlag&&s.keys.length>0&&(this.descend(o,r,s.keys),this.stopFlag))return r;if(s.leave.length>0){if(r=this.apply(s.leave,r,o),this.removeFlag)return n;if(this.stopFlag)return r}return r}descend(e,t,i){let a=r(t);for(let r=0;r<i.length;r++){let o=i[r],s=a[o];if(s!=null){if(Array.isArray(s))for(let r=0;r<s.length;r++){let i=s[r];if(i==null)continue;let a=s.length;if(this.visit(e,t,i,o,r)===n?(s.splice(r,1),r--):r+=s.length-a,this.stopFlag)return}else if(this.visit(e,t,s,o,null)===n&&(a[o]=null),this.stopFlag)return}}}};function s(e,t,n){return new o(t,n).run(e)}var c=class extends a{async run(e){let t=await this.visit(null,null,e,null,null);return t===n?e:t}async apply(e,t,n){this.removeFlag=!1;for(let r=0;r<e.length&&(this.replacement=null,await e[r](t,n),this.replacement!==null&&(t=this.replacement),!(this.removeFlag||this.stopFlag));r++);return t}async visit(e,t,r,i,a){if(this.stopFlag)return r;let o=this.newPath(e,t,r,i,a);this.skipFlag=!1;let s=this.dispatchFor(r.type);if(s.enter.length>0){let e=r;if(r=await this.apply(s.enter,r,o),this.removeFlag)return n;if(this.stopFlag)return r;r!==e&&(s=this.dispatchFor(r.type))}if(!this.skipFlag&&s.keys.length>0&&(await this.descend(o,r,s.keys),this.stopFlag))return r;if(s.leave.length>0){if(r=await this.apply(s.leave,r,o),this.removeFlag)return n;if(this.stopFlag)return r}return r}async descend(e,t,i){let a=r(t);for(let r=0;r<i.length;r++){let o=i[r],s=a[o];if(s!=null){if(Array.isArray(s))for(let r=0;r<s.length;r++){let i=s[r];if(i==null)continue;let a=s.length;if(await this.visit(e,t,i,o,r)===n?(s.splice(r,1),r--):r+=s.length-a,this.stopFlag)return}else if(await this.visit(e,t,s,o,null)===n&&(a[o]=null),this.stopFlag)return}}}};function l(e,t,n){return new c(t,n).run(e)}function u(t){let n=new Set(e[t]);return e=>e!=null&&n.has(e.type)}const d={...Object.fromEntries(Object.keys(t).map(e=>[e,t=>t!=null&&t.type===e])),Expression:u(`Expression`),Statement:u(`Statement`),Declaration:u(`Declaration`),ModuleDeclaration:u(`ModuleDeclaration`),Function:u(`Function`),Class:u(`Class`),Method:u(`Method`),Loop:u(`Loop`),Pattern:u(`Pattern`),JSX:u(`JSX`),TSType:u(`TSType`),IdentifierReference:e=>e?.type===`Identifier`&&e.kind===`reference`,BindingIdentifier:e=>e?.type===`Identifier`&&e.kind===`binding`,LabelIdentifier:e=>e?.type===`Identifier`&&e.kind===`label`,IdentifierName:e=>e?.type===`Identifier`&&e.kind===`name`,StringLiteral:e=>e?.type===`Literal`&&typeof e.value==`string`,NumericLiteral:e=>e?.type===`Literal`&&typeof e.value==`number`,BooleanLiteral:e=>e?.type===`Literal`&&typeof e.value==`boolean`,NullLiteral:e=>e?.type===`Literal`&&e.raw===`null`,BigIntLiteral:e=>e?.type===`Literal`&&`bigint`in e,RegExpLiteral:e=>e?.type===`Literal`&&`regex`in e,ComputedMemberExpression:e=>e?.type===`MemberExpression`&&e.computed,StaticMemberExpression:e=>e?.type===`MemberExpression`&&!e.computed&&e.property.type===`Identifier`,PrivateFieldExpression:e=>e?.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`,Directive:e=>e?.type===`ExpressionStatement`&&e.directive!=null},f={start:0,end:0},p=e=>e.type!==`Identifier`&&e.type!==`PrivateIdentifier`,m={identifier(e,t=`reference`,n={}){return{type:`Identifier`,name:e,kind:t,...n,...f}},privateIdentifier(e){return{type:`PrivateIdentifier`,name:e,...f}},stringLiteral(e){return{type:`Literal`,value:e,raw:JSON.stringify(e),...f}},numericLiteral(e){return{type:`Literal`,value:e,raw:String(e),...f}},booleanLiteral(e){return{type:`Literal`,value:e,raw:String(e),...f}},nullLiteral(){return{type:`Literal`,value:null,raw:`null`,...f}},bigIntLiteral(e){return{type:`Literal`,value:e,raw:`${e}n`,bigint:String(e),...f}},regExpLiteral(e,t=``){let n=null;try{n=new RegExp(e,t)}catch{}return{type:`Literal`,value:n,raw:`/${e}/${t}`,regex:{pattern:e,flags:t},...f}},templateLiteral(e,t){return{type:`TemplateLiteral`,quasis:e,expressions:t,...f}},templateElement(e,t=!1){return{type:`TemplateElement`,value:{raw:e,cooked:e},tail:t,...f}},thisExpression(){return{type:`ThisExpression`,...f}},super(){return{type:`Super`,...f}},arrayPattern(e){return{type:`ArrayPattern`,elements:e,...f}},objectPattern(e){return{type:`ObjectPattern`,properties:e,...f}},assignmentPattern(e,t){return{type:`AssignmentPattern`,left:e,right:t,...f}},restElement(e){return{type:`RestElement`,argument:e,...f}},objectProperty(e,t,n={}){return{type:`Property`,kind:n.kind??`init`,key:e,value:t,method:n.method??!1,shorthand:n.shorthand??!1,computed:n.computed??p(e),...f}},bindingProperty(e,t,n={}){return{type:`Property`,kind:`init`,key:e,value:t,method:!1,shorthand:n.shorthand??!1,computed:n.computed??p(e),...f}},arrayExpression(e=[]){return{type:`ArrayExpression`,elements:e,...f}},objectExpression(e=[]){return{type:`ObjectExpression`,properties:e,...f}},spreadElement(e){return{type:`SpreadElement`,argument:e,...f}},sequenceExpression(e){return{type:`SequenceExpression`,expressions:e,...f}},parenthesizedExpression(e){return{type:`ParenthesizedExpression`,expression:e,...f}},unaryExpression(e,t){return{type:`UnaryExpression`,operator:e,prefix:!0,argument:t,...f}},updateExpression(e,t,n=!1){return{type:`UpdateExpression`,operator:e,argument:t,prefix:n,...f}},binaryExpression(e,t,n){return{type:`BinaryExpression`,operator:e,left:t,right:n,...f}},logicalExpression(e,t,n){return{type:`LogicalExpression`,operator:e,left:t,right:n,...f}},assignmentExpression(e,t,n){return{type:`AssignmentExpression`,operator:e,left:t,right:n,...f}},conditionalExpression(e,t,n){return{type:`ConditionalExpression`,test:e,consequent:t,alternate:n,...f}},yieldExpression(e=null,t=!1){return{type:`YieldExpression`,delegate:t,argument:e,...f}},awaitExpression(e){return{type:`AwaitExpression`,argument:e,...f}},memberExpression(e,t,n={}){return{type:`MemberExpression`,object:e,property:t,computed:n.computed??p(t),optional:n.optional??!1,...f}},callExpression(e,t=[],n={}){return{type:`CallExpression`,callee:e,arguments:t,optional:n.optional??!1,...n,...f}},newExpression(e,t=[],n={}){return{type:`NewExpression`,callee:e,arguments:t,...n,...f}},chainExpression(e){return{type:`ChainExpression`,expression:e,...f}},taggedTemplateExpression(e,t,n={}){return{type:`TaggedTemplateExpression`,tag:e,quasi:t,...n,...f}},metaProperty(e,t){return{type:`MetaProperty`,meta:m.identifier(e,`name`),property:m.identifier(t,`name`),...f}},importExpression(e,t={}){return{type:`ImportExpression`,source:e,options:t.options??null,phase:t.phase??null,...f}},arrowFunctionExpression(e,t,n={}){return{type:`ArrowFunctionExpression`,id:null,generator:!1,async:n.async??!1,params:e,body:t,expression:t.type!==`BlockStatement`,...n,...f}},functionExpression(e,t,n={}){return{type:`FunctionExpression`,id:n.id??null,generator:n.generator??!1,async:n.async??!1,params:e,body:t,expression:!1,...f}},functionDeclaration(e,t,n,r={}){return{type:`FunctionDeclaration`,id:e,generator:r.generator??!1,async:r.async??!1,params:t,body:n,expression:!1,...f}},classDeclaration(e,t,n={}){return{type:`ClassDeclaration`,decorators:n.decorators??[],id:e,superClass:n.superClass??null,body:t,...n,...f}},classExpression(e,t,n={}){return{type:`ClassExpression`,decorators:n.decorators??[],id:e,superClass:n.superClass??null,body:t,...f}},classBody(e=[]){return{type:`ClassBody`,body:e,...f}},methodDefinition(e,t,n={}){return{type:`MethodDefinition`,decorators:[],key:e,value:t,kind:n.kind??`method`,computed:n.computed??p(e),static:n.static??!1,...f}},propertyDefinition(e,t=null,n={}){return{type:`PropertyDefinition`,decorators:n.decorators??[],key:e,value:t,computed:n.computed??p(e),static:n.static??!1,...f}},accessorProperty(e,t=null,n={}){return{type:`AccessorProperty`,decorators:[],key:e,value:t,computed:n.computed??p(e),static:n.static??!1,...f}},tsAbstractMethodDefinition(e,t,n={}){return{type:`TSAbstractMethodDefinition`,decorators:[],key:e,value:t,kind:n.kind??`method`,computed:n.computed??p(e),static:n.static??!1,...f}},tsAbstractPropertyDefinition(e,t=null,n={}){return{type:`TSAbstractPropertyDefinition`,decorators:[],key:e,value:t,computed:n.computed??p(e),static:n.static??!1,...f}},tsAbstractAccessorProperty(e,t=null,n={}){return{type:`TSAbstractAccessorProperty`,decorators:[],key:e,value:t,computed:n.computed??p(e),static:n.static??!1,...f}},staticBlock(e=[]){return{type:`StaticBlock`,body:e,...f}},decorator(e){return{type:`Decorator`,expression:e,...f}},expressionStatement(e){return{type:`ExpressionStatement`,expression:e,...f}},directive(e){return{type:`ExpressionStatement`,expression:m.stringLiteral(e),directive:e,...f}},blockStatement(e=[]){return{type:`BlockStatement`,body:e,...f}},emptyStatement(){return{type:`EmptyStatement`,...f}},debuggerStatement(){return{type:`DebuggerStatement`,...f}},returnStatement(e=null){return{type:`ReturnStatement`,argument:e,...f}},ifStatement(e,t,n=null){return{type:`IfStatement`,test:e,consequent:t,alternate:n,...f}},switchStatement(e,t){return{type:`SwitchStatement`,discriminant:e,cases:t,...f}},switchCase(e,t){return{type:`SwitchCase`,test:e,consequent:t,...f}},throwStatement(e){return{type:`ThrowStatement`,argument:e,...f}},tryStatement(e,t=null,n=null){return{type:`TryStatement`,block:e,handler:t,finalizer:n,...f}},catchClause(e,t){return{type:`CatchClause`,param:e,body:t,...f}},whileStatement(e,t){return{type:`WhileStatement`,test:e,body:t,...f}},doWhileStatement(e,t){return{type:`DoWhileStatement`,body:e,test:t,...f}},forStatement(e,t,n,r){return{type:`ForStatement`,init:e,test:t,update:n,body:r,...f}},forInStatement(e,t,n){return{type:`ForInStatement`,left:e,right:t,body:n,...f}},forOfStatement(e,t,n,r=!1){return{type:`ForOfStatement`,left:e,right:t,body:n,await:r,...f}},labeledStatement(e,t){return{type:`LabeledStatement`,label:e,body:t,...f}},breakStatement(e=null){return{type:`BreakStatement`,label:e,...f}},continueStatement(e=null){return{type:`ContinueStatement`,label:e,...f}},withStatement(e,t){return{type:`WithStatement`,object:e,body:t,...f}},variableDeclaration(e,t){return{type:`VariableDeclaration`,kind:e,declarations:t,...f}},variableDeclarator(e,t=null){return{type:`VariableDeclarator`,id:e,init:t,...f}},importDeclaration(e,t,n={}){return{type:`ImportDeclaration`,specifiers:e,source:t,phase:n.phase??null,attributes:n.attributes??[],...n,...f}},importSpecifier(e,t){return{type:`ImportSpecifier`,imported:e,local:t,...f}},importDefaultSpecifier(e){return{type:`ImportDefaultSpecifier`,local:e,...f}},importNamespaceSpecifier(e){return{type:`ImportNamespaceSpecifier`,local:e,...f}},importAttribute(e,t){return{type:`ImportAttribute`,key:e,value:t,...f}},exportNamedDeclaration(e,t=[],n={}){return{type:`ExportNamedDeclaration`,declaration:e,specifiers:t,source:n.source??null,attributes:n.attributes??[],...n,...f}},exportDefaultDeclaration(e){return{type:`ExportDefaultDeclaration`,declaration:e,...f}},exportAllDeclaration(e,t={}){return{type:`ExportAllDeclaration`,exported:t.exported??null,source:e,attributes:t.attributes??[],...t,...f}},exportSpecifier(e,t){return{type:`ExportSpecifier`,local:e,exported:t,...f}},jsxIdentifier(e){return{type:`JSXIdentifier`,name:e,...f}},jsxNamespacedName(e,t){return{type:`JSXNamespacedName`,namespace:e,name:t,...f}},jsxMemberExpression(e,t){return{type:`JSXMemberExpression`,object:e,property:t,...f}},jsxElement(e,t=[],n=null){return{type:`JSXElement`,openingElement:e,children:t,closingElement:n,...f}},jsxOpeningElement(e,t=[],n=!1){return{type:`JSXOpeningElement`,name:e,attributes:t,selfClosing:n,...f}},jsxClosingElement(e){return{type:`JSXClosingElement`,name:e,...f}},jsxOpeningFragment(){return{type:`JSXOpeningFragment`,...f}},jsxClosingFragment(){return{type:`JSXClosingFragment`,...f}},jsxFragment(e=[]){return{type:`JSXFragment`,openingFragment:m.jsxOpeningFragment(),children:e,closingFragment:m.jsxClosingFragment(),...f}},jsxAttribute(e,t=null){return{type:`JSXAttribute`,name:e,value:t,...f}},jsxSpreadAttribute(e){return{type:`JSXSpreadAttribute`,argument:e,...f}},jsxExpressionContainer(e){return{type:`JSXExpressionContainer`,expression:e,...f}},jsxEmptyExpression(){return{type:`JSXEmptyExpression`,...f}},jsxText(e){return{type:`JSXText`,value:e,raw:e,...f}},jsxSpreadChild(e){return{type:`JSXSpreadChild`,expression:e,...f}},tsTypeAnnotation(e){return{type:`TSTypeAnnotation`,typeAnnotation:e,...f}},tsAnyKeyword:()=>({type:`TSAnyKeyword`,...f}),tsUnknownKeyword:()=>({type:`TSUnknownKeyword`,...f}),tsNeverKeyword:()=>({type:`TSNeverKeyword`,...f}),tsVoidKeyword:()=>({type:`TSVoidKeyword`,...f}),tsNullKeyword:()=>({type:`TSNullKeyword`,...f}),tsUndefinedKeyword:()=>({type:`TSUndefinedKeyword`,...f}),tsStringKeyword:()=>({type:`TSStringKeyword`,...f}),tsNumberKeyword:()=>({type:`TSNumberKeyword`,...f}),tsBigIntKeyword:()=>({type:`TSBigIntKeyword`,...f}),tsBooleanKeyword:()=>({type:`TSBooleanKeyword`,...f}),tsSymbolKeyword:()=>({type:`TSSymbolKeyword`,...f}),tsObjectKeyword:()=>({type:`TSObjectKeyword`,...f}),tsIntrinsicKeyword:()=>({type:`TSIntrinsicKeyword`,...f}),tsThisType:()=>({type:`TSThisType`,...f}),tsTypeReference(e,t=null){return{type:`TSTypeReference`,typeName:e,typeArguments:t,...f}},tsQualifiedName(e,t){return{type:`TSQualifiedName`,left:e,right:t,...f}},tsTypeQuery(e,t=null){return{type:`TSTypeQuery`,exprName:e,typeArguments:t,...f}},tsImportType(e,t={}){return{type:`TSImportType`,source:e,options:t.options??null,qualifier:t.qualifier??null,typeArguments:t.typeArguments??null,...f}},tsTypeParameter(e,t={}){return{type:`TSTypeParameter`,name:e,constraint:t.constraint??null,default:t.default??null,in:t.in??!1,out:t.out??!1,const:t.const??!1,...f}},tsTypeParameterDeclaration(e){return{type:`TSTypeParameterDeclaration`,params:e,...f}},tsTypeParameterInstantiation(e){return{type:`TSTypeParameterInstantiation`,params:e,...f}},tsLiteralType(e){return{type:`TSLiteralType`,literal:e,...f}},tsTemplateLiteralType(e,t){return{type:`TSTemplateLiteralType`,quasis:e,types:t,...f}},tsArrayType(e){return{type:`TSArrayType`,elementType:e,...f}},tsIndexedAccessType(e,t){return{type:`TSIndexedAccessType`,objectType:e,indexType:t,...f}},tsTupleType(e){return{type:`TSTupleType`,elementTypes:e,...f}},tsNamedTupleMember(e,t,n=!1){return{type:`TSNamedTupleMember`,label:e,elementType:t,optional:n,...f}},tsOptionalType(e){return{type:`TSOptionalType`,typeAnnotation:e,...f}},tsRestType(e){return{type:`TSRestType`,typeAnnotation:e,...f}},tsJSDocNullableType(e,t=!1){return{type:`TSJSDocNullableType`,typeAnnotation:e,postfix:t,...f}},tsJSDocNonNullableType(e,t=!1){return{type:`TSJSDocNonNullableType`,typeAnnotation:e,postfix:t,...f}},tsJSDocUnknownType(){return{type:`TSJSDocUnknownType`,...f}},tsUnionType(e){return{type:`TSUnionType`,types:e,...f}},tsIntersectionType(e){return{type:`TSIntersectionType`,types:e,...f}},tsConditionalType(e,t,n,r){return{type:`TSConditionalType`,checkType:e,extendsType:t,trueType:n,falseType:r,...f}},tsInferType(e){return{type:`TSInferType`,typeParameter:e,...f}},tsTypeOperator(e,t){return{type:`TSTypeOperator`,operator:e,typeAnnotation:t,...f}},tsParenthesizedType(e){return{type:`TSParenthesizedType`,typeAnnotation:e,...f}},tsFunctionType(e,t,n=null){return{type:`TSFunctionType`,typeParameters:n,params:e,returnType:t,...f}},tsConstructorType(e,t,n={}){return{type:`TSConstructorType`,abstract:n.abstract??!1,typeParameters:n.typeParameters??null,params:e,returnType:t,...f}},tsTypePredicate(e,t=null,n=!1){return{type:`TSTypePredicate`,parameterName:e,typeAnnotation:t,asserts:n,...f}},tsTypeLiteral(e){return{type:`TSTypeLiteral`,members:e,...f}},tsMappedType(e,t,n={}){return{type:`TSMappedType`,key:e,constraint:t,nameType:n.nameType??null,typeAnnotation:n.typeAnnotation??null,optional:n.optional??!1,readonly:n.readonly??null,...f}},tsPropertySignature(e,t={}){return{type:`TSPropertySignature`,key:e,typeAnnotation:t.typeAnnotation??null,computed:t.computed??p(e),optional:t.optional??!1,readonly:t.readonly??!1,accessibility:null,static:!1,...f}},tsMethodSignature(e,t,n={}){return{type:`TSMethodSignature`,key:e,computed:n.computed??p(e),optional:n.optional??!1,kind:n.kind??`method`,typeParameters:n.typeParameters??null,params:t,returnType:n.returnType??null,accessibility:null,readonly:!1,static:!1,...f}},tsCallSignatureDeclaration(e,t=null,n=null){return{type:`TSCallSignatureDeclaration`,typeParameters:n,params:e,returnType:t,...f}},tsConstructSignatureDeclaration(e,t=null,n=null){return{type:`TSConstructSignatureDeclaration`,typeParameters:n,params:e,returnType:t,...f}},tsIndexSignature(e,t,n={}){return{type:`TSIndexSignature`,parameters:e,typeAnnotation:t,readonly:n.readonly??!1,static:n.static??!1,accessibility:null,...f}},tsTypeAliasDeclaration(e,t,n={}){return{type:`TSTypeAliasDeclaration`,id:e,typeParameters:n.typeParameters??null,typeAnnotation:t,declare:n.declare??!1,...f}},tsInterfaceDeclaration(e,t,n={}){return{type:`TSInterfaceDeclaration`,id:e,typeParameters:n.typeParameters??null,extends:n.extends??[],body:t,declare:n.declare??!1,...f}},tsInterfaceBody(e){return{type:`TSInterfaceBody`,body:e,...f}},tsInterfaceHeritage(e,t=null){return{type:`TSInterfaceHeritage`,expression:e,typeArguments:t,...f}},tsClassImplements(e,t=null){return{type:`TSClassImplements`,expression:e,typeArguments:t,...f}},tsEnumDeclaration(e,t,n={}){return{type:`TSEnumDeclaration`,id:e,body:t,const:n.const??!1,declare:n.declare??!1,...f}},tsEnumBody(e){return{type:`TSEnumBody`,members:e,...f}},tsEnumMember(e,t=null){return{type:`TSEnumMember`,id:e,initializer:t,computed:!1,...f}},tsModuleDeclaration(e,t,n={}){return{type:`TSModuleDeclaration`,id:e,body:t,kind:n.kind??`module`,declare:n.declare??!1,global:n.global??!1,...f}},tsModuleBlock(e=[]){return{type:`TSModuleBlock`,body:e,...f}},tsParameterProperty(e,t={}){return{type:`TSParameterProperty`,decorators:t.decorators??[],parameter:e,override:t.override??!1,readonly:t.readonly??!1,accessibility:t.accessibility??null,static:!1,...f}},tsAsExpression(e,t){return{type:`TSAsExpression`,expression:e,typeAnnotation:t,...f}},tsSatisfiesExpression(e,t){return{type:`TSSatisfiesExpression`,expression:e,typeAnnotation:t,...f}},tsTypeAssertion(e,t){return{type:`TSTypeAssertion`,typeAnnotation:e,expression:t,...f}},tsNonNullExpression(e){return{type:`TSNonNullExpression`,expression:e,...f}},tsInstantiationExpression(e,t){return{type:`TSInstantiationExpression`,expression:e,typeArguments:t,...f}},tsExportAssignment(e){return{type:`TSExportAssignment`,expression:e,...f}},tsNamespaceExportDeclaration(e){return{type:`TSNamespaceExportDeclaration`,id:e,...f}},tsImportEqualsDeclaration(e,t,n=`value`){return{type:`TSImportEqualsDeclaration`,id:e,moduleReference:t,importKind:n,...f}},tsExternalModuleReference(e){return{type:`TSExternalModuleReference`,expression:e,...f}},tsDeclareFunction(e,t,n={}){return{type:`TSDeclareFunction`,id:e,generator:n.generator??!1,async:n.async??!1,params:t,body:null,expression:!1,declare:n.declare??!1,typeParameters:n.typeParameters??null,returnType:n.returnType??null,...f}},tsEmptyBodyFunctionExpression(e,t={}){return{type:`TSEmptyBodyFunctionExpression`,id:t.id??null,generator:!1,async:!1,params:e,body:null,expression:!1,declare:!1,typeParameters:t.typeParameters??null,returnType:t.returnType??null,...f}},hashbang(e){return{type:`Hashbang`,value:e,...f}},program(e=[],t={}){return{type:`Program`,sourceType:t.sourceType??`module`,hashbang:t.hashbang??null,body:e,...f}}};export{m as b,d as is,s as walk,l as walkAsync};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/aliases.ts","../src/visitor-keys.ts","../src/walk-core.ts","../src/walk.ts","../src/walk-async.ts","../src/predicates.ts","../src/builders.ts"],"sourcesContent":["import type { NodeOfType, NodeType } from \"./types\";\n\n/**\n * Node types grouped under a shared alias. A visitor registered under an alias\n * name runs for every member type. Membership is by node `type`.\n */\nexport const ALIAS_GROUPS = {\n Expression: [\n \"Identifier\",\n \"Literal\",\n \"ThisExpression\",\n \"Super\",\n \"ArrayExpression\",\n \"ObjectExpression\",\n \"FunctionExpression\",\n \"ArrowFunctionExpression\",\n \"ClassExpression\",\n \"TaggedTemplateExpression\",\n \"TemplateLiteral\",\n \"MemberExpression\",\n \"CallExpression\",\n \"NewExpression\",\n \"ChainExpression\",\n \"SequenceExpression\",\n \"ParenthesizedExpression\",\n \"BinaryExpression\",\n \"LogicalExpression\",\n \"ConditionalExpression\",\n \"UnaryExpression\",\n \"UpdateExpression\",\n \"AssignmentExpression\",\n \"YieldExpression\",\n \"AwaitExpression\",\n \"ImportExpression\",\n \"MetaProperty\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSTypeAssertion\",\n \"TSNonNullExpression\",\n \"TSInstantiationExpression\",\n \"JSXElement\",\n \"JSXFragment\",\n ],\n Statement: [\n \"ExpressionStatement\",\n \"BlockStatement\",\n \"EmptyStatement\",\n \"DebuggerStatement\",\n \"ReturnStatement\",\n \"LabeledStatement\",\n \"BreakStatement\",\n \"ContinueStatement\",\n \"IfStatement\",\n \"SwitchStatement\",\n \"ThrowStatement\",\n \"TryStatement\",\n \"WhileStatement\",\n \"DoWhileStatement\",\n \"ForStatement\",\n \"ForInStatement\",\n \"ForOfStatement\",\n \"WithStatement\",\n \"FunctionDeclaration\",\n \"ClassDeclaration\",\n \"VariableDeclaration\",\n \"TSDeclareFunction\",\n \"TSTypeAliasDeclaration\",\n \"TSInterfaceDeclaration\",\n \"TSEnumDeclaration\",\n \"TSModuleDeclaration\",\n \"TSImportEqualsDeclaration\",\n ],\n Declaration: [\n \"FunctionDeclaration\",\n \"ClassDeclaration\",\n \"VariableDeclaration\",\n \"TSDeclareFunction\",\n \"TSTypeAliasDeclaration\",\n \"TSInterfaceDeclaration\",\n \"TSEnumDeclaration\",\n \"TSModuleDeclaration\",\n \"TSImportEqualsDeclaration\",\n ],\n ModuleDeclaration: [\n \"ImportDeclaration\",\n \"ExportNamedDeclaration\",\n \"ExportDefaultDeclaration\",\n \"ExportAllDeclaration\",\n \"TSExportAssignment\",\n \"TSNamespaceExportDeclaration\",\n ],\n // Includes arrow functions, unlike the parser's narrower Function type.\n Function: [\n \"FunctionDeclaration\",\n \"FunctionExpression\",\n \"ArrowFunctionExpression\",\n \"TSDeclareFunction\",\n \"TSEmptyBodyFunctionExpression\",\n ],\n Class: [\"ClassDeclaration\", \"ClassExpression\"],\n Method: [\"MethodDefinition\", \"TSAbstractMethodDefinition\"],\n Loop: [\n \"ForStatement\",\n \"ForInStatement\",\n \"ForOfStatement\",\n \"WhileStatement\",\n \"DoWhileStatement\",\n ],\n Pattern: [\"Identifier\", \"ArrayPattern\", \"ObjectPattern\", \"AssignmentPattern\", \"RestElement\"],\n JSX: [\n \"JSXElement\",\n \"JSXOpeningElement\",\n \"JSXClosingElement\",\n \"JSXFragment\",\n \"JSXOpeningFragment\",\n \"JSXClosingFragment\",\n \"JSXIdentifier\",\n \"JSXNamespacedName\",\n \"JSXMemberExpression\",\n \"JSXAttribute\",\n \"JSXSpreadAttribute\",\n \"JSXExpressionContainer\",\n \"JSXEmptyExpression\",\n \"JSXText\",\n \"JSXSpreadChild\",\n ],\n TSType: [\n \"TSAnyKeyword\",\n \"TSUnknownKeyword\",\n \"TSNeverKeyword\",\n \"TSVoidKeyword\",\n \"TSNullKeyword\",\n \"TSUndefinedKeyword\",\n \"TSStringKeyword\",\n \"TSNumberKeyword\",\n \"TSBigIntKeyword\",\n \"TSBooleanKeyword\",\n \"TSSymbolKeyword\",\n \"TSObjectKeyword\",\n \"TSIntrinsicKeyword\",\n \"TSThisType\",\n \"TSTypeReference\",\n \"TSTypeQuery\",\n \"TSImportType\",\n \"TSLiteralType\",\n \"TSTemplateLiteralType\",\n \"TSArrayType\",\n \"TSIndexedAccessType\",\n \"TSTupleType\",\n \"TSNamedTupleMember\",\n \"TSJSDocNullableType\",\n \"TSJSDocNonNullableType\",\n \"TSJSDocUnknownType\",\n \"TSUnionType\",\n \"TSIntersectionType\",\n \"TSConditionalType\",\n \"TSInferType\",\n \"TSTypeOperator\",\n \"TSParenthesizedType\",\n \"TSFunctionType\",\n \"TSConstructorType\",\n \"TSTypePredicate\",\n \"TSTypeLiteral\",\n \"TSMappedType\",\n ],\n} as const satisfies Record<string, readonly NodeType[]>;\n\n/** Name of an alias group. */\nexport type AliasName = keyof typeof ALIAS_GROUPS;\n\n/** Node union matched by each alias group. */\nexport type AliasMap = {\n [K in AliasName]: NodeOfType<(typeof ALIAS_GROUPS)[K][number]>;\n};\n","import type { ChildKeys, NodeOfType, NodeType } from \"./types\";\n\ntype VisitorKeysTable = { [K in NodeType]: readonly ChildKeys<NodeOfType<K>>[] };\n\n/**\n * Child fields of each node type, in traversal order. Names are validated\n * against the AST types, so a renamed, removed, or added field fails to compile.\n */\nexport const VISITOR_KEYS = {\n Program: [\"hashbang\", \"body\"],\n Hashbang: [],\n\n Identifier: [\"decorators\", \"typeAnnotation\"],\n PrivateIdentifier: [],\n Literal: [],\n TemplateElement: [],\n Super: [],\n ThisExpression: [],\n\n ArrayPattern: [\"decorators\", \"elements\", \"typeAnnotation\"],\n ObjectPattern: [\"decorators\", \"properties\", \"typeAnnotation\"],\n AssignmentPattern: [\"decorators\", \"left\", \"right\", \"typeAnnotation\"],\n RestElement: [\"decorators\", \"argument\", \"typeAnnotation\"],\n Property: [\"key\", \"value\"],\n\n // Expressions\n SequenceExpression: [\"expressions\"],\n ParenthesizedExpression: [\"expression\"],\n BinaryExpression: [\"left\", \"right\"],\n LogicalExpression: [\"left\", \"right\"],\n ConditionalExpression: [\"test\", \"consequent\", \"alternate\"],\n UnaryExpression: [\"argument\"],\n UpdateExpression: [\"argument\"],\n AssignmentExpression: [\"left\", \"right\"],\n YieldExpression: [\"argument\"],\n AwaitExpression: [\"argument\"],\n ArrayExpression: [\"elements\"],\n ObjectExpression: [\"properties\"],\n SpreadElement: [\"argument\"],\n MemberExpression: [\"object\", \"property\"],\n CallExpression: [\"callee\", \"typeArguments\", \"arguments\"],\n ChainExpression: [\"expression\"],\n TaggedTemplateExpression: [\"tag\", \"typeArguments\", \"quasi\"],\n NewExpression: [\"callee\", \"typeArguments\", \"arguments\"],\n MetaProperty: [\"meta\", \"property\"],\n ImportExpression: [\"source\", \"options\"],\n TemplateLiteral: [\"quasis\", \"expressions\"],\n\n // Statements\n ExpressionStatement: [\"expression\"],\n BlockStatement: [\"body\"],\n IfStatement: [\"test\", \"consequent\", \"alternate\"],\n SwitchStatement: [\"discriminant\", \"cases\"],\n SwitchCase: [\"test\", \"consequent\"],\n ForStatement: [\"init\", \"test\", \"update\", \"body\"],\n ForInStatement: [\"left\", \"right\", \"body\"],\n ForOfStatement: [\"left\", \"right\", \"body\"],\n WhileStatement: [\"test\", \"body\"],\n DoWhileStatement: [\"body\", \"test\"],\n BreakStatement: [\"label\"],\n ContinueStatement: [\"label\"],\n LabeledStatement: [\"label\", \"body\"],\n WithStatement: [\"object\", \"body\"],\n ReturnStatement: [\"argument\"],\n ThrowStatement: [\"argument\"],\n TryStatement: [\"block\", \"handler\", \"finalizer\"],\n CatchClause: [\"param\", \"body\"],\n DebuggerStatement: [],\n EmptyStatement: [],\n\n VariableDeclaration: [\"declarations\"],\n VariableDeclarator: [\"id\", \"init\"],\n\n // Functions\n FunctionDeclaration: [\"id\", \"typeParameters\", \"params\", \"returnType\", \"body\"],\n FunctionExpression: [\"id\", \"typeParameters\", \"params\", \"returnType\", \"body\"],\n TSDeclareFunction: [\"id\", \"typeParameters\", \"params\", \"returnType\"],\n TSEmptyBodyFunctionExpression: [\"id\", \"typeParameters\", \"params\", \"returnType\"],\n ArrowFunctionExpression: [\"typeParameters\", \"params\", \"returnType\", \"body\"],\n\n ClassDeclaration: [\n \"decorators\",\n \"id\",\n \"typeParameters\",\n \"superClass\",\n \"superTypeArguments\",\n \"implements\",\n \"body\",\n ],\n ClassExpression: [\n \"decorators\",\n \"id\",\n \"typeParameters\",\n \"superClass\",\n \"superTypeArguments\",\n \"implements\",\n \"body\",\n ],\n ClassBody: [\"body\"],\n MethodDefinition: [\"decorators\", \"key\", \"value\"],\n TSAbstractMethodDefinition: [\"decorators\", \"key\", \"value\"],\n PropertyDefinition: [\"decorators\", \"key\", \"typeAnnotation\", \"value\"],\n TSAbstractPropertyDefinition: [\"decorators\", \"key\", \"typeAnnotation\", \"value\"],\n AccessorProperty: [\"decorators\", \"key\", \"typeAnnotation\", \"value\"],\n TSAbstractAccessorProperty: [\"decorators\", \"key\", \"typeAnnotation\", \"value\"],\n StaticBlock: [\"body\"],\n Decorator: [\"expression\"],\n\n // Modules\n ImportDeclaration: [\"specifiers\", \"source\", \"attributes\"],\n ImportSpecifier: [\"imported\", \"local\"],\n ImportDefaultSpecifier: [\"local\"],\n ImportNamespaceSpecifier: [\"local\"],\n ImportAttribute: [\"key\", \"value\"],\n ExportNamedDeclaration: [\"declaration\", \"specifiers\", \"source\", \"attributes\"],\n ExportDefaultDeclaration: [\"declaration\"],\n ExportAllDeclaration: [\"exported\", \"source\", \"attributes\"],\n ExportSpecifier: [\"local\", \"exported\"],\n\n // JSX\n JSXElement: [\"openingElement\", \"children\", \"closingElement\"],\n JSXOpeningElement: [\"name\", \"typeArguments\", \"attributes\"],\n JSXClosingElement: [\"name\"],\n JSXFragment: [\"openingFragment\", \"children\", \"closingFragment\"],\n JSXOpeningFragment: [],\n JSXClosingFragment: [],\n JSXIdentifier: [],\n JSXNamespacedName: [\"namespace\", \"name\"],\n JSXMemberExpression: [\"object\", \"property\"],\n JSXAttribute: [\"name\", \"value\"],\n JSXSpreadAttribute: [\"argument\"],\n JSXExpressionContainer: [\"expression\"],\n JSXEmptyExpression: [],\n JSXText: [],\n JSXSpreadChild: [\"expression\"],\n\n // TypeScript\n TSTypeAnnotation: [\"typeAnnotation\"],\n TSAnyKeyword: [],\n TSUnknownKeyword: [],\n TSNeverKeyword: [],\n TSVoidKeyword: [],\n TSNullKeyword: [],\n TSUndefinedKeyword: [],\n TSStringKeyword: [],\n TSNumberKeyword: [],\n TSBigIntKeyword: [],\n TSBooleanKeyword: [],\n TSSymbolKeyword: [],\n TSObjectKeyword: [],\n TSIntrinsicKeyword: [],\n TSThisType: [],\n\n TSTypeReference: [\"typeName\", \"typeArguments\"],\n TSQualifiedName: [\"left\", \"right\"],\n TSTypeQuery: [\"exprName\", \"typeArguments\"],\n TSImportType: [\"source\", \"options\", \"qualifier\", \"typeArguments\"],\n TSTypeParameter: [\"name\", \"constraint\", \"default\"],\n TSTypeParameterDeclaration: [\"params\"],\n TSTypeParameterInstantiation: [\"params\"],\n TSLiteralType: [\"literal\"],\n TSTemplateLiteralType: [\"quasis\", \"types\"],\n TSArrayType: [\"elementType\"],\n TSIndexedAccessType: [\"objectType\", \"indexType\"],\n TSTupleType: [\"elementTypes\"],\n TSNamedTupleMember: [\"label\", \"elementType\"],\n TSOptionalType: [\"typeAnnotation\"],\n TSRestType: [\"typeAnnotation\"],\n TSJSDocNullableType: [\"typeAnnotation\"],\n TSJSDocNonNullableType: [\"typeAnnotation\"],\n TSJSDocUnknownType: [],\n TSUnionType: [\"types\"],\n TSIntersectionType: [\"types\"],\n TSConditionalType: [\"checkType\", \"extendsType\", \"trueType\", \"falseType\"],\n TSInferType: [\"typeParameter\"],\n TSTypeOperator: [\"typeAnnotation\"],\n TSParenthesizedType: [\"typeAnnotation\"],\n TSFunctionType: [\"typeParameters\", \"params\", \"returnType\"],\n TSConstructorType: [\"typeParameters\", \"params\", \"returnType\"],\n TSTypePredicate: [\"parameterName\", \"typeAnnotation\"],\n TSTypeLiteral: [\"members\"],\n TSMappedType: [\"key\", \"constraint\", \"nameType\", \"typeAnnotation\"],\n\n TSPropertySignature: [\"key\", \"typeAnnotation\"],\n TSMethodSignature: [\"key\", \"typeParameters\", \"params\", \"returnType\"],\n TSCallSignatureDeclaration: [\"typeParameters\", \"params\", \"returnType\"],\n TSConstructSignatureDeclaration: [\"typeParameters\", \"params\", \"returnType\"],\n TSIndexSignature: [\"parameters\", \"typeAnnotation\"],\n\n TSTypeAliasDeclaration: [\"id\", \"typeParameters\", \"typeAnnotation\"],\n TSInterfaceDeclaration: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n TSInterfaceBody: [\"body\"],\n TSInterfaceHeritage: [\"expression\", \"typeArguments\"],\n TSClassImplements: [\"expression\", \"typeArguments\"],\n TSEnumDeclaration: [\"id\", \"body\"],\n TSEnumBody: [\"members\"],\n TSEnumMember: [\"id\", \"initializer\"],\n TSModuleDeclaration: [\"id\", \"body\"],\n TSModuleBlock: [\"body\"],\n TSParameterProperty: [\"decorators\", \"parameter\"],\n\n TSAsExpression: [\"expression\", \"typeAnnotation\"],\n TSSatisfiesExpression: [\"expression\", \"typeAnnotation\"],\n TSTypeAssertion: [\"typeAnnotation\", \"expression\"],\n TSNonNullExpression: [\"expression\"],\n TSInstantiationExpression: [\"expression\", \"typeArguments\"],\n TSExportAssignment: [\"expression\"],\n TSNamespaceExportDeclaration: [\"id\"],\n TSImportEqualsDeclaration: [\"id\", \"moduleReference\"],\n TSExternalModuleReference: [\"expression\"],\n} as const satisfies VisitorKeysTable;\n\n// Completeness guard. `satisfies` above rejects a key that is not a child field,\n// but cannot tell that a child field is missing.\ntype UnlistedChildKeys = {\n [K in NodeType as [Exclude<ChildKeys<NodeOfType<K>>, (typeof VISITOR_KEYS)[K][number]>] extends [never]\n ? never\n : K]: Exclude<ChildKeys<NodeOfType<K>>, (typeof VISITOR_KEYS)[K][number]>;\n};\nconst _allChildKeysListed: UnlistedChildKeys = {};\nvoid _allChildKeysListed;\n\n/** Child fields of a node type, in traversal order. */\nexport function getVisitorKeys(type: NodeType): readonly string[] {\n return VISITOR_KEYS[type];\n}\n","import type { Node } from \"yuku-parser\";\nimport { ALIAS_GROUPS } from \"./aliases\";\nimport type { NodeType, Path } from \"./types\";\nimport { VISITOR_KEYS } from \"./visitor-keys\";\n\nexport type Handler<S> = (node: Node, path: Path<Node, S>) => unknown;\ntype Entry<S> = Handler<S> | { enter?: Handler<S>; leave?: Handler<S> };\ntype Fields = Record<string, unknown>;\n\nexport interface Dispatch<S> {\n readonly enter: readonly Handler<S>[];\n readonly leave: readonly Handler<S>[];\n readonly keys: readonly string[];\n}\n\ninterface AliasHandler<S> {\n readonly types: ReadonlySet<string>;\n readonly enter?: Handler<S>;\n readonly leave?: Handler<S>;\n}\n\n/** Returned up the stack when a visitor calls `remove()`. */\nexport const REMOVED = Symbol(\"yuku-walk/removed\");\n\n/** A node viewed as its fields, for traversal and mutation by key. */\nexport const fieldsOf = (node: Node): Fields => node as unknown as Fields;\n\n/**\n * One per visited node, holding its own position and a link to its parent path\n * so it stays valid, ancestors included, after the visit returns. Control flow\n * and mutation delegate to the owning walker.\n */\nexport class NodePath<S> implements Path<Node, S> {\n constructor(\n private readonly walker: WalkerCore<S>,\n private readonly parentPath: NodePath<S> | null,\n public node: Node,\n public readonly parent: Node | null,\n public readonly key: string | null,\n public readonly index: number | null,\n ) {}\n\n get state(): S {\n return this.walker.state;\n }\n set state(value: S) {\n this.walker.state = value;\n }\n\n get ancestors(): readonly Node[] {\n const out: Node[] = [];\n for (let p = this.parentPath; p !== null; p = p.parentPath) out.push(p.node);\n return out.reverse();\n }\n\n skip(): void {\n this.walker.skipFlag = true;\n }\n stop(): void {\n this.walker.stopFlag = true;\n }\n\n replace(next: Node): void {\n // Synthetic replacements inherit the original span, for source maps.\n if (next.start === 0 && next.end === 0) {\n next.start = this.node.start;\n next.end = this.node.end;\n }\n this.node = next;\n this.walker.replacement = next;\n const { parent, key, index } = this;\n if (parent === null || key === null) return;\n const fields = fieldsOf(parent);\n if (index === null) fields[key] = next;\n else (fields[key] as unknown[])[index] = next;\n }\n\n remove(): void {\n if (this.parent === null) throw new Error(\"yuku-walk: cannot remove the root node\");\n this.walker.removeFlag = true;\n }\n\n insertBefore(node: Node): void {\n this.insertSibling(node, 0);\n }\n\n insertAfter(node: Node): void {\n this.insertSibling(node, 1);\n }\n\n private insertSibling(node: Node, offset: 0 | 1): void {\n const { parent, key, index } = this;\n if (parent === null || key === null || index === null) {\n throw new Error(\"yuku-walk: insertBefore/insertAfter require a node in an array field\");\n }\n const list = fieldsOf(parent)[key] as Node[];\n const at = list.indexOf(this.node);\n if (at !== -1) list.splice(at + offset, 0, node);\n }\n}\n\n/** Shared dispatch and traversal state. The sync and async drivers extend this. */\nexport class WalkerCore<S> {\n state: S;\n skipFlag = false;\n stopFlag = false;\n removeFlag = false;\n replacement: Node | null = null;\n\n protected readonly universalEnter?: Handler<S>;\n protected readonly universalLeave?: Handler<S>;\n protected readonly concrete = new Map<string, { enter?: Handler<S>; leave?: Handler<S> }>();\n protected readonly aliasHandlers: AliasHandler<S>[] = [];\n private readonly cache: Record<string, Dispatch<S>> = Object.create(null);\n\n constructor(visitors: object, state: S) {\n this.state = state;\n const entries = visitors as Record<string, Entry<S> | undefined>;\n const aliases = ALIAS_GROUPS as Record<string, readonly NodeType[] | undefined>;\n\n for (const name in entries) {\n const entry = entries[name];\n if (!entry) continue;\n if (name === \"enter\") {\n if (typeof entry === \"function\") this.universalEnter = entry;\n continue;\n }\n if (name === \"leave\") {\n if (typeof entry === \"function\") this.universalLeave = entry;\n continue;\n }\n\n const enter = typeof entry === \"function\" ? entry : entry.enter;\n const leave = typeof entry === \"function\" ? undefined : entry.leave;\n const aliasTypes = aliases[name];\n if (aliasTypes) {\n this.aliasHandlers.push({ types: new Set(aliasTypes), enter, leave });\n } else {\n const prev = this.concrete.get(name);\n this.concrete.set(name, { enter: enter ?? prev?.enter, leave: leave ?? prev?.leave });\n }\n }\n }\n\n protected dispatchFor(type: NodeType): Dispatch<S> {\n const cached = this.cache[type];\n if (cached !== undefined) return cached;\n\n const enter: Handler<S>[] = [];\n const leave: Handler<S>[] = [];\n const concrete = this.concrete.get(type);\n\n if (this.universalEnter) enter.push(this.universalEnter);\n for (let i = 0; i < this.aliasHandlers.length; i++) {\n const a = this.aliasHandlers[i]!;\n if (a.enter && a.types.has(type)) enter.push(a.enter);\n }\n if (concrete?.enter) enter.push(concrete.enter);\n\n // leave mirrors enter, concrete, then aliases reversed, then universal.\n if (concrete?.leave) leave.push(concrete.leave);\n for (let i = this.aliasHandlers.length - 1; i >= 0; i--) {\n const a = this.aliasHandlers[i]!;\n if (a.leave && a.types.has(type)) leave.push(a.leave);\n }\n if (this.universalLeave) leave.push(this.universalLeave);\n\n return (this.cache[type] = { enter, leave, keys: VISITOR_KEYS[type] });\n }\n\n protected newPath(\n parentPath: NodePath<S> | null,\n parent: Node | null,\n node: Node,\n key: string | null,\n index: number | null,\n ): NodePath<S> {\n return new NodePath<S>(this, parentPath, node, parent, key, index);\n }\n}\n","import type { Node } from \"yuku-parser\";\nimport type { Visitors } from \"./types\";\nimport { type Handler, NodePath, REMOVED, WalkerCore, fieldsOf } from \"./walk-core\";\n\nclass Walker<S> extends WalkerCore<S> {\n run(root: Node): Node {\n const result = this.visit(null, null, root, null, null);\n return result === REMOVED ? root : result;\n }\n\n private apply(handlers: readonly Handler<S>[], node: Node, path: NodePath<S>): Node {\n this.removeFlag = false;\n for (let i = 0; i < handlers.length; i++) {\n this.replacement = null;\n handlers[i]!(node, path);\n if (this.replacement !== null) node = this.replacement;\n if (this.removeFlag || this.stopFlag) break;\n }\n return node;\n }\n\n private visit(\n parentPath: NodePath<S> | null,\n parent: Node | null,\n node: Node,\n key: string | null,\n index: number | null,\n ): Node | typeof REMOVED {\n if (this.stopFlag) return node;\n\n const path = this.newPath(parentPath, parent, node, key, index);\n this.skipFlag = false;\n let dispatch = this.dispatchFor(node.type);\n\n if (dispatch.enter.length > 0) {\n const before = node;\n node = this.apply(dispatch.enter, node, path);\n if (this.removeFlag) return REMOVED;\n if (this.stopFlag) return node;\n // A replacement may be a different type with different children and handlers.\n if (node !== before) dispatch = this.dispatchFor(node.type);\n }\n\n if (!this.skipFlag && dispatch.keys.length > 0) {\n this.descend(path, node, dispatch.keys);\n if (this.stopFlag) return node;\n }\n\n if (dispatch.leave.length > 0) {\n node = this.apply(dispatch.leave, node, path);\n if (this.removeFlag) return REMOVED;\n if (this.stopFlag) return node;\n }\n\n return node;\n }\n\n private descend(path: NodePath<S>, node: Node, keys: readonly string[]): void {\n const fields = fieldsOf(node);\n for (let k = 0; k < keys.length; k++) {\n const key = keys[k]!;\n const value = fields[key];\n if (value == null) continue;\n\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const child = value[i] as Node | null;\n if (child == null) continue;\n const before = value.length;\n if (this.visit(path, node, child, key, i) === REMOVED) {\n value.splice(i, 1);\n i--;\n } else {\n i += value.length - before; // skip siblings inserted during the visit\n }\n if (this.stopFlag) return;\n }\n } else {\n if (this.visit(path, node, value as Node, key, null) === REMOVED) fields[key] = null;\n if (this.stopFlag) return;\n }\n }\n }\n}\n\n/**\n * Walk an AST depth first, dispatching to typed visitors and mutating in place.\n *\n * @param root The node to start from, usually a `Program`.\n * @param visitors Handlers keyed by node `type`, alias group, or `enter`/`leave`.\n * @param state Optional value exposed as `path.state` throughout the walk.\n * @returns The root node, or its replacement if the root was replaced.\n *\n * @example\n * ```ts\n * walk(program, {\n * Identifier(node) {\n * console.log(node.name);\n * },\n * CallExpression(node, path) {\n * if (node.callee.type === \"MemberExpression\") path.skip();\n * },\n * });\n * ```\n */\nexport function walk<T extends Node, S = unknown>(root: T, visitors: Visitors<S>, state?: S): T {\n return new Walker<S>(visitors, state as S).run(root) as T;\n}\n","import type { Node } from \"yuku-parser\";\nimport type { AsyncVisitors } from \"./types\";\nimport { type Handler, NodePath, REMOVED, WalkerCore, fieldsOf } from \"./walk-core\";\n\nclass AsyncWalker<S> extends WalkerCore<S> {\n async run(root: Node): Promise<Node> {\n const result = await this.visit(null, null, root, null, null);\n return result === REMOVED ? root : result;\n }\n\n private async apply(handlers: readonly Handler<S>[], node: Node, path: NodePath<S>): Promise<Node> {\n this.removeFlag = false;\n for (let i = 0; i < handlers.length; i++) {\n this.replacement = null;\n await handlers[i]!(node, path);\n if (this.replacement !== null) node = this.replacement;\n if (this.removeFlag || this.stopFlag) break;\n }\n return node;\n }\n\n private async visit(\n parentPath: NodePath<S> | null,\n parent: Node | null,\n node: Node,\n key: string | null,\n index: number | null,\n ): Promise<Node | typeof REMOVED> {\n if (this.stopFlag) return node;\n\n const path = this.newPath(parentPath, parent, node, key, index);\n this.skipFlag = false;\n let dispatch = this.dispatchFor(node.type);\n\n if (dispatch.enter.length > 0) {\n const before = node;\n node = await this.apply(dispatch.enter, node, path);\n if (this.removeFlag) return REMOVED;\n if (this.stopFlag) return node;\n // A replacement may be a different type with different children and handlers.\n if (node !== before) dispatch = this.dispatchFor(node.type);\n }\n\n if (!this.skipFlag && dispatch.keys.length > 0) {\n await this.descend(path, node, dispatch.keys);\n if (this.stopFlag) return node;\n }\n\n if (dispatch.leave.length > 0) {\n node = await this.apply(dispatch.leave, node, path);\n if (this.removeFlag) return REMOVED;\n if (this.stopFlag) return node;\n }\n\n return node;\n }\n\n private async descend(path: NodePath<S>, node: Node, keys: readonly string[]): Promise<void> {\n const fields = fieldsOf(node);\n for (let k = 0; k < keys.length; k++) {\n const key = keys[k]!;\n const value = fields[key];\n if (value == null) continue;\n\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const child = value[i] as Node | null;\n if (child == null) continue;\n const before = value.length;\n if ((await this.visit(path, node, child, key, i)) === REMOVED) {\n value.splice(i, 1);\n i--;\n } else {\n i += value.length - before; // skip siblings inserted during the visit\n }\n if (this.stopFlag) return;\n }\n } else {\n if ((await this.visit(path, node, value as Node, key, null)) === REMOVED) fields[key] = null;\n if (this.stopFlag) return;\n }\n }\n }\n}\n\n/**\n * Like {@link walk}, but visitors may be `async`. Handlers are awaited one at a\n * time in depth-first order, so mutation behaves exactly as in the sync walk.\n * Reach for this only when a visitor needs to await I/O; prefer {@link walk}\n * otherwise, as awaiting has per-node overhead.\n *\n * @returns A promise of the root node, or its replacement if the root was replaced.\n */\nexport function walkAsync<T extends Node, S = unknown>(\n root: T,\n visitors: AsyncVisitors<S>,\n state?: S,\n): Promise<T> {\n return new AsyncWalker<S>(visitors, state as S).run(root) as Promise<T>;\n}\n","import type {\n BigIntLiteral,\n BindingIdentifier,\n BooleanLiteral,\n ComputedMemberExpression,\n Directive,\n IdentifierName,\n IdentifierReference,\n LabelIdentifier,\n Node,\n NullLiteral,\n NumericLiteral,\n PrivateFieldExpression,\n RegExpLiteral,\n StaticMemberExpression,\n StringLiteral,\n} from \"yuku-parser\";\nimport { ALIAS_GROUPS, type AliasMap, type AliasName } from \"./aliases\";\nimport type { NodeOfType, NodeType } from \"./types\";\nimport { VISITOR_KEYS } from \"./visitor-keys\";\n\ntype MaybeNode = Node | null | undefined;\n\nfunction aliasGuard<K extends AliasName>(name: K): (node: MaybeNode) => node is AliasMap[K] {\n const set = new Set<string>(ALIAS_GROUPS[name]);\n return (node): node is AliasMap[K] => node != null && set.has(node.type);\n}\n\n/** One guard per concrete node `type`, e.g. `is.CallExpression`. */\ntype ConcreteGuards = { [K in NodeType]: (node: MaybeNode) => node is NodeOfType<K> };\n\nconst concrete = Object.fromEntries(\n (Object.keys(VISITOR_KEYS) as NodeType[]).map((type) => [\n type,\n (node: MaybeNode) => node != null && node.type === type,\n ]),\n) as ConcreteGuards;\n\nexport const is = {\n ...concrete,\n\n Expression: aliasGuard(\"Expression\"),\n Statement: aliasGuard(\"Statement\"),\n Declaration: aliasGuard(\"Declaration\"),\n ModuleDeclaration: aliasGuard(\"ModuleDeclaration\"),\n Function: aliasGuard(\"Function\"),\n Class: aliasGuard(\"Class\"),\n Method: aliasGuard(\"Method\"),\n Loop: aliasGuard(\"Loop\"),\n Pattern: aliasGuard(\"Pattern\"),\n JSX: aliasGuard(\"JSX\"),\n TSType: aliasGuard(\"TSType\"),\n\n IdentifierReference: (node: MaybeNode): node is IdentifierReference =>\n node?.type === \"Identifier\" && node.kind === \"reference\",\n BindingIdentifier: (node: MaybeNode): node is BindingIdentifier =>\n node?.type === \"Identifier\" && node.kind === \"binding\",\n LabelIdentifier: (node: MaybeNode): node is LabelIdentifier => node?.type === \"Identifier\" && node.kind === \"label\",\n IdentifierName: (node: MaybeNode): node is IdentifierName => node?.type === \"Identifier\" && node.kind === \"name\",\n\n StringLiteral: (node: MaybeNode): node is StringLiteral => node?.type === \"Literal\" && typeof node.value === \"string\",\n NumericLiteral: (node: MaybeNode): node is NumericLiteral =>\n node?.type === \"Literal\" && typeof node.value === \"number\",\n BooleanLiteral: (node: MaybeNode): node is BooleanLiteral =>\n node?.type === \"Literal\" && typeof node.value === \"boolean\",\n NullLiteral: (node: MaybeNode): node is NullLiteral => node?.type === \"Literal\" && node.raw === \"null\",\n BigIntLiteral: (node: MaybeNode): node is BigIntLiteral => node?.type === \"Literal\" && \"bigint\" in node,\n RegExpLiteral: (node: MaybeNode): node is RegExpLiteral => node?.type === \"Literal\" && \"regex\" in node,\n\n ComputedMemberExpression: (node: MaybeNode): node is ComputedMemberExpression =>\n node?.type === \"MemberExpression\" && node.computed,\n StaticMemberExpression: (node: MaybeNode): node is StaticMemberExpression =>\n node?.type === \"MemberExpression\" && !node.computed && node.property.type === \"Identifier\",\n PrivateFieldExpression: (node: MaybeNode): node is PrivateFieldExpression =>\n node?.type === \"MemberExpression\" && node.property.type === \"PrivateIdentifier\",\n\n Directive: (node: MaybeNode): node is Directive => node?.type === \"ExpressionStatement\" && node.directive != null,\n};\n","import type * as t from \"yuku-parser\";\n\nconst span = { start: 0, end: 0 };\n\nconst isComputedKey = (key: t.PropertyKey): boolean =>\n key.type !== \"Identifier\" && key.type !== \"PrivateIdentifier\";\n\nexport const b = {\n // Identifiers and literals\n identifier(\n name: string,\n kind: t.IdentifierKind = \"reference\",\n opts: { typeAnnotation?: t.TSTypeAnnotation | null; optional?: boolean; decorators?: t.Decorator[] } = {},\n ): t.Identifier {\n return { type: \"Identifier\", name, kind, ...opts, ...span };\n },\n privateIdentifier(name: string): t.PrivateIdentifier {\n return { type: \"PrivateIdentifier\", name, ...span };\n },\n stringLiteral(value: string): t.StringLiteral {\n return { type: \"Literal\", value, raw: JSON.stringify(value), ...span };\n },\n numericLiteral(value: number): t.NumericLiteral {\n return { type: \"Literal\", value, raw: String(value), ...span };\n },\n booleanLiteral(value: boolean): t.BooleanLiteral {\n return { type: \"Literal\", value, raw: String(value), ...span };\n },\n nullLiteral(): t.NullLiteral {\n return { type: \"Literal\", value: null, raw: \"null\", ...span };\n },\n bigIntLiteral(value: bigint): t.BigIntLiteral {\n return { type: \"Literal\", value, raw: `${value}n`, bigint: String(value), ...span };\n },\n regExpLiteral(pattern: string, flags = \"\"): t.RegExpLiteral {\n let value: RegExp | null = null;\n try {\n value = new RegExp(pattern, flags);\n } catch {}\n return { type: \"Literal\", value, raw: `/${pattern}/${flags}`, regex: { pattern, flags }, ...span };\n },\n templateLiteral(quasis: t.TemplateElement[], expressions: t.Expression[]): t.TemplateLiteral {\n return { type: \"TemplateLiteral\", quasis, expressions, ...span };\n },\n templateElement(cooked: string, tail = false): t.TemplateElement {\n return { type: \"TemplateElement\", value: { raw: cooked, cooked }, tail, ...span };\n },\n thisExpression(): t.ThisExpression {\n return { type: \"ThisExpression\", ...span };\n },\n super(): t.Super {\n return { type: \"Super\", ...span };\n },\n\n // Patterns\n arrayPattern(elements: Array<t.BindingPattern | t.RestElement | null>): t.ArrayPattern {\n return { type: \"ArrayPattern\", elements, ...span };\n },\n objectPattern(properties: Array<t.BindingProperty | t.RestElement>): t.ObjectPattern {\n return { type: \"ObjectPattern\", properties, ...span };\n },\n assignmentPattern(left: t.BindingPattern, right: t.Expression): t.AssignmentPattern {\n return { type: \"AssignmentPattern\", left, right, ...span };\n },\n restElement(argument: t.BindingPattern): t.RestElement {\n return { type: \"RestElement\", argument, ...span };\n },\n /** A member of an `ObjectExpression`. For an `ObjectPattern` member, use {@link bindingProperty}. */\n objectProperty(\n key: t.PropertyKey,\n value: t.Expression,\n opts: { computed?: boolean; shorthand?: boolean; kind?: t.PropertyKind; method?: boolean } = {},\n ): t.ObjectProperty {\n return {\n type: \"Property\",\n kind: opts.kind ?? \"init\",\n key,\n value,\n method: opts.method ?? false,\n shorthand: opts.shorthand ?? false,\n computed: opts.computed ?? isComputedKey(key),\n ...span,\n };\n },\n /** A member of an `ObjectPattern`, whose value is a binding target. For an `ObjectExpression` member, use {@link objectProperty}. */\n bindingProperty(\n key: t.PropertyKey,\n value: t.BindingPattern,\n opts: { computed?: boolean; shorthand?: boolean } = {},\n ): t.BindingProperty {\n return {\n type: \"Property\",\n kind: \"init\",\n key,\n value,\n method: false,\n shorthand: opts.shorthand ?? false,\n computed: opts.computed ?? isComputedKey(key),\n ...span,\n };\n },\n\n // Expressions\n arrayExpression(elements: t.ArrayExpressionElement[] = []): t.ArrayExpression {\n return { type: \"ArrayExpression\", elements, ...span };\n },\n objectExpression(properties: t.ObjectPropertyKind[] = []): t.ObjectExpression {\n return { type: \"ObjectExpression\", properties, ...span };\n },\n spreadElement(argument: t.Expression): t.SpreadElement {\n return { type: \"SpreadElement\", argument, ...span };\n },\n sequenceExpression(expressions: t.Expression[]): t.SequenceExpression {\n return { type: \"SequenceExpression\", expressions, ...span };\n },\n parenthesizedExpression(expression: t.Expression): t.ParenthesizedExpression {\n return { type: \"ParenthesizedExpression\", expression, ...span };\n },\n unaryExpression(operator: t.UnaryOperator, argument: t.Expression): t.UnaryExpression {\n return { type: \"UnaryExpression\", operator, prefix: true, argument, ...span };\n },\n updateExpression(operator: t.UpdateOperator, argument: t.Expression, prefix = false): t.UpdateExpression {\n return { type: \"UpdateExpression\", operator, argument, prefix, ...span };\n },\n binaryExpression(\n operator: t.BinaryOperator,\n left: t.Expression | t.PrivateIdentifier,\n right: t.Expression,\n ): t.BinaryExpression {\n return { type: \"BinaryExpression\", operator, left, right, ...span };\n },\n logicalExpression(operator: t.LogicalOperator, left: t.Expression, right: t.Expression): t.LogicalExpression {\n return { type: \"LogicalExpression\", operator, left, right, ...span };\n },\n assignmentExpression(\n operator: t.AssignmentOperator,\n left: t.AssignmentTarget,\n right: t.Expression,\n ): t.AssignmentExpression {\n return { type: \"AssignmentExpression\", operator, left, right, ...span };\n },\n conditionalExpression(\n test: t.Expression,\n consequent: t.Expression,\n alternate: t.Expression,\n ): t.ConditionalExpression {\n return { type: \"ConditionalExpression\", test, consequent, alternate, ...span };\n },\n yieldExpression(argument: t.Expression | null = null, delegate = false): t.YieldExpression {\n return { type: \"YieldExpression\", delegate, argument, ...span };\n },\n awaitExpression(argument: t.Expression): t.AwaitExpression {\n return { type: \"AwaitExpression\", argument, ...span };\n },\n memberExpression(\n object: t.Expression | t.Super,\n property: t.Expression | t.IdentifierName | t.PrivateIdentifier,\n opts: { computed?: boolean; optional?: boolean } = {},\n ): t.MemberExpression {\n return {\n type: \"MemberExpression\",\n object,\n property,\n computed: opts.computed ?? isComputedKey(property as t.PropertyKey),\n optional: opts.optional ?? false,\n ...span,\n } as t.MemberExpression;\n },\n callExpression(\n callee: t.Expression | t.Super,\n args: t.Argument[] = [],\n opts: { optional?: boolean; typeArguments?: t.TSTypeParameterInstantiation | null } = {},\n ): t.CallExpression {\n return { type: \"CallExpression\", callee, arguments: args, optional: opts.optional ?? false, ...opts, ...span };\n },\n newExpression(\n callee: t.Expression,\n args: t.Argument[] = [],\n opts: { typeArguments?: t.TSTypeParameterInstantiation | null } = {},\n ): t.NewExpression {\n return { type: \"NewExpression\", callee, arguments: args, ...opts, ...span };\n },\n chainExpression(expression: t.ChainElement): t.ChainExpression {\n return { type: \"ChainExpression\", expression, ...span };\n },\n taggedTemplateExpression(\n tag: t.Expression,\n quasi: t.TemplateLiteral,\n opts: { typeArguments?: t.TSTypeParameterInstantiation | null } = {},\n ): t.TaggedTemplateExpression {\n return { type: \"TaggedTemplateExpression\", tag, quasi, ...opts, ...span };\n },\n metaProperty(meta: string, property: string): t.MetaProperty {\n return { type: \"MetaProperty\", meta: b.identifier(meta, \"name\"), property: b.identifier(property, \"name\"), ...span };\n },\n importExpression(\n source: t.Expression,\n opts: { options?: t.Expression | null; phase?: t.ImportPhase | null } = {},\n ): t.ImportExpression {\n return { type: \"ImportExpression\", source, options: opts.options ?? null, phase: opts.phase ?? null, ...span };\n },\n\n // Functions\n arrowFunctionExpression(\n params: t.FunctionParameter[],\n body: t.BlockStatement | t.Expression,\n opts: { async?: boolean; typeParameters?: t.TSTypeParameterDeclaration | null; returnType?: t.TSTypeAnnotation | null } = {},\n ): t.ArrowFunctionExpression {\n return {\n type: \"ArrowFunctionExpression\",\n id: null,\n generator: false,\n async: opts.async ?? false,\n params,\n body,\n expression: body.type !== \"BlockStatement\",\n ...opts,\n ...span,\n };\n },\n functionExpression(\n params: t.FunctionParameter[],\n body: t.BlockStatement,\n opts: { id?: t.Identifier | null; async?: boolean; generator?: boolean } = {},\n ): t.FunctionExpression {\n return {\n type: \"FunctionExpression\",\n id: opts.id ?? null,\n generator: opts.generator ?? false,\n async: opts.async ?? false,\n params,\n body,\n expression: false,\n ...span,\n };\n },\n functionDeclaration(\n id: t.Identifier | null,\n params: t.FunctionParameter[],\n body: t.BlockStatement | null,\n opts: { async?: boolean; generator?: boolean } = {},\n ): t.FunctionDeclaration {\n return {\n type: \"FunctionDeclaration\",\n id,\n generator: opts.generator ?? false,\n async: opts.async ?? false,\n params,\n body,\n expression: false,\n ...span,\n };\n },\n\n // Classes\n classDeclaration(\n id: t.Identifier | null,\n body: t.ClassBody,\n opts: {\n superClass?: t.Expression | null;\n decorators?: t.Decorator[];\n typeParameters?: t.TSTypeParameterDeclaration | null;\n abstract?: boolean;\n } = {},\n ): t.ClassDeclaration {\n return {\n type: \"ClassDeclaration\",\n decorators: opts.decorators ?? [],\n id,\n superClass: opts.superClass ?? null,\n body,\n ...opts,\n ...span,\n };\n },\n classExpression(\n id: t.Identifier | null,\n body: t.ClassBody,\n opts: { superClass?: t.Expression | null; decorators?: t.Decorator[] } = {},\n ): t.ClassExpression {\n return {\n type: \"ClassExpression\",\n decorators: opts.decorators ?? [],\n id,\n superClass: opts.superClass ?? null,\n body,\n ...span,\n };\n },\n classBody(body: t.ClassElement[] = []): t.ClassBody {\n return { type: \"ClassBody\", body, ...span };\n },\n methodDefinition(\n key: t.PropertyKey,\n value: t.FunctionExpression | t.TSEmptyBodyFunctionExpression,\n opts: { kind?: t.MethodDefinitionKind; computed?: boolean; static?: boolean } = {},\n ): t.MethodDefinition {\n return {\n type: \"MethodDefinition\",\n decorators: [],\n key,\n value,\n kind: opts.kind ?? \"method\",\n computed: opts.computed ?? isComputedKey(key),\n static: opts.static ?? false,\n ...span,\n };\n },\n propertyDefinition(\n key: t.PropertyKey,\n value: t.Expression | null = null,\n opts: { computed?: boolean; static?: boolean; decorators?: t.Decorator[] } = {},\n ): t.PropertyDefinition {\n return {\n type: \"PropertyDefinition\",\n decorators: opts.decorators ?? [],\n key,\n value,\n computed: opts.computed ?? isComputedKey(key),\n static: opts.static ?? false,\n ...span,\n };\n },\n accessorProperty(\n key: t.PropertyKey,\n value: t.Expression | null = null,\n opts: { computed?: boolean; static?: boolean } = {},\n ): t.AccessorProperty {\n return {\n type: \"AccessorProperty\",\n decorators: [],\n key,\n value,\n computed: opts.computed ?? isComputedKey(key),\n static: opts.static ?? false,\n ...span,\n };\n },\n tsAbstractMethodDefinition(\n key: t.PropertyKey,\n value: t.FunctionExpression | t.TSEmptyBodyFunctionExpression,\n opts: { kind?: t.MethodDefinitionKind; computed?: boolean; static?: boolean } = {},\n ): t.TSAbstractMethodDefinition {\n return {\n type: \"TSAbstractMethodDefinition\",\n decorators: [],\n key,\n value,\n kind: opts.kind ?? \"method\",\n computed: opts.computed ?? isComputedKey(key),\n static: opts.static ?? false,\n ...span,\n };\n },\n tsAbstractPropertyDefinition(\n key: t.PropertyKey,\n value: t.Expression | null = null,\n opts: { computed?: boolean; static?: boolean } = {},\n ): t.TSAbstractPropertyDefinition {\n return {\n type: \"TSAbstractPropertyDefinition\",\n decorators: [],\n key,\n value,\n computed: opts.computed ?? isComputedKey(key),\n static: opts.static ?? false,\n ...span,\n };\n },\n tsAbstractAccessorProperty(\n key: t.PropertyKey,\n value: t.Expression | null = null,\n opts: { computed?: boolean; static?: boolean } = {},\n ): t.TSAbstractAccessorProperty {\n return {\n type: \"TSAbstractAccessorProperty\",\n decorators: [],\n key,\n value,\n computed: opts.computed ?? isComputedKey(key),\n static: opts.static ?? false,\n ...span,\n };\n },\n staticBlock(body: t.Statement[] = []): t.StaticBlock {\n return { type: \"StaticBlock\", body, ...span };\n },\n decorator(expression: t.Expression): t.Decorator {\n return { type: \"Decorator\", expression, ...span };\n },\n\n // Statements\n expressionStatement(expression: t.Expression): t.ExpressionStatement {\n return { type: \"ExpressionStatement\", expression, ...span };\n },\n directive(value: string): t.Directive {\n return { type: \"ExpressionStatement\", expression: b.stringLiteral(value), directive: value, ...span };\n },\n blockStatement(body: t.Statement[] = []): t.BlockStatement {\n return { type: \"BlockStatement\", body, ...span };\n },\n emptyStatement(): t.EmptyStatement {\n return { type: \"EmptyStatement\", ...span };\n },\n debuggerStatement(): t.DebuggerStatement {\n return { type: \"DebuggerStatement\", ...span };\n },\n returnStatement(argument: t.Expression | null = null): t.ReturnStatement {\n return { type: \"ReturnStatement\", argument, ...span };\n },\n ifStatement(test: t.Expression, consequent: t.Statement, alternate: t.Statement | null = null): t.IfStatement {\n return { type: \"IfStatement\", test, consequent, alternate, ...span };\n },\n switchStatement(discriminant: t.Expression, cases: t.SwitchCase[]): t.SwitchStatement {\n return { type: \"SwitchStatement\", discriminant, cases, ...span };\n },\n switchCase(test: t.Expression | null, consequent: t.Statement[]): t.SwitchCase {\n return { type: \"SwitchCase\", test, consequent, ...span };\n },\n throwStatement(argument: t.Expression): t.ThrowStatement {\n return { type: \"ThrowStatement\", argument, ...span };\n },\n tryStatement(\n block: t.BlockStatement,\n handler: t.CatchClause | null = null,\n finalizer: t.BlockStatement | null = null,\n ): t.TryStatement {\n return { type: \"TryStatement\", block, handler, finalizer, ...span };\n },\n catchClause(param: t.BindingPattern | null, body: t.BlockStatement): t.CatchClause {\n return { type: \"CatchClause\", param, body, ...span };\n },\n whileStatement(test: t.Expression, body: t.Statement): t.WhileStatement {\n return { type: \"WhileStatement\", test, body, ...span };\n },\n doWhileStatement(body: t.Statement, test: t.Expression): t.DoWhileStatement {\n return { type: \"DoWhileStatement\", body, test, ...span };\n },\n forStatement(\n init: t.ForStatementInit | null,\n test: t.Expression | null,\n update: t.Expression | null,\n body: t.Statement,\n ): t.ForStatement {\n return { type: \"ForStatement\", init, test, update, body, ...span };\n },\n forInStatement(left: t.ForStatementLeft, right: t.Expression, body: t.Statement): t.ForInStatement {\n return { type: \"ForInStatement\", left, right, body, ...span };\n },\n forOfStatement(\n left: t.ForStatementLeft,\n right: t.Expression,\n body: t.Statement,\n isAwait = false,\n ): t.ForOfStatement {\n return { type: \"ForOfStatement\", left, right, body, await: isAwait, ...span };\n },\n labeledStatement(label: t.LabelIdentifier, body: t.Statement): t.LabeledStatement {\n return { type: \"LabeledStatement\", label, body, ...span };\n },\n breakStatement(label: t.LabelIdentifier | null = null): t.BreakStatement {\n return { type: \"BreakStatement\", label, ...span };\n },\n continueStatement(label: t.LabelIdentifier | null = null): t.ContinueStatement {\n return { type: \"ContinueStatement\", label, ...span };\n },\n withStatement(object: t.Expression, body: t.Statement): t.WithStatement {\n return { type: \"WithStatement\", object, body, ...span };\n },\n\n // Variable declarations\n variableDeclaration(kind: t.VariableDeclarationKind, declarations: t.VariableDeclarator[]): t.VariableDeclaration {\n return { type: \"VariableDeclaration\", kind, declarations, ...span };\n },\n variableDeclarator(id: t.BindingPattern, init: t.Expression | null = null): t.VariableDeclarator {\n return { type: \"VariableDeclarator\", id, init, ...span };\n },\n\n // Modules\n importDeclaration(\n specifiers: t.ImportDeclarationSpecifier[],\n source: t.StringLiteral,\n opts: { attributes?: t.ImportAttribute[]; phase?: t.ImportPhase | null; importKind?: t.ImportOrExportKind } = {},\n ): t.ImportDeclaration {\n return {\n type: \"ImportDeclaration\",\n specifiers,\n source,\n phase: opts.phase ?? null,\n attributes: opts.attributes ?? [],\n ...opts,\n ...span,\n };\n },\n importSpecifier(imported: t.IdentifierName | t.StringLiteral, local: t.BindingIdentifier): t.ImportSpecifier {\n return { type: \"ImportSpecifier\", imported, local, ...span };\n },\n importDefaultSpecifier(local: t.BindingIdentifier): t.ImportDefaultSpecifier {\n return { type: \"ImportDefaultSpecifier\", local, ...span };\n },\n importNamespaceSpecifier(local: t.BindingIdentifier): t.ImportNamespaceSpecifier {\n return { type: \"ImportNamespaceSpecifier\", local, ...span };\n },\n importAttribute(key: t.ImportAttributeKey, value: t.StringLiteral): t.ImportAttribute {\n return { type: \"ImportAttribute\", key, value, ...span };\n },\n exportNamedDeclaration(\n declaration: t.Declaration | null,\n specifiers: t.ExportSpecifier[] = [],\n opts: { source?: t.StringLiteral | null; attributes?: t.ImportAttribute[]; exportKind?: t.ImportOrExportKind } = {},\n ): t.ExportNamedDeclaration {\n return {\n type: \"ExportNamedDeclaration\",\n declaration,\n specifiers,\n source: opts.source ?? null,\n attributes: opts.attributes ?? [],\n ...opts,\n ...span,\n };\n },\n exportDefaultDeclaration(declaration: t.ExportDefaultDeclarationKind): t.ExportDefaultDeclaration {\n return { type: \"ExportDefaultDeclaration\", declaration, ...span };\n },\n exportAllDeclaration(\n source: t.StringLiteral,\n opts: { exported?: t.ModuleExportName | null; attributes?: t.ImportAttribute[]; exportKind?: t.ImportOrExportKind } = {},\n ): t.ExportAllDeclaration {\n return {\n type: \"ExportAllDeclaration\",\n exported: opts.exported ?? null,\n source,\n attributes: opts.attributes ?? [],\n ...opts,\n ...span,\n };\n },\n exportSpecifier(local: t.ModuleExportName, exported: t.ModuleExportName): t.ExportSpecifier {\n return { type: \"ExportSpecifier\", local, exported, ...span };\n },\n\n // JSX\n jsxIdentifier(name: string): t.JSXIdentifier {\n return { type: \"JSXIdentifier\", name, ...span };\n },\n jsxNamespacedName(namespace: t.JSXIdentifier, name: t.JSXIdentifier): t.JSXNamespacedName {\n return { type: \"JSXNamespacedName\", namespace, name, ...span };\n },\n jsxMemberExpression(object: t.JSXMemberExpressionObject, property: t.JSXIdentifier): t.JSXMemberExpression {\n return { type: \"JSXMemberExpression\", object, property, ...span };\n },\n jsxElement(\n openingElement: t.JSXOpeningElement,\n children: t.JSXChild[] = [],\n closingElement: t.JSXClosingElement | null = null,\n ): t.JSXElement {\n return { type: \"JSXElement\", openingElement, children, closingElement, ...span };\n },\n jsxOpeningElement(\n name: t.JSXElementName,\n attributes: t.JSXAttributeItem[] = [],\n selfClosing = false,\n ): t.JSXOpeningElement {\n return { type: \"JSXOpeningElement\", name, attributes, selfClosing, ...span };\n },\n jsxClosingElement(name: t.JSXElementName): t.JSXClosingElement {\n return { type: \"JSXClosingElement\", name, ...span };\n },\n jsxOpeningFragment(): t.JSXOpeningFragment {\n return { type: \"JSXOpeningFragment\", ...span };\n },\n jsxClosingFragment(): t.JSXClosingFragment {\n return { type: \"JSXClosingFragment\", ...span };\n },\n jsxFragment(children: t.JSXChild[] = []): t.JSXFragment {\n return {\n type: \"JSXFragment\",\n openingFragment: b.jsxOpeningFragment(),\n children,\n closingFragment: b.jsxClosingFragment(),\n ...span,\n };\n },\n jsxAttribute(name: t.JSXAttributeName, value: t.JSXAttributeValue | null = null): t.JSXAttribute {\n return { type: \"JSXAttribute\", name, value, ...span };\n },\n jsxSpreadAttribute(argument: t.Expression): t.JSXSpreadAttribute {\n return { type: \"JSXSpreadAttribute\", argument, ...span };\n },\n jsxExpressionContainer(expression: t.JSXExpression): t.JSXExpressionContainer {\n return { type: \"JSXExpressionContainer\", expression, ...span };\n },\n jsxEmptyExpression(): t.JSXEmptyExpression {\n return { type: \"JSXEmptyExpression\", ...span };\n },\n jsxText(value: string): t.JSXText {\n return { type: \"JSXText\", value, raw: value, ...span };\n },\n jsxSpreadChild(expression: t.Expression): t.JSXSpreadChild {\n return { type: \"JSXSpreadChild\", expression, ...span };\n },\n\n // TypeScript: type annotation and keywords\n tsTypeAnnotation(typeAnnotation: t.TSType): t.TSTypeAnnotation {\n return { type: \"TSTypeAnnotation\", typeAnnotation, ...span };\n },\n tsAnyKeyword: (): t.TSAnyKeyword => ({ type: \"TSAnyKeyword\", ...span }),\n tsUnknownKeyword: (): t.TSUnknownKeyword => ({ type: \"TSUnknownKeyword\", ...span }),\n tsNeverKeyword: (): t.TSNeverKeyword => ({ type: \"TSNeverKeyword\", ...span }),\n tsVoidKeyword: (): t.TSVoidKeyword => ({ type: \"TSVoidKeyword\", ...span }),\n tsNullKeyword: (): t.TSNullKeyword => ({ type: \"TSNullKeyword\", ...span }),\n tsUndefinedKeyword: (): t.TSUndefinedKeyword => ({ type: \"TSUndefinedKeyword\", ...span }),\n tsStringKeyword: (): t.TSStringKeyword => ({ type: \"TSStringKeyword\", ...span }),\n tsNumberKeyword: (): t.TSNumberKeyword => ({ type: \"TSNumberKeyword\", ...span }),\n tsBigIntKeyword: (): t.TSBigIntKeyword => ({ type: \"TSBigIntKeyword\", ...span }),\n tsBooleanKeyword: (): t.TSBooleanKeyword => ({ type: \"TSBooleanKeyword\", ...span }),\n tsSymbolKeyword: (): t.TSSymbolKeyword => ({ type: \"TSSymbolKeyword\", ...span }),\n tsObjectKeyword: (): t.TSObjectKeyword => ({ type: \"TSObjectKeyword\", ...span }),\n tsIntrinsicKeyword: (): t.TSIntrinsicKeyword => ({ type: \"TSIntrinsicKeyword\", ...span }),\n tsThisType: (): t.TSThisType => ({ type: \"TSThisType\", ...span }),\n\n // TypeScript: composite types\n tsTypeReference(\n typeName: t.TSTypeName,\n typeArguments: t.TSTypeParameterInstantiation | null = null,\n ): t.TSTypeReference {\n return { type: \"TSTypeReference\", typeName, typeArguments, ...span };\n },\n tsQualifiedName(left: t.TSTypeName, right: t.IdentifierName): t.TSQualifiedName {\n return { type: \"TSQualifiedName\", left, right, ...span };\n },\n tsTypeQuery(\n exprName: t.TSTypeQueryExprName,\n typeArguments: t.TSTypeParameterInstantiation | null = null,\n ): t.TSTypeQuery {\n return { type: \"TSTypeQuery\", exprName, typeArguments, ...span };\n },\n tsImportType(\n source: t.StringLiteral,\n opts: {\n options?: t.ObjectExpression | null;\n qualifier?: t.TSImportTypeQualifier | null;\n typeArguments?: t.TSTypeParameterInstantiation | null;\n } = {},\n ): t.TSImportType {\n return {\n type: \"TSImportType\",\n source,\n options: opts.options ?? null,\n qualifier: opts.qualifier ?? null,\n typeArguments: opts.typeArguments ?? null,\n ...span,\n };\n },\n tsTypeParameter(\n name: t.BindingIdentifier,\n opts: { constraint?: t.TSType | null; default?: t.TSType | null; in?: boolean; out?: boolean; const?: boolean } = {},\n ): t.TSTypeParameter {\n return {\n type: \"TSTypeParameter\",\n name,\n constraint: opts.constraint ?? null,\n default: opts.default ?? null,\n in: opts.in ?? false,\n out: opts.out ?? false,\n const: opts.const ?? false,\n ...span,\n };\n },\n tsTypeParameterDeclaration(params: t.TSTypeParameter[]): t.TSTypeParameterDeclaration {\n return { type: \"TSTypeParameterDeclaration\", params, ...span };\n },\n tsTypeParameterInstantiation(params: t.TSType[]): t.TSTypeParameterInstantiation {\n return { type: \"TSTypeParameterInstantiation\", params, ...span };\n },\n tsLiteralType(literal: t.TSLiteralType[\"literal\"]): t.TSLiteralType {\n return { type: \"TSLiteralType\", literal, ...span };\n },\n tsTemplateLiteralType(quasis: t.TemplateElement[], types: t.TSType[]): t.TSTemplateLiteralType {\n return { type: \"TSTemplateLiteralType\", quasis, types, ...span };\n },\n tsArrayType(elementType: t.TSType): t.TSArrayType {\n return { type: \"TSArrayType\", elementType, ...span };\n },\n tsIndexedAccessType(objectType: t.TSType, indexType: t.TSType): t.TSIndexedAccessType {\n return { type: \"TSIndexedAccessType\", objectType, indexType, ...span };\n },\n tsTupleType(elementTypes: t.TSTupleElement[]): t.TSTupleType {\n return { type: \"TSTupleType\", elementTypes, ...span };\n },\n tsNamedTupleMember(label: t.IdentifierName, elementType: t.TSType, optional = false): t.TSNamedTupleMember {\n return { type: \"TSNamedTupleMember\", label, elementType, optional, ...span };\n },\n tsOptionalType(typeAnnotation: t.TSType): t.TSOptionalType {\n return { type: \"TSOptionalType\", typeAnnotation, ...span };\n },\n tsRestType(typeAnnotation: t.TSType | t.TSNamedTupleMember): t.TSRestType {\n return { type: \"TSRestType\", typeAnnotation, ...span };\n },\n tsJSDocNullableType(typeAnnotation: t.TSType, postfix = false): t.TSJSDocNullableType {\n return { type: \"TSJSDocNullableType\", typeAnnotation, postfix, ...span };\n },\n tsJSDocNonNullableType(typeAnnotation: t.TSType, postfix = false): t.TSJSDocNonNullableType {\n return { type: \"TSJSDocNonNullableType\", typeAnnotation, postfix, ...span };\n },\n tsJSDocUnknownType(): t.TSJSDocUnknownType {\n return { type: \"TSJSDocUnknownType\", ...span };\n },\n tsUnionType(types: t.TSType[]): t.TSUnionType {\n return { type: \"TSUnionType\", types, ...span };\n },\n tsIntersectionType(types: t.TSType[]): t.TSIntersectionType {\n return { type: \"TSIntersectionType\", types, ...span };\n },\n tsConditionalType(\n checkType: t.TSType,\n extendsType: t.TSType,\n trueType: t.TSType,\n falseType: t.TSType,\n ): t.TSConditionalType {\n return { type: \"TSConditionalType\", checkType, extendsType, trueType, falseType, ...span };\n },\n tsInferType(typeParameter: t.TSTypeParameter): t.TSInferType {\n return { type: \"TSInferType\", typeParameter, ...span };\n },\n tsTypeOperator(operator: t.TSTypeOperator[\"operator\"], typeAnnotation: t.TSType): t.TSTypeOperator {\n return { type: \"TSTypeOperator\", operator, typeAnnotation, ...span };\n },\n tsParenthesizedType(typeAnnotation: t.TSType): t.TSParenthesizedType {\n return { type: \"TSParenthesizedType\", typeAnnotation, ...span };\n },\n tsFunctionType(\n params: t.FunctionParameter[],\n returnType: t.TSTypeAnnotation | null,\n typeParameters: t.TSTypeParameterDeclaration | null = null,\n ): t.TSFunctionType {\n return { type: \"TSFunctionType\", typeParameters, params, returnType, ...span };\n },\n tsConstructorType(\n params: t.FunctionParameter[],\n returnType: t.TSTypeAnnotation | null,\n opts: { abstract?: boolean; typeParameters?: t.TSTypeParameterDeclaration | null } = {},\n ): t.TSConstructorType {\n return {\n type: \"TSConstructorType\",\n abstract: opts.abstract ?? false,\n typeParameters: opts.typeParameters ?? null,\n params,\n returnType,\n ...span,\n };\n },\n tsTypePredicate(\n parameterName: t.TSTypePredicateName,\n typeAnnotation: t.TSTypeAnnotation | null = null,\n asserts = false,\n ): t.TSTypePredicate {\n return { type: \"TSTypePredicate\", parameterName, typeAnnotation, asserts, ...span };\n },\n tsTypeLiteral(members: t.TSSignature[]): t.TSTypeLiteral {\n return { type: \"TSTypeLiteral\", members, ...span };\n },\n tsMappedType(\n key: t.BindingIdentifier,\n constraint: t.TSType,\n opts: {\n nameType?: t.TSType | null;\n typeAnnotation?: t.TSType | null;\n optional?: t.TSMappedTypeModifierOperator | false;\n readonly?: t.TSMappedTypeModifierOperator | null;\n } = {},\n ): t.TSMappedType {\n return {\n type: \"TSMappedType\",\n key,\n constraint,\n nameType: opts.nameType ?? null,\n typeAnnotation: opts.typeAnnotation ?? null,\n optional: opts.optional ?? false,\n readonly: opts.readonly ?? null,\n ...span,\n };\n },\n\n // TypeScript: signatures\n tsPropertySignature(\n key: t.PropertyKey,\n opts: { typeAnnotation?: t.TSTypeAnnotation | null; computed?: boolean; optional?: boolean; readonly?: boolean } = {},\n ): t.TSPropertySignature {\n return {\n type: \"TSPropertySignature\",\n key,\n typeAnnotation: opts.typeAnnotation ?? null,\n computed: opts.computed ?? isComputedKey(key),\n optional: opts.optional ?? false,\n readonly: opts.readonly ?? false,\n accessibility: null,\n static: false,\n ...span,\n };\n },\n tsMethodSignature(\n key: t.PropertyKey,\n params: t.FunctionParameter[],\n opts: {\n kind?: t.TSMethodSignatureKind;\n computed?: boolean;\n optional?: boolean;\n typeParameters?: t.TSTypeParameterDeclaration | null;\n returnType?: t.TSTypeAnnotation | null;\n } = {},\n ): t.TSMethodSignature {\n return {\n type: \"TSMethodSignature\",\n key,\n computed: opts.computed ?? isComputedKey(key),\n optional: opts.optional ?? false,\n kind: opts.kind ?? \"method\",\n typeParameters: opts.typeParameters ?? null,\n params,\n returnType: opts.returnType ?? null,\n accessibility: null,\n readonly: false,\n static: false,\n ...span,\n };\n },\n tsCallSignatureDeclaration(\n params: t.FunctionParameter[],\n returnType: t.TSTypeAnnotation | null = null,\n typeParameters: t.TSTypeParameterDeclaration | null = null,\n ): t.TSCallSignatureDeclaration {\n return { type: \"TSCallSignatureDeclaration\", typeParameters, params, returnType, ...span };\n },\n tsConstructSignatureDeclaration(\n params: t.FunctionParameter[],\n returnType: t.TSTypeAnnotation | null = null,\n typeParameters: t.TSTypeParameterDeclaration | null = null,\n ): t.TSConstructSignatureDeclaration {\n return { type: \"TSConstructSignatureDeclaration\", typeParameters, params, returnType, ...span };\n },\n tsIndexSignature(\n parameters: t.BindingIdentifier[],\n typeAnnotation: t.TSTypeAnnotation,\n opts: { readonly?: boolean; static?: boolean } = {},\n ): t.TSIndexSignature {\n return {\n type: \"TSIndexSignature\",\n parameters,\n typeAnnotation,\n readonly: opts.readonly ?? false,\n static: opts.static ?? false,\n accessibility: null,\n ...span,\n };\n },\n\n // TypeScript: declarations\n tsTypeAliasDeclaration(\n id: t.BindingIdentifier,\n typeAnnotation: t.TSType,\n opts: { typeParameters?: t.TSTypeParameterDeclaration | null; declare?: boolean } = {},\n ): t.TSTypeAliasDeclaration {\n return {\n type: \"TSTypeAliasDeclaration\",\n id,\n typeParameters: opts.typeParameters ?? null,\n typeAnnotation,\n declare: opts.declare ?? false,\n ...span,\n };\n },\n tsInterfaceDeclaration(\n id: t.BindingIdentifier,\n body: t.TSInterfaceBody,\n opts: { extends?: t.TSInterfaceHeritage[]; typeParameters?: t.TSTypeParameterDeclaration | null; declare?: boolean } = {},\n ): t.TSInterfaceDeclaration {\n return {\n type: \"TSInterfaceDeclaration\",\n id,\n typeParameters: opts.typeParameters ?? null,\n extends: opts.extends ?? [],\n body,\n declare: opts.declare ?? false,\n ...span,\n };\n },\n tsInterfaceBody(body: t.TSSignature[]): t.TSInterfaceBody {\n return { type: \"TSInterfaceBody\", body, ...span };\n },\n tsInterfaceHeritage(\n expression: t.Expression,\n typeArguments: t.TSTypeParameterInstantiation | null = null,\n ): t.TSInterfaceHeritage {\n return { type: \"TSInterfaceHeritage\", expression, typeArguments, ...span };\n },\n tsClassImplements(\n expression: t.Expression,\n typeArguments: t.TSTypeParameterInstantiation | null = null,\n ): t.TSClassImplements {\n return { type: \"TSClassImplements\", expression, typeArguments, ...span };\n },\n tsEnumDeclaration(\n id: t.BindingIdentifier,\n body: t.TSEnumBody,\n opts: { const?: boolean; declare?: boolean } = {},\n ): t.TSEnumDeclaration {\n return { type: \"TSEnumDeclaration\", id, body, const: opts.const ?? false, declare: opts.declare ?? false, ...span };\n },\n tsEnumBody(members: t.TSEnumMember[]): t.TSEnumBody {\n return { type: \"TSEnumBody\", members, ...span };\n },\n tsEnumMember(id: t.TSEnumMemberName, initializer: t.Expression | null = null): t.TSEnumMember {\n return { type: \"TSEnumMember\", id, initializer, computed: false, ...span };\n },\n tsModuleDeclaration(\n id: t.TSModuleDeclaration[\"id\"],\n body: t.TSModuleBlock | undefined,\n opts: { kind?: t.TSModuleDeclarationKind; declare?: boolean; global?: boolean } = {},\n ): t.TSModuleDeclaration {\n return {\n type: \"TSModuleDeclaration\",\n id,\n body,\n kind: opts.kind ?? \"module\",\n declare: opts.declare ?? false,\n global: opts.global ?? false,\n ...span,\n };\n },\n tsModuleBlock(body: t.Statement[] = []): t.TSModuleBlock {\n return { type: \"TSModuleBlock\", body, ...span };\n },\n tsParameterProperty(\n parameter: t.BindingIdentifier | t.AssignmentPattern,\n opts: { accessibility?: t.TSAccessibility | null; readonly?: boolean; override?: boolean; decorators?: t.Decorator[] } = {},\n ): t.TSParameterProperty {\n return {\n type: \"TSParameterProperty\",\n decorators: opts.decorators ?? [],\n parameter,\n override: opts.override ?? false,\n readonly: opts.readonly ?? false,\n accessibility: opts.accessibility ?? null,\n static: false,\n ...span,\n };\n },\n\n // TypeScript: expressions and module statements\n tsAsExpression(expression: t.Expression, typeAnnotation: t.TSType): t.TSAsExpression {\n return { type: \"TSAsExpression\", expression, typeAnnotation, ...span };\n },\n tsSatisfiesExpression(expression: t.Expression, typeAnnotation: t.TSType): t.TSSatisfiesExpression {\n return { type: \"TSSatisfiesExpression\", expression, typeAnnotation, ...span };\n },\n tsTypeAssertion(typeAnnotation: t.TSType, expression: t.Expression): t.TSTypeAssertion {\n return { type: \"TSTypeAssertion\", typeAnnotation, expression, ...span };\n },\n tsNonNullExpression(expression: t.Expression): t.TSNonNullExpression {\n return { type: \"TSNonNullExpression\", expression, ...span };\n },\n tsInstantiationExpression(\n expression: t.Expression,\n typeArguments: t.TSTypeParameterInstantiation,\n ): t.TSInstantiationExpression {\n return { type: \"TSInstantiationExpression\", expression, typeArguments, ...span };\n },\n tsExportAssignment(expression: t.Expression): t.TSExportAssignment {\n return { type: \"TSExportAssignment\", expression, ...span };\n },\n tsNamespaceExportDeclaration(id: t.IdentifierName): t.TSNamespaceExportDeclaration {\n return { type: \"TSNamespaceExportDeclaration\", id, ...span };\n },\n tsImportEqualsDeclaration(\n id: t.BindingIdentifier,\n moduleReference: t.TSModuleReference,\n importKind: t.ImportOrExportKind = \"value\",\n ): t.TSImportEqualsDeclaration {\n return { type: \"TSImportEqualsDeclaration\", id, moduleReference, importKind, ...span };\n },\n tsExternalModuleReference(expression: t.StringLiteral): t.TSExternalModuleReference {\n return { type: \"TSExternalModuleReference\", expression, ...span };\n },\n tsDeclareFunction(\n id: t.BindingIdentifier | null,\n params: t.FunctionParameter[],\n opts: { async?: boolean; generator?: boolean; returnType?: t.TSTypeAnnotation | null; typeParameters?: t.TSTypeParameterDeclaration | null; declare?: boolean } = {},\n ): t.TSDeclareFunction {\n return {\n type: \"TSDeclareFunction\",\n id,\n generator: opts.generator ?? false,\n async: opts.async ?? false,\n params,\n body: null,\n expression: false,\n declare: opts.declare ?? false,\n typeParameters: opts.typeParameters ?? null,\n returnType: opts.returnType ?? null,\n ...span,\n };\n },\n\n tsEmptyBodyFunctionExpression(\n params: t.FunctionParameter[],\n opts: { id?: t.BindingIdentifier | null; returnType?: t.TSTypeAnnotation | null; typeParameters?: t.TSTypeParameterDeclaration | null } = {},\n ): t.TSEmptyBodyFunctionExpression {\n return {\n type: \"TSEmptyBodyFunctionExpression\",\n id: opts.id ?? null,\n generator: false,\n async: false,\n params,\n body: null,\n expression: false,\n declare: false,\n typeParameters: opts.typeParameters ?? null,\n returnType: opts.returnType ?? null,\n ...span,\n };\n },\n\n // Program\n hashbang(value: string): t.Hashbang {\n return { type: \"Hashbang\", value, ...span };\n },\n program(\n body: Array<t.Statement | t.ModuleDeclaration | t.Directive> = [],\n opts: { sourceType?: t.ModuleKind; hashbang?: t.Hashbang | null } = {},\n ): t.Program {\n return {\n type: \"Program\",\n sourceType: opts.sourceType ?? \"module\",\n hashbang: opts.hashbang ?? null,\n body,\n ...span,\n };\n },\n};\n"],"mappings":"AAMA,MAAa,EAAe,CAC1B,WAAY,wkBAmCZ,EACA,UAAW,2dA4BX,EACA,YAAa,CACX,sBACA,mBACA,sBACA,oBACA,yBACA,yBACA,oBACA,sBACA,2BACF,EACA,kBAAmB,CACjB,oBACA,yBACA,2BACA,uBACA,qBACA,8BACF,EAEA,SAAU,CACR,sBACA,qBACA,0BACA,oBACA,+BACF,EACA,MAAO,CAAC,mBAAoB,iBAAiB,EAC7C,OAAQ,CAAC,mBAAoB,4BAA4B,EACzD,KAAM,CACJ,eACA,iBACA,iBACA,iBACA,kBACF,EACA,Q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mC,QACN,CAC7B,MAAO,CAAE,KAAM,4BAA6B,KAAI,kBAAiB,aAAY,GAAG,CAAK,CACvF,EACA,0BAA0B,EAA0D,CAClF,MAAO,CAAE,KAAM,4BAA6B,aAAY,GAAG,CAAK,CAClE,EACA,kBACE,EACA,EACA,EAAkK,CAAC,EAC9I,CACrB,MAAO,CACL,KAAM,oBACN,KACA,UAAW,EAAK,WAAa,GAC7B,MAAO,EAAK,OAAS,GACrB,SACA,KAAM,KACN,WAAY,GACZ,QAAS,EAAK,SAAW,GACzB,eAAgB,EAAK,gBAAkB,KACvC,WAAY,EAAK,YAAc,KAC/B,GAAG,CACL,CACF,EAEA,8BACE,EACA,EAA0I,CAAC,EAC1G,CACjC,MAAO,CACL,KAAM,gCACN,GAAI,EAAK,IAAM,KACf,UAAW,GACX,MAAO,GACP,SACA,KAAM,KACN,WAAY,GACZ,QAAS,GACT,eAAgB,EAAK,gBAAkB,KACvC,WAAY,EAAK,YAAc,KAC/B,GAAG,CACL,CACF,EAGA,SAAS,EAA2B,CAClC,MAAO,CAAE,KAAM,WAAY,QAAO,GAAG,CAAK,CAC5C,EACA,QACE,EAA+D,CAAC,EAChE,EAAoE,CAAC,EAC1D,CACX,MAAO,CACL,KAAM,UACN,WAAY,EAAK,YAAc,SAC/B,SAAU,EAAK,UAAY,KAC3B,OACA,GAAG,CACL,CACF,CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "yuku-walk",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A fast, typed AST walker for yuku-parser's ESTree / TypeScript-ESTree AST.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ast",
|
|
7
|
+
"codemod",
|
|
8
|
+
"estree",
|
|
9
|
+
"javascript",
|
|
10
|
+
"transform",
|
|
11
|
+
"traverse",
|
|
12
|
+
"typescript",
|
|
13
|
+
"visitor",
|
|
14
|
+
"walker",
|
|
15
|
+
"yuku"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"types": "./dist/index.d.mts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./dist/index.mjs",
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsdown",
|
|
29
|
+
"test": "bun test",
|
|
30
|
+
"type-check": "tsc --noEmit",
|
|
31
|
+
"lint": "oxlint",
|
|
32
|
+
"format": "oxfmt"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/bun": "latest",
|
|
36
|
+
"oxfmt": "^0.51.0",
|
|
37
|
+
"oxlint": "^1.66.0",
|
|
38
|
+
"tsdown": "^0.22.0",
|
|
39
|
+
"typescript": "^6.0.3",
|
|
40
|
+
"yuku-codegen": "^0.5.17",
|
|
41
|
+
"yuku-parser": "^0.5.17"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"yuku-parser": "^0.5.16"
|
|
45
|
+
}
|
|
46
|
+
}
|