UNPKG

21.9 kBTypeScriptView Raw
1import astTypes = require("ast-types");
2import nodePath = require("ast-types/lib/node-path");
3import types = require("ast-types/lib/types");
4import recast = require("recast");
5import Collection = require("./Collection");
6import template = require("./template");
7import VariableDeclarator = require("./collections/VariableDeclarator");
8import JSXElement = require("./collections/JSXElement");
9
10declare namespace core {
11 interface Parser {
12 parse(source: string, options?: any): types.ASTNode;
13 }
14
15 interface Filters {
16 JSXElement: JSXElement.FilterMethods;
17 VariableDeclarator: VariableDeclarator.FilterMethods;
18 }
19
20 interface Mappings {
21 JSXElement: JSXElement.MappingMethods;
22 }
23
24 interface Plugin {
25 (core: Core): void;
26 }
27
28 interface FileInfo {
29 /** The path to the current file. */
30 path: string;
31 /** The source code of the current file. */
32 source: string;
33 }
34
35 interface Stats {
36 /**
37 * Helper function to collect data during --dry runs.
38 * This function keeps a counter for how often it was called with a specific argument.
39 * The result is shown in the console. Useful for finding out how many files match a criterion.
40 */
41 (name: string, quantity?: number): void;
42 }
43
44 type ASTPath<N = ASTNode> = nodePath.NodePath<N, N>;
45
46 interface Core {
47 (source: string, options?: Options): Collection.Collection<any>;
48 (source: ASTNode | ASTNode[] | ASTPath | ASTPath[]): Collection.Collection<any>;
49
50 registerMethods: typeof Collection.registerMethods;
51
52 types: typeof recast.types;
53
54 match(
55 path: ASTNode | ASTPath,
56 filter: ((path: ASTNode) => boolean) | ASTNode,
57 ): boolean;
58
59 /** template, bound to default parser */
60 template: template.Template;
61
62 filters: Filters;
63
64 mappings: Mappings;
65
66 /**
67 * Utility function for registering plugins.
68 *
69 * Plugins are simple functions that are passed the core jscodeshift instance.
70 * They should extend jscodeshift by calling `registerMethods`, etc.
71 * This method guards against repeated registrations (the plugin callback will only be called once).
72 */
73 use(plugin: Plugin): void;
74
75 /**
76 * Returns a version of the core jscodeshift function "bound" to a specific
77 * parser.
78 */
79 withParser(parser: string | Parser): JSCodeshift;
80 }
81
82 type JSCodeshift = Core & typeof recast.types.namedTypes & typeof recast.types.builders;
83 type Collection<T = any> = Collection.Collection<T>;
84
85 interface API {
86 j: JSCodeshift;
87 jscodeshift: JSCodeshift;
88 stats: Stats;
89 report: (msg: string) => void;
90 }
91
92 interface Options {
93 [option: string]: any;
94 }
95
96 interface Transform {
97 /**
98 * If a string is returned and it is different from passed source, the transform is considered to be successful.
99 * If a string is returned but it's the same as the source, the transform is considered to be unsuccessful.
100 * If nothing is returned, the file is not supposed to be transformed (which is ok).
101 */
102 // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
103 (file: FileInfo, api: API, options: Options): string | null | undefined | void;
104 }
105
106 type ASTNode = astTypes.namedTypes.ASTNode;
107
108 type AnyTypeAnnotation = astTypes.namedTypes.AnyTypeAnnotation;
109 type ArrayExpression = astTypes.namedTypes.ArrayExpression;
110 type ArrayPattern = astTypes.namedTypes.ArrayPattern;
111 type ArrayTypeAnnotation = astTypes.namedTypes.ArrayTypeAnnotation;
112 type ArrowFunctionExpression = astTypes.namedTypes.ArrowFunctionExpression;
113 type AssignmentExpression = astTypes.namedTypes.AssignmentExpression;
114 type AssignmentPattern = astTypes.namedTypes.AssignmentPattern;
115 type AwaitExpression = astTypes.namedTypes.AwaitExpression;
116 type BigIntLiteral = astTypes.namedTypes.BigIntLiteral;
117 type BigIntLiteralTypeAnnotation = astTypes.namedTypes.BigIntLiteralTypeAnnotation;
118 type BigIntTypeAnnotation = astTypes.namedTypes.BigIntTypeAnnotation;
119 type BinaryExpression = astTypes.namedTypes.BinaryExpression;
120 type BindExpression = astTypes.namedTypes.BindExpression;
121 type Block = astTypes.namedTypes.Block;
122 type BlockStatement = astTypes.namedTypes.BlockStatement;
123 type BooleanLiteral = astTypes.namedTypes.BooleanLiteral;
124 type BooleanLiteralTypeAnnotation = astTypes.namedTypes.BooleanLiteralTypeAnnotation;
125 type BooleanTypeAnnotation = astTypes.namedTypes.BooleanTypeAnnotation;
126 type BreakStatement = astTypes.namedTypes.BreakStatement;
127 type CallExpression = astTypes.namedTypes.CallExpression;
128 type CatchClause = astTypes.namedTypes.CatchClause;
129 type ChainElement = astTypes.namedTypes.ChainElement;
130 type ChainExpression = astTypes.namedTypes.ChainExpression;
131 type ClassBody = astTypes.namedTypes.ClassBody;
132 type ClassDeclaration = astTypes.namedTypes.ClassDeclaration;
133 type ClassExpression = astTypes.namedTypes.ClassExpression;
134 type ClassImplements = astTypes.namedTypes.ClassImplements;
135 type ClassMethod = astTypes.namedTypes.ClassMethod;
136 type ClassPrivateMethod = astTypes.namedTypes.ClassPrivateMethod;
137 type ClassPrivateProperty = astTypes.namedTypes.ClassPrivateProperty;
138 type ClassProperty = astTypes.namedTypes.ClassProperty;
139 type ClassPropertyDefinition = astTypes.namedTypes.ClassPropertyDefinition;
140 type Comment = astTypes.namedTypes.Comment;
141 type CommentBlock = astTypes.namedTypes.CommentBlock;
142 type CommentLine = astTypes.namedTypes.CommentLine;
143 type ComprehensionBlock = astTypes.namedTypes.ComprehensionBlock;
144 type ComprehensionExpression = astTypes.namedTypes.ComprehensionExpression;
145 type ConditionalExpression = astTypes.namedTypes.ConditionalExpression;
146 type ContinueStatement = astTypes.namedTypes.ContinueStatement;
147 type DebuggerStatement = astTypes.namedTypes.DebuggerStatement;
148 type Declaration = astTypes.namedTypes.Declaration;
149 type DeclareClass = astTypes.namedTypes.DeclareClass;
150 type DeclaredPredicate = astTypes.namedTypes.DeclaredPredicate;
151 type DeclareExportAllDeclaration = astTypes.namedTypes.DeclareExportAllDeclaration;
152 type DeclareExportDeclaration = astTypes.namedTypes.DeclareExportDeclaration;
153 type DeclareFunction = astTypes.namedTypes.DeclareFunction;
154 type DeclareInterface = astTypes.namedTypes.DeclareInterface;
155 type DeclareModule = astTypes.namedTypes.DeclareModule;
156 type DeclareModuleExports = astTypes.namedTypes.DeclareModuleExports;
157 type DeclareOpaqueType = astTypes.namedTypes.DeclareOpaqueType;
158 type DeclareTypeAlias = astTypes.namedTypes.DeclareTypeAlias;
159 type DeclareVariable = astTypes.namedTypes.DeclareVariable;
160 type Decorator = astTypes.namedTypes.Decorator;
161 type Directive = astTypes.namedTypes.Directive;
162 type DirectiveLiteral = astTypes.namedTypes.DirectiveLiteral;
163 type DoExpression = astTypes.namedTypes.DoExpression;
164 type DoWhileStatement = astTypes.namedTypes.DoWhileStatement;
165 type EmptyStatement = astTypes.namedTypes.EmptyStatement;
166 type EmptyTypeAnnotation = astTypes.namedTypes.EmptyTypeAnnotation;
167 type EnumBooleanBody = astTypes.namedTypes.EnumBooleanBody;
168 type EnumBooleanMember = astTypes.namedTypes.EnumBooleanMember;
169 type EnumDeclaration = astTypes.namedTypes.EnumDeclaration;
170 type EnumDefaultedMember = astTypes.namedTypes.EnumDefaultedMember;
171 type EnumNumberBody = astTypes.namedTypes.EnumNumberBody;
172 type EnumNumberMember = astTypes.namedTypes.EnumNumberMember;
173 type EnumStringBody = astTypes.namedTypes.EnumStringBody;
174 type EnumStringMember = astTypes.namedTypes.EnumStringMember;
175 type EnumSymbolBody = astTypes.namedTypes.EnumSymbolBody;
176 type ExistentialTypeParam = astTypes.namedTypes.ExistentialTypeParam;
177 type ExistsTypeAnnotation = astTypes.namedTypes.ExistsTypeAnnotation;
178 type ExportAllDeclaration = astTypes.namedTypes.ExportAllDeclaration;
179 type ExportBatchSpecifier = astTypes.namedTypes.ExportBatchSpecifier;
180 type ExportDeclaration = astTypes.namedTypes.ExportDeclaration;
181 type ExportDefaultDeclaration = astTypes.namedTypes.ExportDefaultDeclaration;
182 type ExportDefaultSpecifier = astTypes.namedTypes.ExportDefaultSpecifier;
183 type ExportNamedDeclaration = astTypes.namedTypes.ExportNamedDeclaration;
184 type ExportNamespaceSpecifier = astTypes.namedTypes.ExportNamespaceSpecifier;
185 type ExportSpecifier = astTypes.namedTypes.ExportSpecifier;
186 type Expression = astTypes.namedTypes.Expression;
187 type ExpressionStatement = astTypes.namedTypes.ExpressionStatement;
188 type File = astTypes.namedTypes.File;
189 type Flow = astTypes.namedTypes.Flow;
190 type FlowPredicate = astTypes.namedTypes.FlowPredicate;
191 type FlowType = astTypes.namedTypes.FlowType;
192 type ForAwaitStatement = astTypes.namedTypes.ForAwaitStatement;
193 type ForInStatement = astTypes.namedTypes.ForInStatement;
194 type ForOfStatement = astTypes.namedTypes.ForOfStatement;
195 type ForStatement = astTypes.namedTypes.ForStatement;
196 type Function = astTypes.namedTypes.Function;
197 type FunctionDeclaration = astTypes.namedTypes.FunctionDeclaration;
198 type FunctionExpression = astTypes.namedTypes.FunctionExpression;
199 type FunctionTypeAnnotation = astTypes.namedTypes.FunctionTypeAnnotation;
200 type FunctionTypeParam = astTypes.namedTypes.FunctionTypeParam;
201 type GeneratorExpression = astTypes.namedTypes.GeneratorExpression;
202 type GenericTypeAnnotation = astTypes.namedTypes.GenericTypeAnnotation;
203 type Identifier = astTypes.namedTypes.Identifier;
204 type IfStatement = astTypes.namedTypes.IfStatement;
205 type Import = astTypes.namedTypes.Import;
206 type ImportDeclaration = astTypes.namedTypes.ImportDeclaration;
207 type ImportDefaultSpecifier = astTypes.namedTypes.ImportDefaultSpecifier;
208 type ImportExpression = astTypes.namedTypes.ImportExpression;
209 type ImportNamespaceSpecifier = astTypes.namedTypes.ImportNamespaceSpecifier;
210 type ImportSpecifier = astTypes.namedTypes.ImportSpecifier;
211 type InferredPredicate = astTypes.namedTypes.InferredPredicate;
212 type InterfaceDeclaration = astTypes.namedTypes.InterfaceDeclaration;
213 type InterfaceExtends = astTypes.namedTypes.InterfaceExtends;
214 type InterfaceTypeAnnotation = astTypes.namedTypes.InterfaceTypeAnnotation;
215 type InterpreterDirective = astTypes.namedTypes.InterpreterDirective;
216 type IntersectionTypeAnnotation = astTypes.namedTypes.IntersectionTypeAnnotation;
217 type JSXAttribute = astTypes.namedTypes.JSXAttribute;
218 type JSXClosingElement = astTypes.namedTypes.JSXClosingElement;
219 type JSXClosingFragment = astTypes.namedTypes.JSXClosingFragment;
220 type JSXElement = astTypes.namedTypes.JSXElement;
221 type JSXEmptyExpression = astTypes.namedTypes.JSXEmptyExpression;
222 type JSXExpressionContainer = astTypes.namedTypes.JSXExpressionContainer;
223 type JSXFragment = astTypes.namedTypes.JSXFragment;
224 type JSXIdentifier = astTypes.namedTypes.JSXIdentifier;
225 type JSXMemberExpression = astTypes.namedTypes.JSXMemberExpression;
226 type JSXNamespacedName = astTypes.namedTypes.JSXNamespacedName;
227 type JSXOpeningElement = astTypes.namedTypes.JSXOpeningElement;
228 type JSXOpeningFragment = astTypes.namedTypes.JSXOpeningFragment;
229 type JSXSpreadAttribute = astTypes.namedTypes.JSXSpreadAttribute;
230 type JSXSpreadChild = astTypes.namedTypes.JSXSpreadChild;
231 type JSXText = astTypes.namedTypes.JSXText;
232 type LabeledStatement = astTypes.namedTypes.LabeledStatement;
233 type Line = astTypes.namedTypes.Line;
234 type Literal = astTypes.namedTypes.Literal;
235 type LogicalExpression = astTypes.namedTypes.LogicalExpression;
236 type MemberExpression = astTypes.namedTypes.MemberExpression;
237 type MemberTypeAnnotation = astTypes.namedTypes.MemberTypeAnnotation;
238 type MetaProperty = astTypes.namedTypes.MetaProperty;
239 type MethodDefinition = astTypes.namedTypes.MethodDefinition;
240 type MixedTypeAnnotation = astTypes.namedTypes.MixedTypeAnnotation;
241 type ModuleSpecifier = astTypes.namedTypes.ModuleSpecifier;
242 type NewExpression = astTypes.namedTypes.NewExpression;
243 type Node = astTypes.namedTypes.Node;
244 type Noop = astTypes.namedTypes.Noop;
245 type NullableTypeAnnotation = astTypes.namedTypes.NullableTypeAnnotation;
246 type NullLiteral = astTypes.namedTypes.NullLiteral;
247 type NullLiteralTypeAnnotation = astTypes.namedTypes.NullLiteralTypeAnnotation;
248 type NullTypeAnnotation = astTypes.namedTypes.NullTypeAnnotation;
249 type NumberLiteralTypeAnnotation = astTypes.namedTypes.NumberLiteralTypeAnnotation;
250 type NumberTypeAnnotation = astTypes.namedTypes.NumberTypeAnnotation;
251 type NumericLiteral = astTypes.namedTypes.NumericLiteral;
252 type NumericLiteralTypeAnnotation = astTypes.namedTypes.NumericLiteralTypeAnnotation;
253 type ObjectExpression = astTypes.namedTypes.ObjectExpression;
254 type ObjectMethod = astTypes.namedTypes.ObjectMethod;
255 type ObjectPattern = astTypes.namedTypes.ObjectPattern;
256 type ObjectProperty = astTypes.namedTypes.ObjectProperty;
257 type ObjectTypeAnnotation = astTypes.namedTypes.ObjectTypeAnnotation;
258 type ObjectTypeCallProperty = astTypes.namedTypes.ObjectTypeCallProperty;
259 type ObjectTypeIndexer = astTypes.namedTypes.ObjectTypeIndexer;
260 type ObjectTypeInternalSlot = astTypes.namedTypes.ObjectTypeInternalSlot;
261 type ObjectTypeProperty = astTypes.namedTypes.ObjectTypeProperty;
262 type ObjectTypeSpreadProperty = astTypes.namedTypes.ObjectTypeSpreadProperty;
263 type OpaqueType = astTypes.namedTypes.OpaqueType;
264 type OptionalCallExpression = astTypes.namedTypes.OptionalCallExpression;
265 type OptionalMemberExpression = astTypes.namedTypes.OptionalMemberExpression;
266 type ParenthesizedExpression = astTypes.namedTypes.ParenthesizedExpression;
267 type Pattern = astTypes.namedTypes.Pattern;
268 type Position = astTypes.namedTypes.Position;
269 type Printable = astTypes.namedTypes.Printable;
270 type PrivateName = astTypes.namedTypes.PrivateName;
271 type Program = astTypes.namedTypes.Program;
272 type Property = astTypes.namedTypes.Property;
273 type PropertyPattern = astTypes.namedTypes.PropertyPattern;
274 type QualifiedTypeIdentifier = astTypes.namedTypes.QualifiedTypeIdentifier;
275 type RegExpLiteral = astTypes.namedTypes.RegExpLiteral;
276 type RestElement = astTypes.namedTypes.RestElement;
277 type RestProperty = astTypes.namedTypes.RestProperty;
278 type ReturnStatement = astTypes.namedTypes.ReturnStatement;
279 type SequenceExpression = astTypes.namedTypes.SequenceExpression;
280 type SourceLocation = astTypes.namedTypes.SourceLocation;
281 type Specifier = astTypes.namedTypes.Specifier;
282 type SpreadElement = astTypes.namedTypes.SpreadElement;
283 type SpreadElementPattern = astTypes.namedTypes.SpreadElementPattern;
284 type SpreadProperty = astTypes.namedTypes.SpreadProperty;
285 type SpreadPropertyPattern = astTypes.namedTypes.SpreadPropertyPattern;
286 type Statement = astTypes.namedTypes.Statement;
287 type StringLiteral = astTypes.namedTypes.StringLiteral;
288 type StringLiteralTypeAnnotation = astTypes.namedTypes.StringLiteralTypeAnnotation;
289 type StringTypeAnnotation = astTypes.namedTypes.StringTypeAnnotation;
290 type Super = astTypes.namedTypes.Super;
291 type SwitchCase = astTypes.namedTypes.SwitchCase;
292 type SwitchStatement = astTypes.namedTypes.SwitchStatement;
293 type SymbolTypeAnnotation = astTypes.namedTypes.SymbolTypeAnnotation;
294 type TaggedTemplateExpression = astTypes.namedTypes.TaggedTemplateExpression;
295 type TemplateElement = astTypes.namedTypes.TemplateElement;
296 type TemplateLiteral = astTypes.namedTypes.TemplateLiteral;
297 type ThisExpression = astTypes.namedTypes.ThisExpression;
298 type ThisTypeAnnotation = astTypes.namedTypes.ThisTypeAnnotation;
299 type ThrowStatement = astTypes.namedTypes.ThrowStatement;
300 type TryStatement = astTypes.namedTypes.TryStatement;
301 type TSAnyKeyword = astTypes.namedTypes.TSAnyKeyword;
302 type TSArrayType = astTypes.namedTypes.TSArrayType;
303 type TSAsExpression = astTypes.namedTypes.TSAsExpression;
304 type TSBigIntKeyword = astTypes.namedTypes.TSBigIntKeyword;
305 type TSBooleanKeyword = astTypes.namedTypes.TSBooleanKeyword;
306 type TSCallSignatureDeclaration = astTypes.namedTypes.TSCallSignatureDeclaration;
307 type TSConditionalType = astTypes.namedTypes.TSConditionalType;
308 type TSConstructorType = astTypes.namedTypes.TSConstructorType;
309 type TSConstructSignatureDeclaration = astTypes.namedTypes.TSConstructSignatureDeclaration;
310 type TSDeclareFunction = astTypes.namedTypes.TSDeclareFunction;
311 type TSDeclareMethod = astTypes.namedTypes.TSDeclareMethod;
312 type TSEnumDeclaration = astTypes.namedTypes.TSEnumDeclaration;
313 type TSEnumMember = astTypes.namedTypes.TSEnumMember;
314 type TSExportAssignment = astTypes.namedTypes.TSExportAssignment;
315 type TSExpressionWithTypeArguments = astTypes.namedTypes.TSExpressionWithTypeArguments;
316 type TSExternalModuleReference = astTypes.namedTypes.TSExternalModuleReference;
317 type TSFunctionType = astTypes.namedTypes.TSFunctionType;
318 type TSHasOptionalTypeAnnotation = astTypes.namedTypes.TSHasOptionalTypeAnnotation;
319 type TSHasOptionalTypeParameterInstantiation = astTypes.namedTypes.TSHasOptionalTypeParameterInstantiation;
320 type TSHasOptionalTypeParameters = astTypes.namedTypes.TSHasOptionalTypeParameters;
321 type TSImportEqualsDeclaration = astTypes.namedTypes.TSImportEqualsDeclaration;
322 type TSImportType = astTypes.namedTypes.TSImportType;
323 type TSIndexedAccessType = astTypes.namedTypes.TSIndexedAccessType;
324 type TSIndexSignature = astTypes.namedTypes.TSIndexSignature;
325 type TSInferType = astTypes.namedTypes.TSInferType;
326 type TSInterfaceBody = astTypes.namedTypes.TSInterfaceBody;
327 type TSInterfaceDeclaration = astTypes.namedTypes.TSInterfaceDeclaration;
328 type TSIntersectionType = astTypes.namedTypes.TSIntersectionType;
329 type TSLiteralType = astTypes.namedTypes.TSLiteralType;
330 type TSMappedType = astTypes.namedTypes.TSMappedType;
331 type TSMethodSignature = astTypes.namedTypes.TSMethodSignature;
332 type TSModuleBlock = astTypes.namedTypes.TSModuleBlock;
333 type TSModuleDeclaration = astTypes.namedTypes.TSModuleDeclaration;
334 type TSNamedTupleMember = astTypes.namedTypes.TSNamedTupleMember;
335 type TSNamespaceExportDeclaration = astTypes.namedTypes.TSNamespaceExportDeclaration;
336 type TSNeverKeyword = astTypes.namedTypes.TSNeverKeyword;
337 type TSNonNullExpression = astTypes.namedTypes.TSNonNullExpression;
338 type TSNullKeyword = astTypes.namedTypes.TSNullKeyword;
339 type TSNumberKeyword = astTypes.namedTypes.TSNumberKeyword;
340 type TSObjectKeyword = astTypes.namedTypes.TSObjectKeyword;
341 type TSOptionalType = astTypes.namedTypes.TSOptionalType;
342 type TSParameterProperty = astTypes.namedTypes.TSParameterProperty;
343 type TSParenthesizedType = astTypes.namedTypes.TSParenthesizedType;
344 type TSPropertySignature = astTypes.namedTypes.TSPropertySignature;
345 type TSQualifiedName = astTypes.namedTypes.TSQualifiedName;
346 type TSRestType = astTypes.namedTypes.TSRestType;
347 type TSStringKeyword = astTypes.namedTypes.TSStringKeyword;
348 type TSSymbolKeyword = astTypes.namedTypes.TSSymbolKeyword;
349 type TSThisType = astTypes.namedTypes.TSThisType;
350 type TSTupleType = astTypes.namedTypes.TSTupleType;
351 type TSType = astTypes.namedTypes.TSType;
352 type TSTypeAliasDeclaration = astTypes.namedTypes.TSTypeAliasDeclaration;
353 type TSTypeAnnotation = astTypes.namedTypes.TSTypeAnnotation;
354 type TSTypeAssertion = astTypes.namedTypes.TSTypeAssertion;
355 type TSTypeLiteral = astTypes.namedTypes.TSTypeLiteral;
356 type TSTypeOperator = astTypes.namedTypes.TSTypeOperator;
357 type TSTypeParameter = astTypes.namedTypes.TSTypeParameter;
358 type TSTypeParameterDeclaration = astTypes.namedTypes.TSTypeParameterDeclaration;
359 type TSTypeParameterInstantiation = astTypes.namedTypes.TSTypeParameterInstantiation;
360 type TSTypePredicate = astTypes.namedTypes.TSTypePredicate;
361 type TSTypeQuery = astTypes.namedTypes.TSTypeQuery;
362 type TSTypeReference = astTypes.namedTypes.TSTypeReference;
363 type TSUndefinedKeyword = astTypes.namedTypes.TSUndefinedKeyword;
364 type TSUnionType = astTypes.namedTypes.TSUnionType;
365 type TSUnknownKeyword = astTypes.namedTypes.TSUnknownKeyword;
366 type TSVoidKeyword = astTypes.namedTypes.TSVoidKeyword;
367 type TupleTypeAnnotation = astTypes.namedTypes.TupleTypeAnnotation;
368 type TypeAlias = astTypes.namedTypes.TypeAlias;
369 type TypeAnnotation = astTypes.namedTypes.TypeAnnotation;
370 type TypeCastExpression = astTypes.namedTypes.TypeCastExpression;
371 type TypeofTypeAnnotation = astTypes.namedTypes.TypeofTypeAnnotation;
372 type TypeParameter = astTypes.namedTypes.TypeParameter;
373 type TypeParameterDeclaration = astTypes.namedTypes.TypeParameterDeclaration;
374 type TypeParameterInstantiation = astTypes.namedTypes.TypeParameterInstantiation;
375 type UnaryExpression = astTypes.namedTypes.UnaryExpression;
376 type UnionTypeAnnotation = astTypes.namedTypes.UnionTypeAnnotation;
377 type UpdateExpression = astTypes.namedTypes.UpdateExpression;
378 type VariableDeclaration = astTypes.namedTypes.VariableDeclaration;
379 type VariableDeclarator = astTypes.namedTypes.VariableDeclarator;
380 type Variance = astTypes.namedTypes.Variance;
381 type VoidTypeAnnotation = astTypes.namedTypes.VoidTypeAnnotation;
382 type WhileStatement = astTypes.namedTypes.WhileStatement;
383 type WithStatement = astTypes.namedTypes.WithStatement;
384 type YieldExpression = astTypes.namedTypes.YieldExpression;
385}
386
387declare const core: core.JSCodeshift;
388export = core;