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 (file: FileInfo, api: API, options: Options): string | null | undefined | void;
103 }
104
105 type ASTNode = astTypes.namedTypes.ASTNode;
106
107 type AnyTypeAnnotation = astTypes.namedTypes.AnyTypeAnnotation;
108 type ArrayExpression = astTypes.namedTypes.ArrayExpression;
109 type ArrayPattern = astTypes.namedTypes.ArrayPattern;
110 type ArrayTypeAnnotation = astTypes.namedTypes.ArrayTypeAnnotation;
111 type ArrowFunctionExpression = astTypes.namedTypes.ArrowFunctionExpression;
112 type AssignmentExpression = astTypes.namedTypes.AssignmentExpression;
113 type AssignmentPattern = astTypes.namedTypes.AssignmentPattern;
114 type AwaitExpression = astTypes.namedTypes.AwaitExpression;
115 type BigIntLiteral = astTypes.namedTypes.BigIntLiteral;
116 type BigIntLiteralTypeAnnotation = astTypes.namedTypes.BigIntLiteralTypeAnnotation;
117 type BigIntTypeAnnotation = astTypes.namedTypes.BigIntTypeAnnotation;
118 type BinaryExpression = astTypes.namedTypes.BinaryExpression;
119 type BindExpression = astTypes.namedTypes.BindExpression;
120 type Block = astTypes.namedTypes.Block;
121 type BlockStatement = astTypes.namedTypes.BlockStatement;
122 type BooleanLiteral = astTypes.namedTypes.BooleanLiteral;
123 type BooleanLiteralTypeAnnotation = astTypes.namedTypes.BooleanLiteralTypeAnnotation;
124 type BooleanTypeAnnotation = astTypes.namedTypes.BooleanTypeAnnotation;
125 type BreakStatement = astTypes.namedTypes.BreakStatement;
126 type CallExpression = astTypes.namedTypes.CallExpression;
127 type CatchClause = astTypes.namedTypes.CatchClause;
128 type ChainElement = astTypes.namedTypes.ChainElement;
129 type ChainExpression = astTypes.namedTypes.ChainExpression;
130 type ClassBody = astTypes.namedTypes.ClassBody;
131 type ClassDeclaration = astTypes.namedTypes.ClassDeclaration;
132 type ClassExpression = astTypes.namedTypes.ClassExpression;
133 type ClassImplements = astTypes.namedTypes.ClassImplements;
134 type ClassMethod = astTypes.namedTypes.ClassMethod;
135 type ClassPrivateMethod = astTypes.namedTypes.ClassPrivateMethod;
136 type ClassPrivateProperty = astTypes.namedTypes.ClassPrivateProperty;
137 type ClassProperty = astTypes.namedTypes.ClassProperty;
138 type ClassPropertyDefinition = astTypes.namedTypes.ClassPropertyDefinition;
139 type Comment = astTypes.namedTypes.Comment;
140 type CommentBlock = astTypes.namedTypes.CommentBlock;
141 type CommentLine = astTypes.namedTypes.CommentLine;
142 type ComprehensionBlock = astTypes.namedTypes.ComprehensionBlock;
143 type ComprehensionExpression = astTypes.namedTypes.ComprehensionExpression;
144 type ConditionalExpression = astTypes.namedTypes.ConditionalExpression;
145 type ContinueStatement = astTypes.namedTypes.ContinueStatement;
146 type DebuggerStatement = astTypes.namedTypes.DebuggerStatement;
147 type Declaration = astTypes.namedTypes.Declaration;
148 type DeclareClass = astTypes.namedTypes.DeclareClass;
149 type DeclaredPredicate = astTypes.namedTypes.DeclaredPredicate;
150 type DeclareExportAllDeclaration = astTypes.namedTypes.DeclareExportAllDeclaration;
151 type DeclareExportDeclaration = astTypes.namedTypes.DeclareExportDeclaration;
152 type DeclareFunction = astTypes.namedTypes.DeclareFunction;
153 type DeclareInterface = astTypes.namedTypes.DeclareInterface;
154 type DeclareModule = astTypes.namedTypes.DeclareModule;
155 type DeclareModuleExports = astTypes.namedTypes.DeclareModuleExports;
156 type DeclareOpaqueType = astTypes.namedTypes.DeclareOpaqueType;
157 type DeclareTypeAlias = astTypes.namedTypes.DeclareTypeAlias;
158 type DeclareVariable = astTypes.namedTypes.DeclareVariable;
159 type Decorator = astTypes.namedTypes.Decorator;
160 type Directive = astTypes.namedTypes.Directive;
161 type DirectiveLiteral = astTypes.namedTypes.DirectiveLiteral;
162 type DoExpression = astTypes.namedTypes.DoExpression;
163 type DoWhileStatement = astTypes.namedTypes.DoWhileStatement;
164 type EmptyStatement = astTypes.namedTypes.EmptyStatement;
165 type EmptyTypeAnnotation = astTypes.namedTypes.EmptyTypeAnnotation;
166 type EnumBooleanBody = astTypes.namedTypes.EnumBooleanBody;
167 type EnumBooleanMember = astTypes.namedTypes.EnumBooleanMember;
168 type EnumDeclaration = astTypes.namedTypes.EnumDeclaration;
169 type EnumDefaultedMember = astTypes.namedTypes.EnumDefaultedMember;
170 type EnumNumberBody = astTypes.namedTypes.EnumNumberBody;
171 type EnumNumberMember = astTypes.namedTypes.EnumNumberMember;
172 type EnumStringBody = astTypes.namedTypes.EnumStringBody;
173 type EnumStringMember = astTypes.namedTypes.EnumStringMember;
174 type EnumSymbolBody = astTypes.namedTypes.EnumSymbolBody;
175 type ExistentialTypeParam = astTypes.namedTypes.ExistentialTypeParam;
176 type ExistsTypeAnnotation = astTypes.namedTypes.ExistsTypeAnnotation;
177 type ExportAllDeclaration = astTypes.namedTypes.ExportAllDeclaration;
178 type ExportBatchSpecifier = astTypes.namedTypes.ExportBatchSpecifier;
179 type ExportDeclaration = astTypes.namedTypes.ExportDeclaration;
180 type ExportDefaultDeclaration = astTypes.namedTypes.ExportDefaultDeclaration;
181 type ExportDefaultSpecifier = astTypes.namedTypes.ExportDefaultSpecifier;
182 type ExportNamedDeclaration = astTypes.namedTypes.ExportNamedDeclaration;
183 type ExportNamespaceSpecifier = astTypes.namedTypes.ExportNamespaceSpecifier;
184 type ExportSpecifier = astTypes.namedTypes.ExportSpecifier;
185 type Expression = astTypes.namedTypes.Expression;
186 type ExpressionStatement = astTypes.namedTypes.ExpressionStatement;
187 type File = astTypes.namedTypes.File;
188 type Flow = astTypes.namedTypes.Flow;
189 type FlowPredicate = astTypes.namedTypes.FlowPredicate;
190 type FlowType = astTypes.namedTypes.FlowType;
191 type ForAwaitStatement = astTypes.namedTypes.ForAwaitStatement;
192 type ForInStatement = astTypes.namedTypes.ForInStatement;
193 type ForOfStatement = astTypes.namedTypes.ForOfStatement;
194 type ForStatement = astTypes.namedTypes.ForStatement;
195 type Function = astTypes.namedTypes.Function;
196 type FunctionDeclaration = astTypes.namedTypes.FunctionDeclaration;
197 type FunctionExpression = astTypes.namedTypes.FunctionExpression;
198 type FunctionTypeAnnotation = astTypes.namedTypes.FunctionTypeAnnotation;
199 type FunctionTypeParam = astTypes.namedTypes.FunctionTypeParam;
200 type GeneratorExpression = astTypes.namedTypes.GeneratorExpression;
201 type GenericTypeAnnotation = astTypes.namedTypes.GenericTypeAnnotation;
202 type Identifier = astTypes.namedTypes.Identifier;
203 type IfStatement = astTypes.namedTypes.IfStatement;
204 type Import = astTypes.namedTypes.Import;
205 type ImportDeclaration = astTypes.namedTypes.ImportDeclaration;
206 type ImportDefaultSpecifier = astTypes.namedTypes.ImportDefaultSpecifier;
207 type ImportExpression = astTypes.namedTypes.ImportExpression;
208 type ImportNamespaceSpecifier = astTypes.namedTypes.ImportNamespaceSpecifier;
209 type ImportSpecifier = astTypes.namedTypes.ImportSpecifier;
210 type InferredPredicate = astTypes.namedTypes.InferredPredicate;
211 type InterfaceDeclaration = astTypes.namedTypes.InterfaceDeclaration;
212 type InterfaceExtends = astTypes.namedTypes.InterfaceExtends;
213 type InterfaceTypeAnnotation = astTypes.namedTypes.InterfaceTypeAnnotation;
214 type InterpreterDirective = astTypes.namedTypes.InterpreterDirective;
215 type IntersectionTypeAnnotation = astTypes.namedTypes.IntersectionTypeAnnotation;
216 type JSXAttribute = astTypes.namedTypes.JSXAttribute;
217 type JSXClosingElement = astTypes.namedTypes.JSXClosingElement;
218 type JSXClosingFragment = astTypes.namedTypes.JSXClosingFragment;
219 type JSXElement = astTypes.namedTypes.JSXElement;
220 type JSXEmptyExpression = astTypes.namedTypes.JSXEmptyExpression;
221 type JSXExpressionContainer = astTypes.namedTypes.JSXExpressionContainer;
222 type JSXFragment = astTypes.namedTypes.JSXFragment;
223 type JSXIdentifier = astTypes.namedTypes.JSXIdentifier;
224 type JSXMemberExpression = astTypes.namedTypes.JSXMemberExpression;
225 type JSXNamespacedName = astTypes.namedTypes.JSXNamespacedName;
226 type JSXOpeningElement = astTypes.namedTypes.JSXOpeningElement;
227 type JSXOpeningFragment = astTypes.namedTypes.JSXOpeningFragment;
228 type JSXSpreadAttribute = astTypes.namedTypes.JSXSpreadAttribute;
229 type JSXSpreadChild = astTypes.namedTypes.JSXSpreadChild;
230 type JSXText = astTypes.namedTypes.JSXText;
231 type LabeledStatement = astTypes.namedTypes.LabeledStatement;
232 type Line = astTypes.namedTypes.Line;
233 type Literal = astTypes.namedTypes.Literal;
234 type LogicalExpression = astTypes.namedTypes.LogicalExpression;
235 type MemberExpression = astTypes.namedTypes.MemberExpression;
236 type MemberTypeAnnotation = astTypes.namedTypes.MemberTypeAnnotation;
237 type MetaProperty = astTypes.namedTypes.MetaProperty;
238 type MethodDefinition = astTypes.namedTypes.MethodDefinition;
239 type MixedTypeAnnotation = astTypes.namedTypes.MixedTypeAnnotation;
240 type ModuleSpecifier = astTypes.namedTypes.ModuleSpecifier;
241 type NewExpression = astTypes.namedTypes.NewExpression;
242 type Node = astTypes.namedTypes.Node;
243 type Noop = astTypes.namedTypes.Noop;
244 type NullableTypeAnnotation = astTypes.namedTypes.NullableTypeAnnotation;
245 type NullLiteral = astTypes.namedTypes.NullLiteral;
246 type NullLiteralTypeAnnotation = astTypes.namedTypes.NullLiteralTypeAnnotation;
247 type NullTypeAnnotation = astTypes.namedTypes.NullTypeAnnotation;
248 type NumberLiteralTypeAnnotation = astTypes.namedTypes.NumberLiteralTypeAnnotation;
249 type NumberTypeAnnotation = astTypes.namedTypes.NumberTypeAnnotation;
250 type NumericLiteral = astTypes.namedTypes.NumericLiteral;
251 type NumericLiteralTypeAnnotation = astTypes.namedTypes.NumericLiteralTypeAnnotation;
252 type ObjectExpression = astTypes.namedTypes.ObjectExpression;
253 type ObjectMethod = astTypes.namedTypes.ObjectMethod;
254 type ObjectPattern = astTypes.namedTypes.ObjectPattern;
255 type ObjectProperty = astTypes.namedTypes.ObjectProperty;
256 type ObjectTypeAnnotation = astTypes.namedTypes.ObjectTypeAnnotation;
257 type ObjectTypeCallProperty = astTypes.namedTypes.ObjectTypeCallProperty;
258 type ObjectTypeIndexer = astTypes.namedTypes.ObjectTypeIndexer;
259 type ObjectTypeInternalSlot = astTypes.namedTypes.ObjectTypeInternalSlot;
260 type ObjectTypeProperty = astTypes.namedTypes.ObjectTypeProperty;
261 type ObjectTypeSpreadProperty = astTypes.namedTypes.ObjectTypeSpreadProperty;
262 type OpaqueType = astTypes.namedTypes.OpaqueType;
263 type OptionalCallExpression = astTypes.namedTypes.OptionalCallExpression;
264 type OptionalMemberExpression = astTypes.namedTypes.OptionalMemberExpression;
265 type ParenthesizedExpression = astTypes.namedTypes.ParenthesizedExpression;
266 type Pattern = astTypes.namedTypes.Pattern;
267 type Position = astTypes.namedTypes.Position;
268 type Printable = astTypes.namedTypes.Printable;
269 type PrivateName = astTypes.namedTypes.PrivateName;
270 type Program = astTypes.namedTypes.Program;
271 type Property = astTypes.namedTypes.Property;
272 type PropertyPattern = astTypes.namedTypes.PropertyPattern;
273 type QualifiedTypeIdentifier = astTypes.namedTypes.QualifiedTypeIdentifier;
274 type RegExpLiteral = astTypes.namedTypes.RegExpLiteral;
275 type RestElement = astTypes.namedTypes.RestElement;
276 type RestProperty = astTypes.namedTypes.RestProperty;
277 type ReturnStatement = astTypes.namedTypes.ReturnStatement;
278 type SequenceExpression = astTypes.namedTypes.SequenceExpression;
279 type SourceLocation = astTypes.namedTypes.SourceLocation;
280 type Specifier = astTypes.namedTypes.Specifier;
281 type SpreadElement = astTypes.namedTypes.SpreadElement;
282 type SpreadElementPattern = astTypes.namedTypes.SpreadElementPattern;
283 type SpreadProperty = astTypes.namedTypes.SpreadProperty;
284 type SpreadPropertyPattern = astTypes.namedTypes.SpreadPropertyPattern;
285 type Statement = astTypes.namedTypes.Statement;
286 type StringLiteral = astTypes.namedTypes.StringLiteral;
287 type StringLiteralTypeAnnotation = astTypes.namedTypes.StringLiteralTypeAnnotation;
288 type StringTypeAnnotation = astTypes.namedTypes.StringTypeAnnotation;
289 type Super = astTypes.namedTypes.Super;
290 type SwitchCase = astTypes.namedTypes.SwitchCase;
291 type SwitchStatement = astTypes.namedTypes.SwitchStatement;
292 type SymbolTypeAnnotation = astTypes.namedTypes.SymbolTypeAnnotation;
293 type TaggedTemplateExpression = astTypes.namedTypes.TaggedTemplateExpression;
294 type TemplateElement = astTypes.namedTypes.TemplateElement;
295 type TemplateLiteral = astTypes.namedTypes.TemplateLiteral;
296 type ThisExpression = astTypes.namedTypes.ThisExpression;
297 type ThisTypeAnnotation = astTypes.namedTypes.ThisTypeAnnotation;
298 type ThrowStatement = astTypes.namedTypes.ThrowStatement;
299 type TryStatement = astTypes.namedTypes.TryStatement;
300 type TSAnyKeyword = astTypes.namedTypes.TSAnyKeyword;
301 type TSArrayType = astTypes.namedTypes.TSArrayType;
302 type TSAsExpression = astTypes.namedTypes.TSAsExpression;
303 type TSBigIntKeyword = astTypes.namedTypes.TSBigIntKeyword;
304 type TSBooleanKeyword = astTypes.namedTypes.TSBooleanKeyword;
305 type TSCallSignatureDeclaration = astTypes.namedTypes.TSCallSignatureDeclaration;
306 type TSConditionalType = astTypes.namedTypes.TSConditionalType;
307 type TSConstructorType = astTypes.namedTypes.TSConstructorType;
308 type TSConstructSignatureDeclaration = astTypes.namedTypes.TSConstructSignatureDeclaration;
309 type TSDeclareFunction = astTypes.namedTypes.TSDeclareFunction;
310 type TSDeclareMethod = astTypes.namedTypes.TSDeclareMethod;
311 type TSEnumDeclaration = astTypes.namedTypes.TSEnumDeclaration;
312 type TSEnumMember = astTypes.namedTypes.TSEnumMember;
313 type TSExportAssignment = astTypes.namedTypes.TSExportAssignment;
314 type TSExpressionWithTypeArguments = astTypes.namedTypes.TSExpressionWithTypeArguments;
315 type TSExternalModuleReference = astTypes.namedTypes.TSExternalModuleReference;
316 type TSFunctionType = astTypes.namedTypes.TSFunctionType;
317 type TSHasOptionalTypeAnnotation = astTypes.namedTypes.TSHasOptionalTypeAnnotation;
318 type TSHasOptionalTypeParameterInstantiation = astTypes.namedTypes.TSHasOptionalTypeParameterInstantiation;
319 type TSHasOptionalTypeParameters = astTypes.namedTypes.TSHasOptionalTypeParameters;
320 type TSImportEqualsDeclaration = astTypes.namedTypes.TSImportEqualsDeclaration;
321 type TSImportType = astTypes.namedTypes.TSImportType;
322 type TSIndexedAccessType = astTypes.namedTypes.TSIndexedAccessType;
323 type TSIndexSignature = astTypes.namedTypes.TSIndexSignature;
324 type TSInferType = astTypes.namedTypes.TSInferType;
325 type TSInterfaceBody = astTypes.namedTypes.TSInterfaceBody;
326 type TSInterfaceDeclaration = astTypes.namedTypes.TSInterfaceDeclaration;
327 type TSIntersectionType = astTypes.namedTypes.TSIntersectionType;
328 type TSLiteralType = astTypes.namedTypes.TSLiteralType;
329 type TSMappedType = astTypes.namedTypes.TSMappedType;
330 type TSMethodSignature = astTypes.namedTypes.TSMethodSignature;
331 type TSModuleBlock = astTypes.namedTypes.TSModuleBlock;
332 type TSModuleDeclaration = astTypes.namedTypes.TSModuleDeclaration;
333 type TSNamedTupleMember = astTypes.namedTypes.TSNamedTupleMember;
334 type TSNamespaceExportDeclaration = astTypes.namedTypes.TSNamespaceExportDeclaration;
335 type TSNeverKeyword = astTypes.namedTypes.TSNeverKeyword;
336 type TSNonNullExpression = astTypes.namedTypes.TSNonNullExpression;
337 type TSNullKeyword = astTypes.namedTypes.TSNullKeyword;
338 type TSNumberKeyword = astTypes.namedTypes.TSNumberKeyword;
339 type TSObjectKeyword = astTypes.namedTypes.TSObjectKeyword;
340 type TSOptionalType = astTypes.namedTypes.TSOptionalType;
341 type TSParameterProperty = astTypes.namedTypes.TSParameterProperty;
342 type TSParenthesizedType = astTypes.namedTypes.TSParenthesizedType;
343 type TSPropertySignature = astTypes.namedTypes.TSPropertySignature;
344 type TSQualifiedName = astTypes.namedTypes.TSQualifiedName;
345 type TSRestType = astTypes.namedTypes.TSRestType;
346 type TSStringKeyword = astTypes.namedTypes.TSStringKeyword;
347 type TSSymbolKeyword = astTypes.namedTypes.TSSymbolKeyword;
348 type TSThisType = astTypes.namedTypes.TSThisType;
349 type TSTupleType = astTypes.namedTypes.TSTupleType;
350 type TSType = astTypes.namedTypes.TSType;
351 type TSTypeAliasDeclaration = astTypes.namedTypes.TSTypeAliasDeclaration;
352 type TSTypeAnnotation = astTypes.namedTypes.TSTypeAnnotation;
353 type TSTypeAssertion = astTypes.namedTypes.TSTypeAssertion;
354 type TSTypeLiteral = astTypes.namedTypes.TSTypeLiteral;
355 type TSTypeOperator = astTypes.namedTypes.TSTypeOperator;
356 type TSTypeParameter = astTypes.namedTypes.TSTypeParameter;
357 type TSTypeParameterDeclaration = astTypes.namedTypes.TSTypeParameterDeclaration;
358 type TSTypeParameterInstantiation = astTypes.namedTypes.TSTypeParameterInstantiation;
359 type TSTypePredicate = astTypes.namedTypes.TSTypePredicate;
360 type TSTypeQuery = astTypes.namedTypes.TSTypeQuery;
361 type TSTypeReference = astTypes.namedTypes.TSTypeReference;
362 type TSUndefinedKeyword = astTypes.namedTypes.TSUndefinedKeyword;
363 type TSUnionType = astTypes.namedTypes.TSUnionType;
364 type TSUnknownKeyword = astTypes.namedTypes.TSUnknownKeyword;
365 type TSVoidKeyword = astTypes.namedTypes.TSVoidKeyword;
366 type TupleTypeAnnotation = astTypes.namedTypes.TupleTypeAnnotation;
367 type TypeAlias = astTypes.namedTypes.TypeAlias;
368 type TypeAnnotation = astTypes.namedTypes.TypeAnnotation;
369 type TypeCastExpression = astTypes.namedTypes.TypeCastExpression;
370 type TypeofTypeAnnotation = astTypes.namedTypes.TypeofTypeAnnotation;
371 type TypeParameter = astTypes.namedTypes.TypeParameter;
372 type TypeParameterDeclaration = astTypes.namedTypes.TypeParameterDeclaration;
373 type TypeParameterInstantiation = astTypes.namedTypes.TypeParameterInstantiation;
374 type UnaryExpression = astTypes.namedTypes.UnaryExpression;
375 type UnionTypeAnnotation = astTypes.namedTypes.UnionTypeAnnotation;
376 type UpdateExpression = astTypes.namedTypes.UpdateExpression;
377 type VariableDeclaration = astTypes.namedTypes.VariableDeclaration;
378 type VariableDeclarator = astTypes.namedTypes.VariableDeclarator;
379 type Variance = astTypes.namedTypes.Variance;
380 type VoidTypeAnnotation = astTypes.namedTypes.VoidTypeAnnotation;
381 type WhileStatement = astTypes.namedTypes.WhileStatement;
382 type WithStatement = astTypes.namedTypes.WithStatement;
383 type YieldExpression = astTypes.namedTypes.YieldExpression;
384}
385
386declare const core: core.JSCodeshift;
387export = core;