diff options
author | Joel Kronqvist <joel.h.kronqvist@gmail.com> | 2022-03-05 19:02:27 +0200 |
---|---|---|
committer | Joel Kronqvist <joel.h.kronqvist@gmail.com> | 2022-03-05 19:02:27 +0200 |
commit | 5d309ff52cd399a6b71968a6b9a70c8ac0b98981 (patch) | |
tree | 360f7eb50f956e2367ef38fa1fc6ac7ac5258042 /node_modules/@babel/types | |
parent | b500a50f1b97d93c98b36ed9a980f8188d648147 (diff) | |
download | LYLLRuoka-5d309ff52cd399a6b71968a6b9a70c8ac0b98981.tar.gz LYLLRuoka-5d309ff52cd399a6b71968a6b9a70c8ac0b98981.zip |
Added node_modules for the updating to work properly.
Diffstat (limited to 'node_modules/@babel/types')
100 files changed, 24995 insertions, 0 deletions
diff --git a/node_modules/@babel/types/LICENSE b/node_modules/@babel/types/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/types/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/types/README.md b/node_modules/@babel/types/README.md new file mode 100644 index 0000000..0071bd7 --- /dev/null +++ b/node_modules/@babel/types/README.md @@ -0,0 +1,19 @@ +# @babel/types + +> Babel Types is a Lodash-esque utility library for AST nodes + +See our website [@babel/types](https://babeljs.io/docs/en/babel-types) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/types +``` + +or using yarn: + +```sh +yarn add @babel/types --dev +``` diff --git a/node_modules/@babel/types/lib/asserts/assertNode.js b/node_modules/@babel/types/lib/asserts/assertNode.js new file mode 100644 index 0000000..e584e3e --- /dev/null +++ b/node_modules/@babel/types/lib/asserts/assertNode.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = assertNode; + +var _isNode = require("../validators/isNode"); + +function assertNode(node) { + if (!(0, _isNode.default)(node)) { + var _node$type; + + const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node); + throw new TypeError(`Not a valid node of type "${type}"`); + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/asserts/generated/index.js b/node_modules/@babel/types/lib/asserts/generated/index.js new file mode 100644 index 0000000..53a5516 --- /dev/null +++ b/node_modules/@babel/types/lib/asserts/generated/index.js @@ -0,0 +1,1517 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.assertAccessor = assertAccessor; +exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation; +exports.assertArgumentPlaceholder = assertArgumentPlaceholder; +exports.assertArrayExpression = assertArrayExpression; +exports.assertArrayPattern = assertArrayPattern; +exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation; +exports.assertArrowFunctionExpression = assertArrowFunctionExpression; +exports.assertAssignmentExpression = assertAssignmentExpression; +exports.assertAssignmentPattern = assertAssignmentPattern; +exports.assertAwaitExpression = assertAwaitExpression; +exports.assertBigIntLiteral = assertBigIntLiteral; +exports.assertBinary = assertBinary; +exports.assertBinaryExpression = assertBinaryExpression; +exports.assertBindExpression = assertBindExpression; +exports.assertBlock = assertBlock; +exports.assertBlockParent = assertBlockParent; +exports.assertBlockStatement = assertBlockStatement; +exports.assertBooleanLiteral = assertBooleanLiteral; +exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; +exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; +exports.assertBreakStatement = assertBreakStatement; +exports.assertCallExpression = assertCallExpression; +exports.assertCatchClause = assertCatchClause; +exports.assertClass = assertClass; +exports.assertClassAccessorProperty = assertClassAccessorProperty; +exports.assertClassBody = assertClassBody; +exports.assertClassDeclaration = assertClassDeclaration; +exports.assertClassExpression = assertClassExpression; +exports.assertClassImplements = assertClassImplements; +exports.assertClassMethod = assertClassMethod; +exports.assertClassPrivateMethod = assertClassPrivateMethod; +exports.assertClassPrivateProperty = assertClassPrivateProperty; +exports.assertClassProperty = assertClassProperty; +exports.assertCompletionStatement = assertCompletionStatement; +exports.assertConditional = assertConditional; +exports.assertConditionalExpression = assertConditionalExpression; +exports.assertContinueStatement = assertContinueStatement; +exports.assertDebuggerStatement = assertDebuggerStatement; +exports.assertDecimalLiteral = assertDecimalLiteral; +exports.assertDeclaration = assertDeclaration; +exports.assertDeclareClass = assertDeclareClass; +exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; +exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration; +exports.assertDeclareFunction = assertDeclareFunction; +exports.assertDeclareInterface = assertDeclareInterface; +exports.assertDeclareModule = assertDeclareModule; +exports.assertDeclareModuleExports = assertDeclareModuleExports; +exports.assertDeclareOpaqueType = assertDeclareOpaqueType; +exports.assertDeclareTypeAlias = assertDeclareTypeAlias; +exports.assertDeclareVariable = assertDeclareVariable; +exports.assertDeclaredPredicate = assertDeclaredPredicate; +exports.assertDecorator = assertDecorator; +exports.assertDirective = assertDirective; +exports.assertDirectiveLiteral = assertDirectiveLiteral; +exports.assertDoExpression = assertDoExpression; +exports.assertDoWhileStatement = assertDoWhileStatement; +exports.assertEmptyStatement = assertEmptyStatement; +exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; +exports.assertEnumBody = assertEnumBody; +exports.assertEnumBooleanBody = assertEnumBooleanBody; +exports.assertEnumBooleanMember = assertEnumBooleanMember; +exports.assertEnumDeclaration = assertEnumDeclaration; +exports.assertEnumDefaultedMember = assertEnumDefaultedMember; +exports.assertEnumMember = assertEnumMember; +exports.assertEnumNumberBody = assertEnumNumberBody; +exports.assertEnumNumberMember = assertEnumNumberMember; +exports.assertEnumStringBody = assertEnumStringBody; +exports.assertEnumStringMember = assertEnumStringMember; +exports.assertEnumSymbolBody = assertEnumSymbolBody; +exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation; +exports.assertExportAllDeclaration = assertExportAllDeclaration; +exports.assertExportDeclaration = assertExportDeclaration; +exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration; +exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier; +exports.assertExportNamedDeclaration = assertExportNamedDeclaration; +exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; +exports.assertExportSpecifier = assertExportSpecifier; +exports.assertExpression = assertExpression; +exports.assertExpressionStatement = assertExpressionStatement; +exports.assertExpressionWrapper = assertExpressionWrapper; +exports.assertFile = assertFile; +exports.assertFlow = assertFlow; +exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation; +exports.assertFlowDeclaration = assertFlowDeclaration; +exports.assertFlowPredicate = assertFlowPredicate; +exports.assertFlowType = assertFlowType; +exports.assertFor = assertFor; +exports.assertForInStatement = assertForInStatement; +exports.assertForOfStatement = assertForOfStatement; +exports.assertForStatement = assertForStatement; +exports.assertForXStatement = assertForXStatement; +exports.assertFunction = assertFunction; +exports.assertFunctionDeclaration = assertFunctionDeclaration; +exports.assertFunctionExpression = assertFunctionExpression; +exports.assertFunctionParent = assertFunctionParent; +exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; +exports.assertFunctionTypeParam = assertFunctionTypeParam; +exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation; +exports.assertIdentifier = assertIdentifier; +exports.assertIfStatement = assertIfStatement; +exports.assertImmutable = assertImmutable; +exports.assertImport = assertImport; +exports.assertImportAttribute = assertImportAttribute; +exports.assertImportDeclaration = assertImportDeclaration; +exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier; +exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; +exports.assertImportSpecifier = assertImportSpecifier; +exports.assertIndexedAccessType = assertIndexedAccessType; +exports.assertInferredPredicate = assertInferredPredicate; +exports.assertInterfaceDeclaration = assertInterfaceDeclaration; +exports.assertInterfaceExtends = assertInterfaceExtends; +exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; +exports.assertInterpreterDirective = assertInterpreterDirective; +exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; +exports.assertJSX = assertJSX; +exports.assertJSXAttribute = assertJSXAttribute; +exports.assertJSXClosingElement = assertJSXClosingElement; +exports.assertJSXClosingFragment = assertJSXClosingFragment; +exports.assertJSXElement = assertJSXElement; +exports.assertJSXEmptyExpression = assertJSXEmptyExpression; +exports.assertJSXExpressionContainer = assertJSXExpressionContainer; +exports.assertJSXFragment = assertJSXFragment; +exports.assertJSXIdentifier = assertJSXIdentifier; +exports.assertJSXMemberExpression = assertJSXMemberExpression; +exports.assertJSXNamespacedName = assertJSXNamespacedName; +exports.assertJSXOpeningElement = assertJSXOpeningElement; +exports.assertJSXOpeningFragment = assertJSXOpeningFragment; +exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute; +exports.assertJSXSpreadChild = assertJSXSpreadChild; +exports.assertJSXText = assertJSXText; +exports.assertLVal = assertLVal; +exports.assertLabeledStatement = assertLabeledStatement; +exports.assertLiteral = assertLiteral; +exports.assertLogicalExpression = assertLogicalExpression; +exports.assertLoop = assertLoop; +exports.assertMemberExpression = assertMemberExpression; +exports.assertMetaProperty = assertMetaProperty; +exports.assertMethod = assertMethod; +exports.assertMiscellaneous = assertMiscellaneous; +exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation; +exports.assertModuleDeclaration = assertModuleDeclaration; +exports.assertModuleExpression = assertModuleExpression; +exports.assertModuleSpecifier = assertModuleSpecifier; +exports.assertNewExpression = assertNewExpression; +exports.assertNoop = assertNoop; +exports.assertNullLiteral = assertNullLiteral; +exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; +exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation; +exports.assertNumberLiteral = assertNumberLiteral; +exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; +exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation; +exports.assertNumericLiteral = assertNumericLiteral; +exports.assertObjectExpression = assertObjectExpression; +exports.assertObjectMember = assertObjectMember; +exports.assertObjectMethod = assertObjectMethod; +exports.assertObjectPattern = assertObjectPattern; +exports.assertObjectProperty = assertObjectProperty; +exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation; +exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty; +exports.assertObjectTypeIndexer = assertObjectTypeIndexer; +exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; +exports.assertObjectTypeProperty = assertObjectTypeProperty; +exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; +exports.assertOpaqueType = assertOpaqueType; +exports.assertOptionalCallExpression = assertOptionalCallExpression; +exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType; +exports.assertOptionalMemberExpression = assertOptionalMemberExpression; +exports.assertParenthesizedExpression = assertParenthesizedExpression; +exports.assertPattern = assertPattern; +exports.assertPatternLike = assertPatternLike; +exports.assertPipelineBareFunction = assertPipelineBareFunction; +exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; +exports.assertPipelineTopicExpression = assertPipelineTopicExpression; +exports.assertPlaceholder = assertPlaceholder; +exports.assertPrivate = assertPrivate; +exports.assertPrivateName = assertPrivateName; +exports.assertProgram = assertProgram; +exports.assertProperty = assertProperty; +exports.assertPureish = assertPureish; +exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; +exports.assertRecordExpression = assertRecordExpression; +exports.assertRegExpLiteral = assertRegExpLiteral; +exports.assertRegexLiteral = assertRegexLiteral; +exports.assertRestElement = assertRestElement; +exports.assertRestProperty = assertRestProperty; +exports.assertReturnStatement = assertReturnStatement; +exports.assertScopable = assertScopable; +exports.assertSequenceExpression = assertSequenceExpression; +exports.assertSpreadElement = assertSpreadElement; +exports.assertSpreadProperty = assertSpreadProperty; +exports.assertStandardized = assertStandardized; +exports.assertStatement = assertStatement; +exports.assertStaticBlock = assertStaticBlock; +exports.assertStringLiteral = assertStringLiteral; +exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; +exports.assertStringTypeAnnotation = assertStringTypeAnnotation; +exports.assertSuper = assertSuper; +exports.assertSwitchCase = assertSwitchCase; +exports.assertSwitchStatement = assertSwitchStatement; +exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation; +exports.assertTSAnyKeyword = assertTSAnyKeyword; +exports.assertTSArrayType = assertTSArrayType; +exports.assertTSAsExpression = assertTSAsExpression; +exports.assertTSBaseType = assertTSBaseType; +exports.assertTSBigIntKeyword = assertTSBigIntKeyword; +exports.assertTSBooleanKeyword = assertTSBooleanKeyword; +exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; +exports.assertTSConditionalType = assertTSConditionalType; +exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; +exports.assertTSConstructorType = assertTSConstructorType; +exports.assertTSDeclareFunction = assertTSDeclareFunction; +exports.assertTSDeclareMethod = assertTSDeclareMethod; +exports.assertTSEntityName = assertTSEntityName; +exports.assertTSEnumDeclaration = assertTSEnumDeclaration; +exports.assertTSEnumMember = assertTSEnumMember; +exports.assertTSExportAssignment = assertTSExportAssignment; +exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; +exports.assertTSExternalModuleReference = assertTSExternalModuleReference; +exports.assertTSFunctionType = assertTSFunctionType; +exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; +exports.assertTSImportType = assertTSImportType; +exports.assertTSIndexSignature = assertTSIndexSignature; +exports.assertTSIndexedAccessType = assertTSIndexedAccessType; +exports.assertTSInferType = assertTSInferType; +exports.assertTSInterfaceBody = assertTSInterfaceBody; +exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; +exports.assertTSIntersectionType = assertTSIntersectionType; +exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword; +exports.assertTSLiteralType = assertTSLiteralType; +exports.assertTSMappedType = assertTSMappedType; +exports.assertTSMethodSignature = assertTSMethodSignature; +exports.assertTSModuleBlock = assertTSModuleBlock; +exports.assertTSModuleDeclaration = assertTSModuleDeclaration; +exports.assertTSNamedTupleMember = assertTSNamedTupleMember; +exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; +exports.assertTSNeverKeyword = assertTSNeverKeyword; +exports.assertTSNonNullExpression = assertTSNonNullExpression; +exports.assertTSNullKeyword = assertTSNullKeyword; +exports.assertTSNumberKeyword = assertTSNumberKeyword; +exports.assertTSObjectKeyword = assertTSObjectKeyword; +exports.assertTSOptionalType = assertTSOptionalType; +exports.assertTSParameterProperty = assertTSParameterProperty; +exports.assertTSParenthesizedType = assertTSParenthesizedType; +exports.assertTSPropertySignature = assertTSPropertySignature; +exports.assertTSQualifiedName = assertTSQualifiedName; +exports.assertTSRestType = assertTSRestType; +exports.assertTSStringKeyword = assertTSStringKeyword; +exports.assertTSSymbolKeyword = assertTSSymbolKeyword; +exports.assertTSThisType = assertTSThisType; +exports.assertTSTupleType = assertTSTupleType; +exports.assertTSType = assertTSType; +exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; +exports.assertTSTypeAnnotation = assertTSTypeAnnotation; +exports.assertTSTypeAssertion = assertTSTypeAssertion; +exports.assertTSTypeElement = assertTSTypeElement; +exports.assertTSTypeLiteral = assertTSTypeLiteral; +exports.assertTSTypeOperator = assertTSTypeOperator; +exports.assertTSTypeParameter = assertTSTypeParameter; +exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; +exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; +exports.assertTSTypePredicate = assertTSTypePredicate; +exports.assertTSTypeQuery = assertTSTypeQuery; +exports.assertTSTypeReference = assertTSTypeReference; +exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword; +exports.assertTSUnionType = assertTSUnionType; +exports.assertTSUnknownKeyword = assertTSUnknownKeyword; +exports.assertTSVoidKeyword = assertTSVoidKeyword; +exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression; +exports.assertTemplateElement = assertTemplateElement; +exports.assertTemplateLiteral = assertTemplateLiteral; +exports.assertTerminatorless = assertTerminatorless; +exports.assertThisExpression = assertThisExpression; +exports.assertThisTypeAnnotation = assertThisTypeAnnotation; +exports.assertThrowStatement = assertThrowStatement; +exports.assertTopicReference = assertTopicReference; +exports.assertTryStatement = assertTryStatement; +exports.assertTupleExpression = assertTupleExpression; +exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation; +exports.assertTypeAlias = assertTypeAlias; +exports.assertTypeAnnotation = assertTypeAnnotation; +exports.assertTypeCastExpression = assertTypeCastExpression; +exports.assertTypeParameter = assertTypeParameter; +exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration; +exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation; +exports.assertTypeScript = assertTypeScript; +exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; +exports.assertUnaryExpression = assertUnaryExpression; +exports.assertUnaryLike = assertUnaryLike; +exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation; +exports.assertUpdateExpression = assertUpdateExpression; +exports.assertUserWhitespacable = assertUserWhitespacable; +exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier; +exports.assertVariableDeclaration = assertVariableDeclaration; +exports.assertVariableDeclarator = assertVariableDeclarator; +exports.assertVariance = assertVariance; +exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation; +exports.assertWhile = assertWhile; +exports.assertWhileStatement = assertWhileStatement; +exports.assertWithStatement = assertWithStatement; +exports.assertYieldExpression = assertYieldExpression; + +var _is = require("../../validators/is"); + +function assert(type, node, opts) { + if (!(0, _is.default)(type, node, opts)) { + throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, ` + `but instead got "${node.type}".`); + } +} + +function assertArrayExpression(node, opts) { + assert("ArrayExpression", node, opts); +} + +function assertAssignmentExpression(node, opts) { + assert("AssignmentExpression", node, opts); +} + +function assertBinaryExpression(node, opts) { + assert("BinaryExpression", node, opts); +} + +function assertInterpreterDirective(node, opts) { + assert("InterpreterDirective", node, opts); +} + +function assertDirective(node, opts) { + assert("Directive", node, opts); +} + +function assertDirectiveLiteral(node, opts) { + assert("DirectiveLiteral", node, opts); +} + +function assertBlockStatement(node, opts) { + assert("BlockStatement", node, opts); +} + +function assertBreakStatement(node, opts) { + assert("BreakStatement", node, opts); +} + +function assertCallExpression(node, opts) { + assert("CallExpression", node, opts); +} + +function assertCatchClause(node, opts) { + assert("CatchClause", node, opts); +} + +function assertConditionalExpression(node, opts) { + assert("ConditionalExpression", node, opts); +} + +function assertContinueStatement(node, opts) { + assert("ContinueStatement", node, opts); +} + +function assertDebuggerStatement(node, opts) { + assert("DebuggerStatement", node, opts); +} + +function assertDoWhileStatement(node, opts) { + assert("DoWhileStatement", node, opts); +} + +function assertEmptyStatement(node, opts) { + assert("EmptyStatement", node, opts); +} + +function assertExpressionStatement(node, opts) { + assert("ExpressionStatement", node, opts); +} + +function assertFile(node, opts) { + assert("File", node, opts); +} + +function assertForInStatement(node, opts) { + assert("ForInStatement", node, opts); +} + +function assertForStatement(node, opts) { + assert("ForStatement", node, opts); +} + +function assertFunctionDeclaration(node, opts) { + assert("FunctionDeclaration", node, opts); +} + +function assertFunctionExpression(node, opts) { + assert("FunctionExpression", node, opts); +} + +function assertIdentifier(node, opts) { + assert("Identifier", node, opts); +} + +function assertIfStatement(node, opts) { + assert("IfStatement", node, opts); +} + +function assertLabeledStatement(node, opts) { + assert("LabeledStatement", node, opts); +} + +function assertStringLiteral(node, opts) { + assert("StringLiteral", node, opts); +} + +function assertNumericLiteral(node, opts) { + assert("NumericLiteral", node, opts); +} + +function assertNullLiteral(node, opts) { + assert("NullLiteral", node, opts); +} + +function assertBooleanLiteral(node, opts) { + assert("BooleanLiteral", node, opts); +} + +function assertRegExpLiteral(node, opts) { + assert("RegExpLiteral", node, opts); +} + +function assertLogicalExpression(node, opts) { + assert("LogicalExpression", node, opts); +} + +function assertMemberExpression(node, opts) { + assert("MemberExpression", node, opts); +} + +function assertNewExpression(node, opts) { + assert("NewExpression", node, opts); +} + +function assertProgram(node, opts) { + assert("Program", node, opts); +} + +function assertObjectExpression(node, opts) { + assert("ObjectExpression", node, opts); +} + +function assertObjectMethod(node, opts) { + assert("ObjectMethod", node, opts); +} + +function assertObjectProperty(node, opts) { + assert("ObjectProperty", node, opts); +} + +function assertRestElement(node, opts) { + assert("RestElement", node, opts); +} + +function assertReturnStatement(node, opts) { + assert("ReturnStatement", node, opts); +} + +function assertSequenceExpression(node, opts) { + assert("SequenceExpression", node, opts); +} + +function assertParenthesizedExpression(node, opts) { + assert("ParenthesizedExpression", node, opts); +} + +function assertSwitchCase(node, opts) { + assert("SwitchCase", node, opts); +} + +function assertSwitchStatement(node, opts) { + assert("SwitchStatement", node, opts); +} + +function assertThisExpression(node, opts) { + assert("ThisExpression", node, opts); +} + +function assertThrowStatement(node, opts) { + assert("ThrowStatement", node, opts); +} + +function assertTryStatement(node, opts) { + assert("TryStatement", node, opts); +} + +function assertUnaryExpression(node, opts) { + assert("UnaryExpression", node, opts); +} + +function assertUpdateExpression(node, opts) { + assert("UpdateExpression", node, opts); +} + +function assertVariableDeclaration(node, opts) { + assert("VariableDeclaration", node, opts); +} + +function assertVariableDeclarator(node, opts) { + assert("VariableDeclarator", node, opts); +} + +function assertWhileStatement(node, opts) { + assert("WhileStatement", node, opts); +} + +function assertWithStatement(node, opts) { + assert("WithStatement", node, opts); +} + +function assertAssignmentPattern(node, opts) { + assert("AssignmentPattern", node, opts); +} + +function assertArrayPattern(node, opts) { + assert("ArrayPattern", node, opts); +} + +function assertArrowFunctionExpression(node, opts) { + assert("ArrowFunctionExpression", node, opts); +} + +function assertClassBody(node, opts) { + assert("ClassBody", node, opts); +} + +function assertClassExpression(node, opts) { + assert("ClassExpression", node, opts); +} + +function assertClassDeclaration(node, opts) { + assert("ClassDeclaration", node, opts); +} + +function assertExportAllDeclaration(node, opts) { + assert("ExportAllDeclaration", node, opts); +} + +function assertExportDefaultDeclaration(node, opts) { + assert("ExportDefaultDeclaration", node, opts); +} + +function assertExportNamedDeclaration(node, opts) { + assert("ExportNamedDeclaration", node, opts); +} + +function assertExportSpecifier(node, opts) { + assert("ExportSpecifier", node, opts); +} + +function assertForOfStatement(node, opts) { + assert("ForOfStatement", node, opts); +} + +function assertImportDeclaration(node, opts) { + assert("ImportDeclaration", node, opts); +} + +function assertImportDefaultSpecifier(node, opts) { + assert("ImportDefaultSpecifier", node, opts); +} + +function assertImportNamespaceSpecifier(node, opts) { + assert("ImportNamespaceSpecifier", node, opts); +} + +function assertImportSpecifier(node, opts) { + assert("ImportSpecifier", node, opts); +} + +function assertMetaProperty(node, opts) { + assert("MetaProperty", node, opts); +} + +function assertClassMethod(node, opts) { + assert("ClassMethod", node, opts); +} + +function assertObjectPattern(node, opts) { + assert("ObjectPattern", node, opts); +} + +function assertSpreadElement(node, opts) { + assert("SpreadElement", node, opts); +} + +function assertSuper(node, opts) { + assert("Super", node, opts); +} + +function assertTaggedTemplateExpression(node, opts) { + assert("TaggedTemplateExpression", node, opts); +} + +function assertTemplateElement(node, opts) { + assert("TemplateElement", node, opts); +} + +function assertTemplateLiteral(node, opts) { + assert("TemplateLiteral", node, opts); +} + +function assertYieldExpression(node, opts) { + assert("YieldExpression", node, opts); +} + +function assertAwaitExpression(node, opts) { + assert("AwaitExpression", node, opts); +} + +function assertImport(node, opts) { + assert("Import", node, opts); +} + +function assertBigIntLiteral(node, opts) { + assert("BigIntLiteral", node, opts); +} + +function assertExportNamespaceSpecifier(node, opts) { + assert("ExportNamespaceSpecifier", node, opts); +} + +function assertOptionalMemberExpression(node, opts) { + assert("OptionalMemberExpression", node, opts); +} + +function assertOptionalCallExpression(node, opts) { + assert("OptionalCallExpression", node, opts); +} + +function assertClassProperty(node, opts) { + assert("ClassProperty", node, opts); +} + +function assertClassAccessorProperty(node, opts) { + assert("ClassAccessorProperty", node, opts); +} + +function assertClassPrivateProperty(node, opts) { + assert("ClassPrivateProperty", node, opts); +} + +function assertClassPrivateMethod(node, opts) { + assert("ClassPrivateMethod", node, opts); +} + +function assertPrivateName(node, opts) { + assert("PrivateName", node, opts); +} + +function assertStaticBlock(node, opts) { + assert("StaticBlock", node, opts); +} + +function assertAnyTypeAnnotation(node, opts) { + assert("AnyTypeAnnotation", node, opts); +} + +function assertArrayTypeAnnotation(node, opts) { + assert("ArrayTypeAnnotation", node, opts); +} + +function assertBooleanTypeAnnotation(node, opts) { + assert("BooleanTypeAnnotation", node, opts); +} + +function assertBooleanLiteralTypeAnnotation(node, opts) { + assert("BooleanLiteralTypeAnnotation", node, opts); +} + +function assertNullLiteralTypeAnnotation(node, opts) { + assert("NullLiteralTypeAnnotation", node, opts); +} + +function assertClassImplements(node, opts) { + assert("ClassImplements", node, opts); +} + +function assertDeclareClass(node, opts) { + assert("DeclareClass", node, opts); +} + +function assertDeclareFunction(node, opts) { + assert("DeclareFunction", node, opts); +} + +function assertDeclareInterface(node, opts) { + assert("DeclareInterface", node, opts); +} + +function assertDeclareModule(node, opts) { + assert("DeclareModule", node, opts); +} + +function assertDeclareModuleExports(node, opts) { + assert("DeclareModuleExports", node, opts); +} + +function assertDeclareTypeAlias(node, opts) { + assert("DeclareTypeAlias", node, opts); +} + +function assertDeclareOpaqueType(node, opts) { + assert("DeclareOpaqueType", node, opts); +} + +function assertDeclareVariable(node, opts) { + assert("DeclareVariable", node, opts); +} + +function assertDeclareExportDeclaration(node, opts) { + assert("DeclareExportDeclaration", node, opts); +} + +function assertDeclareExportAllDeclaration(node, opts) { + assert("DeclareExportAllDeclaration", node, opts); +} + +function assertDeclaredPredicate(node, opts) { + assert("DeclaredPredicate", node, opts); +} + +function assertExistsTypeAnnotation(node, opts) { + assert("ExistsTypeAnnotation", node, opts); +} + +function assertFunctionTypeAnnotation(node, opts) { + assert("FunctionTypeAnnotation", node, opts); +} + +function assertFunctionTypeParam(node, opts) { + assert("FunctionTypeParam", node, opts); +} + +function assertGenericTypeAnnotation(node, opts) { + assert("GenericTypeAnnotation", node, opts); +} + +function assertInferredPredicate(node, opts) { + assert("InferredPredicate", node, opts); +} + +function assertInterfaceExtends(node, opts) { + assert("InterfaceExtends", node, opts); +} + +function assertInterfaceDeclaration(node, opts) { + assert("InterfaceDeclaration", node, opts); +} + +function assertInterfaceTypeAnnotation(node, opts) { + assert("InterfaceTypeAnnotation", node, opts); +} + +function assertIntersectionTypeAnnotation(node, opts) { + assert("IntersectionTypeAnnotation", node, opts); +} + +function assertMixedTypeAnnotation(node, opts) { + assert("MixedTypeAnnotation", node, opts); +} + +function assertEmptyTypeAnnotation(node, opts) { + assert("EmptyTypeAnnotation", node, opts); +} + +function assertNullableTypeAnnotation(node, opts) { + assert("NullableTypeAnnotation", node, opts); +} + +function assertNumberLiteralTypeAnnotation(node, opts) { + assert("NumberLiteralTypeAnnotation", node, opts); +} + +function assertNumberTypeAnnotation(node, opts) { + assert("NumberTypeAnnotation", node, opts); +} + +function assertObjectTypeAnnotation(node, opts) { + assert("ObjectTypeAnnotation", node, opts); +} + +function assertObjectTypeInternalSlot(node, opts) { + assert("ObjectTypeInternalSlot", node, opts); +} + +function assertObjectTypeCallProperty(node, opts) { + assert("ObjectTypeCallProperty", node, opts); +} + +function assertObjectTypeIndexer(node, opts) { + assert("ObjectTypeIndexer", node, opts); +} + +function assertObjectTypeProperty(node, opts) { + assert("ObjectTypeProperty", node, opts); +} + +function assertObjectTypeSpreadProperty(node, opts) { + assert("ObjectTypeSpreadProperty", node, opts); +} + +function assertOpaqueType(node, opts) { + assert("OpaqueType", node, opts); +} + +function assertQualifiedTypeIdentifier(node, opts) { + assert("QualifiedTypeIdentifier", node, opts); +} + +function assertStringLiteralTypeAnnotation(node, opts) { + assert("StringLiteralTypeAnnotation", node, opts); +} + +function assertStringTypeAnnotation(node, opts) { + assert("StringTypeAnnotation", node, opts); +} + +function assertSymbolTypeAnnotation(node, opts) { + assert("SymbolTypeAnnotation", node, opts); +} + +function assertThisTypeAnnotation(node, opts) { + assert("ThisTypeAnnotation", node, opts); +} + +function assertTupleTypeAnnotation(node, opts) { + assert("TupleTypeAnnotation", node, opts); +} + +function assertTypeofTypeAnnotation(node, opts) { + assert("TypeofTypeAnnotation", node, opts); +} + +function assertTypeAlias(node, opts) { + assert("TypeAlias", node, opts); +} + +function assertTypeAnnotation(node, opts) { + assert("TypeAnnotation", node, opts); +} + +function assertTypeCastExpression(node, opts) { + assert("TypeCastExpression", node, opts); +} + +function assertTypeParameter(node, opts) { + assert("TypeParameter", node, opts); +} + +function assertTypeParameterDeclaration(node, opts) { + assert("TypeParameterDeclaration", node, opts); +} + +function assertTypeParameterInstantiation(node, opts) { + assert("TypeParameterInstantiation", node, opts); +} + +function assertUnionTypeAnnotation(node, opts) { + assert("UnionTypeAnnotation", node, opts); +} + +function assertVariance(node, opts) { + assert("Variance", node, opts); +} + +function assertVoidTypeAnnotation(node, opts) { + assert("VoidTypeAnnotation", node, opts); +} + +function assertEnumDeclaration(node, opts) { + assert("EnumDeclaration", node, opts); +} + +function assertEnumBooleanBody(node, opts) { + assert("EnumBooleanBody", node, opts); +} + +function assertEnumNumberBody(node, opts) { + assert("EnumNumberBody", node, opts); +} + +function assertEnumStringBody(node, opts) { + assert("EnumStringBody", node, opts); +} + +function assertEnumSymbolBody(node, opts) { + assert("EnumSymbolBody", node, opts); +} + +function assertEnumBooleanMember(node, opts) { + assert("EnumBooleanMember", node, opts); +} + +function assertEnumNumberMember(node, opts) { + assert("EnumNumberMember", node, opts); +} + +function assertEnumStringMember(node, opts) { + assert("EnumStringMember", node, opts); +} + +function assertEnumDefaultedMember(node, opts) { + assert("EnumDefaultedMember", node, opts); +} + +function assertIndexedAccessType(node, opts) { + assert("IndexedAccessType", node, opts); +} + +function assertOptionalIndexedAccessType(node, opts) { + assert("OptionalIndexedAccessType", node, opts); +} + +function assertJSXAttribute(node, opts) { + assert("JSXAttribute", node, opts); +} + +function assertJSXClosingElement(node, opts) { + assert("JSXClosingElement", node, opts); +} + +function assertJSXElement(node, opts) { + assert("JSXElement", node, opts); +} + +function assertJSXEmptyExpression(node, opts) { + assert("JSXEmptyExpression", node, opts); +} + +function assertJSXExpressionContainer(node, opts) { + assert("JSXExpressionContainer", node, opts); +} + +function assertJSXSpreadChild(node, opts) { + assert("JSXSpreadChild", node, opts); +} + +function assertJSXIdentifier(node, opts) { + assert("JSXIdentifier", node, opts); +} + +function assertJSXMemberExpression(node, opts) { + assert("JSXMemberExpression", node, opts); +} + +function assertJSXNamespacedName(node, opts) { + assert("JSXNamespacedName", node, opts); +} + +function assertJSXOpeningElement(node, opts) { + assert("JSXOpeningElement", node, opts); +} + +function assertJSXSpreadAttribute(node, opts) { + assert("JSXSpreadAttribute", node, opts); +} + +function assertJSXText(node, opts) { + assert("JSXText", node, opts); +} + +function assertJSXFragment(node, opts) { + assert("JSXFragment", node, opts); +} + +function assertJSXOpeningFragment(node, opts) { + assert("JSXOpeningFragment", node, opts); +} + +function assertJSXClosingFragment(node, opts) { + assert("JSXClosingFragment", node, opts); +} + +function assertNoop(node, opts) { + assert("Noop", node, opts); +} + +function assertPlaceholder(node, opts) { + assert("Placeholder", node, opts); +} + +function assertV8IntrinsicIdentifier(node, opts) { + assert("V8IntrinsicIdentifier", node, opts); +} + +function assertArgumentPlaceholder(node, opts) { + assert("ArgumentPlaceholder", node, opts); +} + +function assertBindExpression(node, opts) { + assert("BindExpression", node, opts); +} + +function assertImportAttribute(node, opts) { + assert("ImportAttribute", node, opts); +} + +function assertDecorator(node, opts) { + assert("Decorator", node, opts); +} + +function assertDoExpression(node, opts) { + assert("DoExpression", node, opts); +} + +function assertExportDefaultSpecifier(node, opts) { + assert("ExportDefaultSpecifier", node, opts); +} + +function assertRecordExpression(node, opts) { + assert("RecordExpression", node, opts); +} + +function assertTupleExpression(node, opts) { + assert("TupleExpression", node, opts); +} + +function assertDecimalLiteral(node, opts) { + assert("DecimalLiteral", node, opts); +} + +function assertModuleExpression(node, opts) { + assert("ModuleExpression", node, opts); +} + +function assertTopicReference(node, opts) { + assert("TopicReference", node, opts); +} + +function assertPipelineTopicExpression(node, opts) { + assert("PipelineTopicExpression", node, opts); +} + +function assertPipelineBareFunction(node, opts) { + assert("PipelineBareFunction", node, opts); +} + +function assertPipelinePrimaryTopicReference(node, opts) { + assert("PipelinePrimaryTopicReference", node, opts); +} + +function assertTSParameterProperty(node, opts) { + assert("TSParameterProperty", node, opts); +} + +function assertTSDeclareFunction(node, opts) { + assert("TSDeclareFunction", node, opts); +} + +function assertTSDeclareMethod(node, opts) { + assert("TSDeclareMethod", node, opts); +} + +function assertTSQualifiedName(node, opts) { + assert("TSQualifiedName", node, opts); +} + +function assertTSCallSignatureDeclaration(node, opts) { + assert("TSCallSignatureDeclaration", node, opts); +} + +function assertTSConstructSignatureDeclaration(node, opts) { + assert("TSConstructSignatureDeclaration", node, opts); +} + +function assertTSPropertySignature(node, opts) { + assert("TSPropertySignature", node, opts); +} + +function assertTSMethodSignature(node, opts) { + assert("TSMethodSignature", node, opts); +} + +function assertTSIndexSignature(node, opts) { + assert("TSIndexSignature", node, opts); +} + +function assertTSAnyKeyword(node, opts) { + assert("TSAnyKeyword", node, opts); +} + +function assertTSBooleanKeyword(node, opts) { + assert("TSBooleanKeyword", node, opts); +} + +function assertTSBigIntKeyword(node, opts) { + assert("TSBigIntKeyword", node, opts); +} + +function assertTSIntrinsicKeyword(node, opts) { + assert("TSIntrinsicKeyword", node, opts); +} + +function assertTSNeverKeyword(node, opts) { + assert("TSNeverKeyword", node, opts); +} + +function assertTSNullKeyword(node, opts) { + assert("TSNullKeyword", node, opts); +} + +function assertTSNumberKeyword(node, opts) { + assert("TSNumberKeyword", node, opts); +} + +function assertTSObjectKeyword(node, opts) { + assert("TSObjectKeyword", node, opts); +} + +function assertTSStringKeyword(node, opts) { + assert("TSStringKeyword", node, opts); +} + +function assertTSSymbolKeyword(node, opts) { + assert("TSSymbolKeyword", node, opts); +} + +function assertTSUndefinedKeyword(node, opts) { + assert("TSUndefinedKeyword", node, opts); +} + +function assertTSUnknownKeyword(node, opts) { + assert("TSUnknownKeyword", node, opts); +} + +function assertTSVoidKeyword(node, opts) { + assert("TSVoidKeyword", node, opts); +} + +function assertTSThisType(node, opts) { + assert("TSThisType", node, opts); +} + +function assertTSFunctionType(node, opts) { + assert("TSFunctionType", node, opts); +} + +function assertTSConstructorType(node, opts) { + assert("TSConstructorType", node, opts); +} + +function assertTSTypeReference(node, opts) { + assert("TSTypeReference", node, opts); +} + +function assertTSTypePredicate(node, opts) { + assert("TSTypePredicate", node, opts); +} + +function assertTSTypeQuery(node, opts) { + assert("TSTypeQuery", node, opts); +} + +function assertTSTypeLiteral(node, opts) { + assert("TSTypeLiteral", node, opts); +} + +function assertTSArrayType(node, opts) { + assert("TSArrayType", node, opts); +} + +function assertTSTupleType(node, opts) { + assert("TSTupleType", node, opts); +} + +function assertTSOptionalType(node, opts) { + assert("TSOptionalType", node, opts); +} + +function assertTSRestType(node, opts) { + assert("TSRestType", node, opts); +} + +function assertTSNamedTupleMember(node, opts) { + assert("TSNamedTupleMember", node, opts); +} + +function assertTSUnionType(node, opts) { + assert("TSUnionType", node, opts); +} + +function assertTSIntersectionType(node, opts) { + assert("TSIntersectionType", node, opts); +} + +function assertTSConditionalType(node, opts) { + assert("TSConditionalType", node, opts); +} + +function assertTSInferType(node, opts) { + assert("TSInferType", node, opts); +} + +function assertTSParenthesizedType(node, opts) { + assert("TSParenthesizedType", node, opts); +} + +function assertTSTypeOperator(node, opts) { + assert("TSTypeOperator", node, opts); +} + +function assertTSIndexedAccessType(node, opts) { + assert("TSIndexedAccessType", node, opts); +} + +function assertTSMappedType(node, opts) { + assert("TSMappedType", node, opts); +} + +function assertTSLiteralType(node, opts) { + assert("TSLiteralType", node, opts); +} + +function assertTSExpressionWithTypeArguments(node, opts) { + assert("TSExpressionWithTypeArguments", node, opts); +} + +function assertTSInterfaceDeclaration(node, opts) { + assert("TSInterfaceDeclaration", node, opts); +} + +function assertTSInterfaceBody(node, opts) { + assert("TSInterfaceBody", node, opts); +} + +function assertTSTypeAliasDeclaration(node, opts) { + assert("TSTypeAliasDeclaration", node, opts); +} + +function assertTSAsExpression(node, opts) { + assert("TSAsExpression", node, opts); +} + +function assertTSTypeAssertion(node, opts) { + assert("TSTypeAssertion", node, opts); +} + +function assertTSEnumDeclaration(node, opts) { + assert("TSEnumDeclaration", node, opts); +} + +function assertTSEnumMember(node, opts) { + assert("TSEnumMember", node, opts); +} + +function assertTSModuleDeclaration(node, opts) { + assert("TSModuleDeclaration", node, opts); +} + +function assertTSModuleBlock(node, opts) { + assert("TSModuleBlock", node, opts); +} + +function assertTSImportType(node, opts) { + assert("TSImportType", node, opts); +} + +function assertTSImportEqualsDeclaration(node, opts) { + assert("TSImportEqualsDeclaration", node, opts); +} + +function assertTSExternalModuleReference(node, opts) { + assert("TSExternalModuleReference", node, opts); +} + +function assertTSNonNullExpression(node, opts) { + assert("TSNonNullExpression", node, opts); +} + +function assertTSExportAssignment(node, opts) { + assert("TSExportAssignment", node, opts); +} + +function assertTSNamespaceExportDeclaration(node, opts) { + assert("TSNamespaceExportDeclaration", node, opts); +} + +function assertTSTypeAnnotation(node, opts) { + assert("TSTypeAnnotation", node, opts); +} + +function assertTSTypeParameterInstantiation(node, opts) { + assert("TSTypeParameterInstantiation", node, opts); +} + +function assertTSTypeParameterDeclaration(node, opts) { + assert("TSTypeParameterDeclaration", node, opts); +} + +function assertTSTypeParameter(node, opts) { + assert("TSTypeParameter", node, opts); +} + +function assertStandardized(node, opts) { + assert("Standardized", node, opts); +} + +function assertExpression(node, opts) { + assert("Expression", node, opts); +} + +function assertBinary(node, opts) { + assert("Binary", node, opts); +} + +function assertScopable(node, opts) { + assert("Scopable", node, opts); +} + +function assertBlockParent(node, opts) { + assert("BlockParent", node, opts); +} + +function assertBlock(node, opts) { + assert("Block", node, opts); +} + +function assertStatement(node, opts) { + assert("Statement", node, opts); +} + +function assertTerminatorless(node, opts) { + assert("Terminatorless", node, opts); +} + +function assertCompletionStatement(node, opts) { + assert("CompletionStatement", node, opts); +} + +function assertConditional(node, opts) { + assert("Conditional", node, opts); +} + +function assertLoop(node, opts) { + assert("Loop", node, opts); +} + +function assertWhile(node, opts) { + assert("While", node, opts); +} + +function assertExpressionWrapper(node, opts) { + assert("ExpressionWrapper", node, opts); +} + +function assertFor(node, opts) { + assert("For", node, opts); +} + +function assertForXStatement(node, opts) { + assert("ForXStatement", node, opts); +} + +function assertFunction(node, opts) { + assert("Function", node, opts); +} + +function assertFunctionParent(node, opts) { + assert("FunctionParent", node, opts); +} + +function assertPureish(node, opts) { + assert("Pureish", node, opts); +} + +function assertDeclaration(node, opts) { + assert("Declaration", node, opts); +} + +function assertPatternLike(node, opts) { + assert("PatternLike", node, opts); +} + +function assertLVal(node, opts) { + assert("LVal", node, opts); +} + +function assertTSEntityName(node, opts) { + assert("TSEntityName", node, opts); +} + +function assertLiteral(node, opts) { + assert("Literal", node, opts); +} + +function assertImmutable(node, opts) { + assert("Immutable", node, opts); +} + +function assertUserWhitespacable(node, opts) { + assert("UserWhitespacable", node, opts); +} + +function assertMethod(node, opts) { + assert("Method", node, opts); +} + +function assertObjectMember(node, opts) { + assert("ObjectMember", node, opts); +} + +function assertProperty(node, opts) { + assert("Property", node, opts); +} + +function assertUnaryLike(node, opts) { + assert("UnaryLike", node, opts); +} + +function assertPattern(node, opts) { + assert("Pattern", node, opts); +} + +function assertClass(node, opts) { + assert("Class", node, opts); +} + +function assertModuleDeclaration(node, opts) { + assert("ModuleDeclaration", node, opts); +} + +function assertExportDeclaration(node, opts) { + assert("ExportDeclaration", node, opts); +} + +function assertModuleSpecifier(node, opts) { + assert("ModuleSpecifier", node, opts); +} + +function assertAccessor(node, opts) { + assert("Accessor", node, opts); +} + +function assertPrivate(node, opts) { + assert("Private", node, opts); +} + +function assertFlow(node, opts) { + assert("Flow", node, opts); +} + +function assertFlowType(node, opts) { + assert("FlowType", node, opts); +} + +function assertFlowBaseAnnotation(node, opts) { + assert("FlowBaseAnnotation", node, opts); +} + +function assertFlowDeclaration(node, opts) { + assert("FlowDeclaration", node, opts); +} + +function assertFlowPredicate(node, opts) { + assert("FlowPredicate", node, opts); +} + +function assertEnumBody(node, opts) { + assert("EnumBody", node, opts); +} + +function assertEnumMember(node, opts) { + assert("EnumMember", node, opts); +} + +function assertJSX(node, opts) { + assert("JSX", node, opts); +} + +function assertMiscellaneous(node, opts) { + assert("Miscellaneous", node, opts); +} + +function assertTypeScript(node, opts) { + assert("TypeScript", node, opts); +} + +function assertTSTypeElement(node, opts) { + assert("TSTypeElement", node, opts); +} + +function assertTSType(node, opts) { + assert("TSType", node, opts); +} + +function assertTSBaseType(node, opts) { + assert("TSBaseType", node, opts); +} + +function assertNumberLiteral(node, opts) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + assert("NumberLiteral", node, opts); +} + +function assertRegexLiteral(node, opts) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + assert("RegexLiteral", node, opts); +} + +function assertRestProperty(node, opts) { + console.trace("The node type RestProperty has been renamed to RestElement"); + assert("RestProperty", node, opts); +} + +function assertSpreadProperty(node, opts) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + assert("SpreadProperty", node, opts); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/ast-types/generated/index.js b/node_modules/@babel/types/lib/ast-types/generated/index.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/node_modules/@babel/types/lib/ast-types/generated/index.js diff --git a/node_modules/@babel/types/lib/builders/builder.js b/node_modules/@babel/types/lib/builders/builder.js new file mode 100644 index 0000000..c28edb6 --- /dev/null +++ b/node_modules/@babel/types/lib/builders/builder.js @@ -0,0 +1,43 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = builder; + +var _definitions = require("../definitions"); + +var _validate = require("../validators/validate"); + +function builder() { + const type = this; + const keys = _definitions.BUILDER_KEYS[type]; + const countArgs = arguments.length; + + if (countArgs > keys.length) { + throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`); + } + + const node = { + type + }; + + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const field = _definitions.NODE_FIELDS[type][key]; + let arg; + if (i < countArgs) arg = arguments[i]; + + if (arg === undefined) { + arg = Array.isArray(field.default) ? [] : field.default; + } + + node[key] = arg; + } + + for (const key in node) { + (0, _validate.default)(node, key, node[key]); + } + + return node; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js b/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js new file mode 100644 index 0000000..ddf20fd --- /dev/null +++ b/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createFlowUnionType; + +var _generated = require("../generated"); + +var _removeTypeDuplicates = require("../../modifications/flow/removeTypeDuplicates"); + +function createFlowUnionType(types) { + const flattened = (0, _removeTypeDuplicates.default)(types); + + if (flattened.length === 1) { + return flattened[0]; + } else { + return (0, _generated.unionTypeAnnotation)(flattened); + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js new file mode 100644 index 0000000..11dca05 --- /dev/null +++ b/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js @@ -0,0 +1,41 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _generated = require("../generated"); + +var _default = createTypeAnnotationBasedOnTypeof; +exports.default = _default; + +function createTypeAnnotationBasedOnTypeof(type) { + switch (type) { + case "string": + return (0, _generated.stringTypeAnnotation)(); + + case "number": + return (0, _generated.numberTypeAnnotation)(); + + case "undefined": + return (0, _generated.voidTypeAnnotation)(); + + case "boolean": + return (0, _generated.booleanTypeAnnotation)(); + + case "function": + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); + + case "object": + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); + + case "symbol": + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); + + case "bigint": + return (0, _generated.anyTypeAnnotation)(); + } + + throw new Error("Invalid typeof value: " + type); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/generated/index.js b/node_modules/@babel/types/lib/builders/generated/index.js new file mode 100644 index 0000000..99851ee --- /dev/null +++ b/node_modules/@babel/types/lib/builders/generated/index.js @@ -0,0 +1,1266 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.anyTypeAnnotation = anyTypeAnnotation; +exports.argumentPlaceholder = argumentPlaceholder; +exports.arrayExpression = arrayExpression; +exports.arrayPattern = arrayPattern; +exports.arrayTypeAnnotation = arrayTypeAnnotation; +exports.arrowFunctionExpression = arrowFunctionExpression; +exports.assignmentExpression = assignmentExpression; +exports.assignmentPattern = assignmentPattern; +exports.awaitExpression = awaitExpression; +exports.bigIntLiteral = bigIntLiteral; +exports.binaryExpression = binaryExpression; +exports.bindExpression = bindExpression; +exports.blockStatement = blockStatement; +exports.booleanLiteral = booleanLiteral; +exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation; +exports.booleanTypeAnnotation = booleanTypeAnnotation; +exports.breakStatement = breakStatement; +exports.callExpression = callExpression; +exports.catchClause = catchClause; +exports.classAccessorProperty = classAccessorProperty; +exports.classBody = classBody; +exports.classDeclaration = classDeclaration; +exports.classExpression = classExpression; +exports.classImplements = classImplements; +exports.classMethod = classMethod; +exports.classPrivateMethod = classPrivateMethod; +exports.classPrivateProperty = classPrivateProperty; +exports.classProperty = classProperty; +exports.conditionalExpression = conditionalExpression; +exports.continueStatement = continueStatement; +exports.debuggerStatement = debuggerStatement; +exports.decimalLiteral = decimalLiteral; +exports.declareClass = declareClass; +exports.declareExportAllDeclaration = declareExportAllDeclaration; +exports.declareExportDeclaration = declareExportDeclaration; +exports.declareFunction = declareFunction; +exports.declareInterface = declareInterface; +exports.declareModule = declareModule; +exports.declareModuleExports = declareModuleExports; +exports.declareOpaqueType = declareOpaqueType; +exports.declareTypeAlias = declareTypeAlias; +exports.declareVariable = declareVariable; +exports.declaredPredicate = declaredPredicate; +exports.decorator = decorator; +exports.directive = directive; +exports.directiveLiteral = directiveLiteral; +exports.doExpression = doExpression; +exports.doWhileStatement = doWhileStatement; +exports.emptyStatement = emptyStatement; +exports.emptyTypeAnnotation = emptyTypeAnnotation; +exports.enumBooleanBody = enumBooleanBody; +exports.enumBooleanMember = enumBooleanMember; +exports.enumDeclaration = enumDeclaration; +exports.enumDefaultedMember = enumDefaultedMember; +exports.enumNumberBody = enumNumberBody; +exports.enumNumberMember = enumNumberMember; +exports.enumStringBody = enumStringBody; +exports.enumStringMember = enumStringMember; +exports.enumSymbolBody = enumSymbolBody; +exports.existsTypeAnnotation = existsTypeAnnotation; +exports.exportAllDeclaration = exportAllDeclaration; +exports.exportDefaultDeclaration = exportDefaultDeclaration; +exports.exportDefaultSpecifier = exportDefaultSpecifier; +exports.exportNamedDeclaration = exportNamedDeclaration; +exports.exportNamespaceSpecifier = exportNamespaceSpecifier; +exports.exportSpecifier = exportSpecifier; +exports.expressionStatement = expressionStatement; +exports.file = file; +exports.forInStatement = forInStatement; +exports.forOfStatement = forOfStatement; +exports.forStatement = forStatement; +exports.functionDeclaration = functionDeclaration; +exports.functionExpression = functionExpression; +exports.functionTypeAnnotation = functionTypeAnnotation; +exports.functionTypeParam = functionTypeParam; +exports.genericTypeAnnotation = genericTypeAnnotation; +exports.identifier = identifier; +exports.ifStatement = ifStatement; +exports.import = _import; +exports.importAttribute = importAttribute; +exports.importDeclaration = importDeclaration; +exports.importDefaultSpecifier = importDefaultSpecifier; +exports.importNamespaceSpecifier = importNamespaceSpecifier; +exports.importSpecifier = importSpecifier; +exports.indexedAccessType = indexedAccessType; +exports.inferredPredicate = inferredPredicate; +exports.interfaceDeclaration = interfaceDeclaration; +exports.interfaceExtends = interfaceExtends; +exports.interfaceTypeAnnotation = interfaceTypeAnnotation; +exports.interpreterDirective = interpreterDirective; +exports.intersectionTypeAnnotation = intersectionTypeAnnotation; +exports.jSXAttribute = exports.jsxAttribute = jsxAttribute; +exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement; +exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment; +exports.jSXElement = exports.jsxElement = jsxElement; +exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression; +exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer; +exports.jSXFragment = exports.jsxFragment = jsxFragment; +exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier; +exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression; +exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName; +exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement; +exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment; +exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute; +exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild; +exports.jSXText = exports.jsxText = jsxText; +exports.labeledStatement = labeledStatement; +exports.logicalExpression = logicalExpression; +exports.memberExpression = memberExpression; +exports.metaProperty = metaProperty; +exports.mixedTypeAnnotation = mixedTypeAnnotation; +exports.moduleExpression = moduleExpression; +exports.newExpression = newExpression; +exports.noop = noop; +exports.nullLiteral = nullLiteral; +exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation; +exports.nullableTypeAnnotation = nullableTypeAnnotation; +exports.numberLiteral = NumberLiteral; +exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation; +exports.numberTypeAnnotation = numberTypeAnnotation; +exports.numericLiteral = numericLiteral; +exports.objectExpression = objectExpression; +exports.objectMethod = objectMethod; +exports.objectPattern = objectPattern; +exports.objectProperty = objectProperty; +exports.objectTypeAnnotation = objectTypeAnnotation; +exports.objectTypeCallProperty = objectTypeCallProperty; +exports.objectTypeIndexer = objectTypeIndexer; +exports.objectTypeInternalSlot = objectTypeInternalSlot; +exports.objectTypeProperty = objectTypeProperty; +exports.objectTypeSpreadProperty = objectTypeSpreadProperty; +exports.opaqueType = opaqueType; +exports.optionalCallExpression = optionalCallExpression; +exports.optionalIndexedAccessType = optionalIndexedAccessType; +exports.optionalMemberExpression = optionalMemberExpression; +exports.parenthesizedExpression = parenthesizedExpression; +exports.pipelineBareFunction = pipelineBareFunction; +exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference; +exports.pipelineTopicExpression = pipelineTopicExpression; +exports.placeholder = placeholder; +exports.privateName = privateName; +exports.program = program; +exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier; +exports.recordExpression = recordExpression; +exports.regExpLiteral = regExpLiteral; +exports.regexLiteral = RegexLiteral; +exports.restElement = restElement; +exports.restProperty = RestProperty; +exports.returnStatement = returnStatement; +exports.sequenceExpression = sequenceExpression; +exports.spreadElement = spreadElement; +exports.spreadProperty = SpreadProperty; +exports.staticBlock = staticBlock; +exports.stringLiteral = stringLiteral; +exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation; +exports.stringTypeAnnotation = stringTypeAnnotation; +exports.super = _super; +exports.switchCase = switchCase; +exports.switchStatement = switchStatement; +exports.symbolTypeAnnotation = symbolTypeAnnotation; +exports.taggedTemplateExpression = taggedTemplateExpression; +exports.templateElement = templateElement; +exports.templateLiteral = templateLiteral; +exports.thisExpression = thisExpression; +exports.thisTypeAnnotation = thisTypeAnnotation; +exports.throwStatement = throwStatement; +exports.topicReference = topicReference; +exports.tryStatement = tryStatement; +exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword; +exports.tSArrayType = exports.tsArrayType = tsArrayType; +exports.tSAsExpression = exports.tsAsExpression = tsAsExpression; +exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword; +exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword; +exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration; +exports.tSConditionalType = exports.tsConditionalType = tsConditionalType; +exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration; +exports.tSConstructorType = exports.tsConstructorType = tsConstructorType; +exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction; +exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod; +exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration; +exports.tSEnumMember = exports.tsEnumMember = tsEnumMember; +exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment; +exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments; +exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference; +exports.tSFunctionType = exports.tsFunctionType = tsFunctionType; +exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration; +exports.tSImportType = exports.tsImportType = tsImportType; +exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature; +exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType; +exports.tSInferType = exports.tsInferType = tsInferType; +exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody; +exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration; +exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType; +exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword; +exports.tSLiteralType = exports.tsLiteralType = tsLiteralType; +exports.tSMappedType = exports.tsMappedType = tsMappedType; +exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature; +exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock; +exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration; +exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember; +exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration; +exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword; +exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression; +exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword; +exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword; +exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword; +exports.tSOptionalType = exports.tsOptionalType = tsOptionalType; +exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty; +exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType; +exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature; +exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName; +exports.tSRestType = exports.tsRestType = tsRestType; +exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword; +exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword; +exports.tSThisType = exports.tsThisType = tsThisType; +exports.tSTupleType = exports.tsTupleType = tsTupleType; +exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration; +exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation; +exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion; +exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral; +exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator; +exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter; +exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration; +exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation; +exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate; +exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery; +exports.tSTypeReference = exports.tsTypeReference = tsTypeReference; +exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword; +exports.tSUnionType = exports.tsUnionType = tsUnionType; +exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword; +exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword; +exports.tupleExpression = tupleExpression; +exports.tupleTypeAnnotation = tupleTypeAnnotation; +exports.typeAlias = typeAlias; +exports.typeAnnotation = typeAnnotation; +exports.typeCastExpression = typeCastExpression; +exports.typeParameter = typeParameter; +exports.typeParameterDeclaration = typeParameterDeclaration; +exports.typeParameterInstantiation = typeParameterInstantiation; +exports.typeofTypeAnnotation = typeofTypeAnnotation; +exports.unaryExpression = unaryExpression; +exports.unionTypeAnnotation = unionTypeAnnotation; +exports.updateExpression = updateExpression; +exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier; +exports.variableDeclaration = variableDeclaration; +exports.variableDeclarator = variableDeclarator; +exports.variance = variance; +exports.voidTypeAnnotation = voidTypeAnnotation; +exports.whileStatement = whileStatement; +exports.withStatement = withStatement; +exports.yieldExpression = yieldExpression; + +var _builder = require("../builder"); + +function arrayExpression(elements) { + return _builder.default.apply("ArrayExpression", arguments); +} + +function assignmentExpression(operator, left, right) { + return _builder.default.apply("AssignmentExpression", arguments); +} + +function binaryExpression(operator, left, right) { + return _builder.default.apply("BinaryExpression", arguments); +} + +function interpreterDirective(value) { + return _builder.default.apply("InterpreterDirective", arguments); +} + +function directive(value) { + return _builder.default.apply("Directive", arguments); +} + +function directiveLiteral(value) { + return _builder.default.apply("DirectiveLiteral", arguments); +} + +function blockStatement(body, directives) { + return _builder.default.apply("BlockStatement", arguments); +} + +function breakStatement(label) { + return _builder.default.apply("BreakStatement", arguments); +} + +function callExpression(callee, _arguments) { + return _builder.default.apply("CallExpression", arguments); +} + +function catchClause(param, body) { + return _builder.default.apply("CatchClause", arguments); +} + +function conditionalExpression(test, consequent, alternate) { + return _builder.default.apply("ConditionalExpression", arguments); +} + +function continueStatement(label) { + return _builder.default.apply("ContinueStatement", arguments); +} + +function debuggerStatement() { + return _builder.default.apply("DebuggerStatement", arguments); +} + +function doWhileStatement(test, body) { + return _builder.default.apply("DoWhileStatement", arguments); +} + +function emptyStatement() { + return _builder.default.apply("EmptyStatement", arguments); +} + +function expressionStatement(expression) { + return _builder.default.apply("ExpressionStatement", arguments); +} + +function file(program, comments, tokens) { + return _builder.default.apply("File", arguments); +} + +function forInStatement(left, right, body) { + return _builder.default.apply("ForInStatement", arguments); +} + +function forStatement(init, test, update, body) { + return _builder.default.apply("ForStatement", arguments); +} + +function functionDeclaration(id, params, body, generator, async) { + return _builder.default.apply("FunctionDeclaration", arguments); +} + +function functionExpression(id, params, body, generator, async) { + return _builder.default.apply("FunctionExpression", arguments); +} + +function identifier(name) { + return _builder.default.apply("Identifier", arguments); +} + +function ifStatement(test, consequent, alternate) { + return _builder.default.apply("IfStatement", arguments); +} + +function labeledStatement(label, body) { + return _builder.default.apply("LabeledStatement", arguments); +} + +function stringLiteral(value) { + return _builder.default.apply("StringLiteral", arguments); +} + +function numericLiteral(value) { + return _builder.default.apply("NumericLiteral", arguments); +} + +function nullLiteral() { + return _builder.default.apply("NullLiteral", arguments); +} + +function booleanLiteral(value) { + return _builder.default.apply("BooleanLiteral", arguments); +} + +function regExpLiteral(pattern, flags) { + return _builder.default.apply("RegExpLiteral", arguments); +} + +function logicalExpression(operator, left, right) { + return _builder.default.apply("LogicalExpression", arguments); +} + +function memberExpression(object, property, computed, optional) { + return _builder.default.apply("MemberExpression", arguments); +} + +function newExpression(callee, _arguments) { + return _builder.default.apply("NewExpression", arguments); +} + +function program(body, directives, sourceType, interpreter) { + return _builder.default.apply("Program", arguments); +} + +function objectExpression(properties) { + return _builder.default.apply("ObjectExpression", arguments); +} + +function objectMethod(kind, key, params, body, computed, generator, async) { + return _builder.default.apply("ObjectMethod", arguments); +} + +function objectProperty(key, value, computed, shorthand, decorators) { + return _builder.default.apply("ObjectProperty", arguments); +} + +function restElement(argument) { + return _builder.default.apply("RestElement", arguments); +} + +function returnStatement(argument) { + return _builder.default.apply("ReturnStatement", arguments); +} + +function sequenceExpression(expressions) { + return _builder.default.apply("SequenceExpression", arguments); +} + +function parenthesizedExpression(expression) { + return _builder.default.apply("ParenthesizedExpression", arguments); +} + +function switchCase(test, consequent) { + return _builder.default.apply("SwitchCase", arguments); +} + +function switchStatement(discriminant, cases) { + return _builder.default.apply("SwitchStatement", arguments); +} + +function thisExpression() { + return _builder.default.apply("ThisExpression", arguments); +} + +function throwStatement(argument) { + return _builder.default.apply("ThrowStatement", arguments); +} + +function tryStatement(block, handler, finalizer) { + return _builder.default.apply("TryStatement", arguments); +} + +function unaryExpression(operator, argument, prefix) { + return _builder.default.apply("UnaryExpression", arguments); +} + +function updateExpression(operator, argument, prefix) { + return _builder.default.apply("UpdateExpression", arguments); +} + +function variableDeclaration(kind, declarations) { + return _builder.default.apply("VariableDeclaration", arguments); +} + +function variableDeclarator(id, init) { + return _builder.default.apply("VariableDeclarator", arguments); +} + +function whileStatement(test, body) { + return _builder.default.apply("WhileStatement", arguments); +} + +function withStatement(object, body) { + return _builder.default.apply("WithStatement", arguments); +} + +function assignmentPattern(left, right) { + return _builder.default.apply("AssignmentPattern", arguments); +} + +function arrayPattern(elements) { + return _builder.default.apply("ArrayPattern", arguments); +} + +function arrowFunctionExpression(params, body, async) { + return _builder.default.apply("ArrowFunctionExpression", arguments); +} + +function classBody(body) { + return _builder.default.apply("ClassBody", arguments); +} + +function classExpression(id, superClass, body, decorators) { + return _builder.default.apply("ClassExpression", arguments); +} + +function classDeclaration(id, superClass, body, decorators) { + return _builder.default.apply("ClassDeclaration", arguments); +} + +function exportAllDeclaration(source) { + return _builder.default.apply("ExportAllDeclaration", arguments); +} + +function exportDefaultDeclaration(declaration) { + return _builder.default.apply("ExportDefaultDeclaration", arguments); +} + +function exportNamedDeclaration(declaration, specifiers, source) { + return _builder.default.apply("ExportNamedDeclaration", arguments); +} + +function exportSpecifier(local, exported) { + return _builder.default.apply("ExportSpecifier", arguments); +} + +function forOfStatement(left, right, body, _await) { + return _builder.default.apply("ForOfStatement", arguments); +} + +function importDeclaration(specifiers, source) { + return _builder.default.apply("ImportDeclaration", arguments); +} + +function importDefaultSpecifier(local) { + return _builder.default.apply("ImportDefaultSpecifier", arguments); +} + +function importNamespaceSpecifier(local) { + return _builder.default.apply("ImportNamespaceSpecifier", arguments); +} + +function importSpecifier(local, imported) { + return _builder.default.apply("ImportSpecifier", arguments); +} + +function metaProperty(meta, property) { + return _builder.default.apply("MetaProperty", arguments); +} + +function classMethod(kind, key, params, body, computed, _static, generator, async) { + return _builder.default.apply("ClassMethod", arguments); +} + +function objectPattern(properties) { + return _builder.default.apply("ObjectPattern", arguments); +} + +function spreadElement(argument) { + return _builder.default.apply("SpreadElement", arguments); +} + +function _super() { + return _builder.default.apply("Super", arguments); +} + +function taggedTemplateExpression(tag, quasi) { + return _builder.default.apply("TaggedTemplateExpression", arguments); +} + +function templateElement(value, tail) { + return _builder.default.apply("TemplateElement", arguments); +} + +function templateLiteral(quasis, expressions) { + return _builder.default.apply("TemplateLiteral", arguments); +} + +function yieldExpression(argument, delegate) { + return _builder.default.apply("YieldExpression", arguments); +} + +function awaitExpression(argument) { + return _builder.default.apply("AwaitExpression", arguments); +} + +function _import() { + return _builder.default.apply("Import", arguments); +} + +function bigIntLiteral(value) { + return _builder.default.apply("BigIntLiteral", arguments); +} + +function exportNamespaceSpecifier(exported) { + return _builder.default.apply("ExportNamespaceSpecifier", arguments); +} + +function optionalMemberExpression(object, property, computed, optional) { + return _builder.default.apply("OptionalMemberExpression", arguments); +} + +function optionalCallExpression(callee, _arguments, optional) { + return _builder.default.apply("OptionalCallExpression", arguments); +} + +function classProperty(key, value, typeAnnotation, decorators, computed, _static) { + return _builder.default.apply("ClassProperty", arguments); +} + +function classAccessorProperty(key, value, typeAnnotation, decorators, computed, _static) { + return _builder.default.apply("ClassAccessorProperty", arguments); +} + +function classPrivateProperty(key, value, decorators, _static) { + return _builder.default.apply("ClassPrivateProperty", arguments); +} + +function classPrivateMethod(kind, key, params, body, _static) { + return _builder.default.apply("ClassPrivateMethod", arguments); +} + +function privateName(id) { + return _builder.default.apply("PrivateName", arguments); +} + +function staticBlock(body) { + return _builder.default.apply("StaticBlock", arguments); +} + +function anyTypeAnnotation() { + return _builder.default.apply("AnyTypeAnnotation", arguments); +} + +function arrayTypeAnnotation(elementType) { + return _builder.default.apply("ArrayTypeAnnotation", arguments); +} + +function booleanTypeAnnotation() { + return _builder.default.apply("BooleanTypeAnnotation", arguments); +} + +function booleanLiteralTypeAnnotation(value) { + return _builder.default.apply("BooleanLiteralTypeAnnotation", arguments); +} + +function nullLiteralTypeAnnotation() { + return _builder.default.apply("NullLiteralTypeAnnotation", arguments); +} + +function classImplements(id, typeParameters) { + return _builder.default.apply("ClassImplements", arguments); +} + +function declareClass(id, typeParameters, _extends, body) { + return _builder.default.apply("DeclareClass", arguments); +} + +function declareFunction(id) { + return _builder.default.apply("DeclareFunction", arguments); +} + +function declareInterface(id, typeParameters, _extends, body) { + return _builder.default.apply("DeclareInterface", arguments); +} + +function declareModule(id, body, kind) { + return _builder.default.apply("DeclareModule", arguments); +} + +function declareModuleExports(typeAnnotation) { + return _builder.default.apply("DeclareModuleExports", arguments); +} + +function declareTypeAlias(id, typeParameters, right) { + return _builder.default.apply("DeclareTypeAlias", arguments); +} + +function declareOpaqueType(id, typeParameters, supertype) { + return _builder.default.apply("DeclareOpaqueType", arguments); +} + +function declareVariable(id) { + return _builder.default.apply("DeclareVariable", arguments); +} + +function declareExportDeclaration(declaration, specifiers, source) { + return _builder.default.apply("DeclareExportDeclaration", arguments); +} + +function declareExportAllDeclaration(source) { + return _builder.default.apply("DeclareExportAllDeclaration", arguments); +} + +function declaredPredicate(value) { + return _builder.default.apply("DeclaredPredicate", arguments); +} + +function existsTypeAnnotation() { + return _builder.default.apply("ExistsTypeAnnotation", arguments); +} + +function functionTypeAnnotation(typeParameters, params, rest, returnType) { + return _builder.default.apply("FunctionTypeAnnotation", arguments); +} + +function functionTypeParam(name, typeAnnotation) { + return _builder.default.apply("FunctionTypeParam", arguments); +} + +function genericTypeAnnotation(id, typeParameters) { + return _builder.default.apply("GenericTypeAnnotation", arguments); +} + +function inferredPredicate() { + return _builder.default.apply("InferredPredicate", arguments); +} + +function interfaceExtends(id, typeParameters) { + return _builder.default.apply("InterfaceExtends", arguments); +} + +function interfaceDeclaration(id, typeParameters, _extends, body) { + return _builder.default.apply("InterfaceDeclaration", arguments); +} + +function interfaceTypeAnnotation(_extends, body) { + return _builder.default.apply("InterfaceTypeAnnotation", arguments); +} + +function intersectionTypeAnnotation(types) { + return _builder.default.apply("IntersectionTypeAnnotation", arguments); +} + +function mixedTypeAnnotation() { + return _builder.default.apply("MixedTypeAnnotation", arguments); +} + +function emptyTypeAnnotation() { + return _builder.default.apply("EmptyTypeAnnotation", arguments); +} + +function nullableTypeAnnotation(typeAnnotation) { + return _builder.default.apply("NullableTypeAnnotation", arguments); +} + +function numberLiteralTypeAnnotation(value) { + return _builder.default.apply("NumberLiteralTypeAnnotation", arguments); +} + +function numberTypeAnnotation() { + return _builder.default.apply("NumberTypeAnnotation", arguments); +} + +function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) { + return _builder.default.apply("ObjectTypeAnnotation", arguments); +} + +function objectTypeInternalSlot(id, value, optional, _static, method) { + return _builder.default.apply("ObjectTypeInternalSlot", arguments); +} + +function objectTypeCallProperty(value) { + return _builder.default.apply("ObjectTypeCallProperty", arguments); +} + +function objectTypeIndexer(id, key, value, variance) { + return _builder.default.apply("ObjectTypeIndexer", arguments); +} + +function objectTypeProperty(key, value, variance) { + return _builder.default.apply("ObjectTypeProperty", arguments); +} + +function objectTypeSpreadProperty(argument) { + return _builder.default.apply("ObjectTypeSpreadProperty", arguments); +} + +function opaqueType(id, typeParameters, supertype, impltype) { + return _builder.default.apply("OpaqueType", arguments); +} + +function qualifiedTypeIdentifier(id, qualification) { + return _builder.default.apply("QualifiedTypeIdentifier", arguments); +} + +function stringLiteralTypeAnnotation(value) { + return _builder.default.apply("StringLiteralTypeAnnotation", arguments); +} + +function stringTypeAnnotation() { + return _builder.default.apply("StringTypeAnnotation", arguments); +} + +function symbolTypeAnnotation() { + return _builder.default.apply("SymbolTypeAnnotation", arguments); +} + +function thisTypeAnnotation() { + return _builder.default.apply("ThisTypeAnnotation", arguments); +} + +function tupleTypeAnnotation(types) { + return _builder.default.apply("TupleTypeAnnotation", arguments); +} + +function typeofTypeAnnotation(argument) { + return _builder.default.apply("TypeofTypeAnnotation", arguments); +} + +function typeAlias(id, typeParameters, right) { + return _builder.default.apply("TypeAlias", arguments); +} + +function typeAnnotation(typeAnnotation) { + return _builder.default.apply("TypeAnnotation", arguments); +} + +function typeCastExpression(expression, typeAnnotation) { + return _builder.default.apply("TypeCastExpression", arguments); +} + +function typeParameter(bound, _default, variance) { + return _builder.default.apply("TypeParameter", arguments); +} + +function typeParameterDeclaration(params) { + return _builder.default.apply("TypeParameterDeclaration", arguments); +} + +function typeParameterInstantiation(params) { + return _builder.default.apply("TypeParameterInstantiation", arguments); +} + +function unionTypeAnnotation(types) { + return _builder.default.apply("UnionTypeAnnotation", arguments); +} + +function variance(kind) { + return _builder.default.apply("Variance", arguments); +} + +function voidTypeAnnotation() { + return _builder.default.apply("VoidTypeAnnotation", arguments); +} + +function enumDeclaration(id, body) { + return _builder.default.apply("EnumDeclaration", arguments); +} + +function enumBooleanBody(members) { + return _builder.default.apply("EnumBooleanBody", arguments); +} + +function enumNumberBody(members) { + return _builder.default.apply("EnumNumberBody", arguments); +} + +function enumStringBody(members) { + return _builder.default.apply("EnumStringBody", arguments); +} + +function enumSymbolBody(members) { + return _builder.default.apply("EnumSymbolBody", arguments); +} + +function enumBooleanMember(id) { + return _builder.default.apply("EnumBooleanMember", arguments); +} + +function enumNumberMember(id, init) { + return _builder.default.apply("EnumNumberMember", arguments); +} + +function enumStringMember(id, init) { + return _builder.default.apply("EnumStringMember", arguments); +} + +function enumDefaultedMember(id) { + return _builder.default.apply("EnumDefaultedMember", arguments); +} + +function indexedAccessType(objectType, indexType) { + return _builder.default.apply("IndexedAccessType", arguments); +} + +function optionalIndexedAccessType(objectType, indexType) { + return _builder.default.apply("OptionalIndexedAccessType", arguments); +} + +function jsxAttribute(name, value) { + return _builder.default.apply("JSXAttribute", arguments); +} + +function jsxClosingElement(name) { + return _builder.default.apply("JSXClosingElement", arguments); +} + +function jsxElement(openingElement, closingElement, children, selfClosing) { + return _builder.default.apply("JSXElement", arguments); +} + +function jsxEmptyExpression() { + return _builder.default.apply("JSXEmptyExpression", arguments); +} + +function jsxExpressionContainer(expression) { + return _builder.default.apply("JSXExpressionContainer", arguments); +} + +function jsxSpreadChild(expression) { + return _builder.default.apply("JSXSpreadChild", arguments); +} + +function jsxIdentifier(name) { + return _builder.default.apply("JSXIdentifier", arguments); +} + +function jsxMemberExpression(object, property) { + return _builder.default.apply("JSXMemberExpression", arguments); +} + +function jsxNamespacedName(namespace, name) { + return _builder.default.apply("JSXNamespacedName", arguments); +} + +function jsxOpeningElement(name, attributes, selfClosing) { + return _builder.default.apply("JSXOpeningElement", arguments); +} + +function jsxSpreadAttribute(argument) { + return _builder.default.apply("JSXSpreadAttribute", arguments); +} + +function jsxText(value) { + return _builder.default.apply("JSXText", arguments); +} + +function jsxFragment(openingFragment, closingFragment, children) { + return _builder.default.apply("JSXFragment", arguments); +} + +function jsxOpeningFragment() { + return _builder.default.apply("JSXOpeningFragment", arguments); +} + +function jsxClosingFragment() { + return _builder.default.apply("JSXClosingFragment", arguments); +} + +function noop() { + return _builder.default.apply("Noop", arguments); +} + +function placeholder(expectedNode, name) { + return _builder.default.apply("Placeholder", arguments); +} + +function v8IntrinsicIdentifier(name) { + return _builder.default.apply("V8IntrinsicIdentifier", arguments); +} + +function argumentPlaceholder() { + return _builder.default.apply("ArgumentPlaceholder", arguments); +} + +function bindExpression(object, callee) { + return _builder.default.apply("BindExpression", arguments); +} + +function importAttribute(key, value) { + return _builder.default.apply("ImportAttribute", arguments); +} + +function decorator(expression) { + return _builder.default.apply("Decorator", arguments); +} + +function doExpression(body, async) { + return _builder.default.apply("DoExpression", arguments); +} + +function exportDefaultSpecifier(exported) { + return _builder.default.apply("ExportDefaultSpecifier", arguments); +} + +function recordExpression(properties) { + return _builder.default.apply("RecordExpression", arguments); +} + +function tupleExpression(elements) { + return _builder.default.apply("TupleExpression", arguments); +} + +function decimalLiteral(value) { + return _builder.default.apply("DecimalLiteral", arguments); +} + +function moduleExpression(body) { + return _builder.default.apply("ModuleExpression", arguments); +} + +function topicReference() { + return _builder.default.apply("TopicReference", arguments); +} + +function pipelineTopicExpression(expression) { + return _builder.default.apply("PipelineTopicExpression", arguments); +} + +function pipelineBareFunction(callee) { + return _builder.default.apply("PipelineBareFunction", arguments); +} + +function pipelinePrimaryTopicReference() { + return _builder.default.apply("PipelinePrimaryTopicReference", arguments); +} + +function tsParameterProperty(parameter) { + return _builder.default.apply("TSParameterProperty", arguments); +} + +function tsDeclareFunction(id, typeParameters, params, returnType) { + return _builder.default.apply("TSDeclareFunction", arguments); +} + +function tsDeclareMethod(decorators, key, typeParameters, params, returnType) { + return _builder.default.apply("TSDeclareMethod", arguments); +} + +function tsQualifiedName(left, right) { + return _builder.default.apply("TSQualifiedName", arguments); +} + +function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation) { + return _builder.default.apply("TSCallSignatureDeclaration", arguments); +} + +function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation) { + return _builder.default.apply("TSConstructSignatureDeclaration", arguments); +} + +function tsPropertySignature(key, typeAnnotation, initializer) { + return _builder.default.apply("TSPropertySignature", arguments); +} + +function tsMethodSignature(key, typeParameters, parameters, typeAnnotation) { + return _builder.default.apply("TSMethodSignature", arguments); +} + +function tsIndexSignature(parameters, typeAnnotation) { + return _builder.default.apply("TSIndexSignature", arguments); +} + +function tsAnyKeyword() { + return _builder.default.apply("TSAnyKeyword", arguments); +} + +function tsBooleanKeyword() { + return _builder.default.apply("TSBooleanKeyword", arguments); +} + +function tsBigIntKeyword() { + return _builder.default.apply("TSBigIntKeyword", arguments); +} + +function tsIntrinsicKeyword() { + return _builder.default.apply("TSIntrinsicKeyword", arguments); +} + +function tsNeverKeyword() { + return _builder.default.apply("TSNeverKeyword", arguments); +} + +function tsNullKeyword() { + return _builder.default.apply("TSNullKeyword", arguments); +} + +function tsNumberKeyword() { + return _builder.default.apply("TSNumberKeyword", arguments); +} + +function tsObjectKeyword() { + return _builder.default.apply("TSObjectKeyword", arguments); +} + +function tsStringKeyword() { + return _builder.default.apply("TSStringKeyword", arguments); +} + +function tsSymbolKeyword() { + return _builder.default.apply("TSSymbolKeyword", arguments); +} + +function tsUndefinedKeyword() { + return _builder.default.apply("TSUndefinedKeyword", arguments); +} + +function tsUnknownKeyword() { + return _builder.default.apply("TSUnknownKeyword", arguments); +} + +function tsVoidKeyword() { + return _builder.default.apply("TSVoidKeyword", arguments); +} + +function tsThisType() { + return _builder.default.apply("TSThisType", arguments); +} + +function tsFunctionType(typeParameters, parameters, typeAnnotation) { + return _builder.default.apply("TSFunctionType", arguments); +} + +function tsConstructorType(typeParameters, parameters, typeAnnotation) { + return _builder.default.apply("TSConstructorType", arguments); +} + +function tsTypeReference(typeName, typeParameters) { + return _builder.default.apply("TSTypeReference", arguments); +} + +function tsTypePredicate(parameterName, typeAnnotation, asserts) { + return _builder.default.apply("TSTypePredicate", arguments); +} + +function tsTypeQuery(exprName) { + return _builder.default.apply("TSTypeQuery", arguments); +} + +function tsTypeLiteral(members) { + return _builder.default.apply("TSTypeLiteral", arguments); +} + +function tsArrayType(elementType) { + return _builder.default.apply("TSArrayType", arguments); +} + +function tsTupleType(elementTypes) { + return _builder.default.apply("TSTupleType", arguments); +} + +function tsOptionalType(typeAnnotation) { + return _builder.default.apply("TSOptionalType", arguments); +} + +function tsRestType(typeAnnotation) { + return _builder.default.apply("TSRestType", arguments); +} + +function tsNamedTupleMember(label, elementType, optional) { + return _builder.default.apply("TSNamedTupleMember", arguments); +} + +function tsUnionType(types) { + return _builder.default.apply("TSUnionType", arguments); +} + +function tsIntersectionType(types) { + return _builder.default.apply("TSIntersectionType", arguments); +} + +function tsConditionalType(checkType, extendsType, trueType, falseType) { + return _builder.default.apply("TSConditionalType", arguments); +} + +function tsInferType(typeParameter) { + return _builder.default.apply("TSInferType", arguments); +} + +function tsParenthesizedType(typeAnnotation) { + return _builder.default.apply("TSParenthesizedType", arguments); +} + +function tsTypeOperator(typeAnnotation) { + return _builder.default.apply("TSTypeOperator", arguments); +} + +function tsIndexedAccessType(objectType, indexType) { + return _builder.default.apply("TSIndexedAccessType", arguments); +} + +function tsMappedType(typeParameter, typeAnnotation, nameType) { + return _builder.default.apply("TSMappedType", arguments); +} + +function tsLiteralType(literal) { + return _builder.default.apply("TSLiteralType", arguments); +} + +function tsExpressionWithTypeArguments(expression, typeParameters) { + return _builder.default.apply("TSExpressionWithTypeArguments", arguments); +} + +function tsInterfaceDeclaration(id, typeParameters, _extends, body) { + return _builder.default.apply("TSInterfaceDeclaration", arguments); +} + +function tsInterfaceBody(body) { + return _builder.default.apply("TSInterfaceBody", arguments); +} + +function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation) { + return _builder.default.apply("TSTypeAliasDeclaration", arguments); +} + +function tsAsExpression(expression, typeAnnotation) { + return _builder.default.apply("TSAsExpression", arguments); +} + +function tsTypeAssertion(typeAnnotation, expression) { + return _builder.default.apply("TSTypeAssertion", arguments); +} + +function tsEnumDeclaration(id, members) { + return _builder.default.apply("TSEnumDeclaration", arguments); +} + +function tsEnumMember(id, initializer) { + return _builder.default.apply("TSEnumMember", arguments); +} + +function tsModuleDeclaration(id, body) { + return _builder.default.apply("TSModuleDeclaration", arguments); +} + +function tsModuleBlock(body) { + return _builder.default.apply("TSModuleBlock", arguments); +} + +function tsImportType(argument, qualifier, typeParameters) { + return _builder.default.apply("TSImportType", arguments); +} + +function tsImportEqualsDeclaration(id, moduleReference) { + return _builder.default.apply("TSImportEqualsDeclaration", arguments); +} + +function tsExternalModuleReference(expression) { + return _builder.default.apply("TSExternalModuleReference", arguments); +} + +function tsNonNullExpression(expression) { + return _builder.default.apply("TSNonNullExpression", arguments); +} + +function tsExportAssignment(expression) { + return _builder.default.apply("TSExportAssignment", arguments); +} + +function tsNamespaceExportDeclaration(id) { + return _builder.default.apply("TSNamespaceExportDeclaration", arguments); +} + +function tsTypeAnnotation(typeAnnotation) { + return _builder.default.apply("TSTypeAnnotation", arguments); +} + +function tsTypeParameterInstantiation(params) { + return _builder.default.apply("TSTypeParameterInstantiation", arguments); +} + +function tsTypeParameterDeclaration(params) { + return _builder.default.apply("TSTypeParameterDeclaration", arguments); +} + +function tsTypeParameter(constraint, _default, name) { + return _builder.default.apply("TSTypeParameter", arguments); +} + +function NumberLiteral(value) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + return _builder.default.apply("NumberLiteral", arguments); +} + +function RegexLiteral(pattern, flags) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + return _builder.default.apply("RegexLiteral", arguments); +} + +function RestProperty(argument) { + console.trace("The node type RestProperty has been renamed to RestElement"); + return _builder.default.apply("RestProperty", arguments); +} + +function SpreadProperty(argument) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + return _builder.default.apply("SpreadProperty", arguments); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/generated/uppercase.js b/node_modules/@babel/types/lib/builders/generated/uppercase.js new file mode 100644 index 0000000..95c9a52 --- /dev/null +++ b/node_modules/@babel/types/lib/builders/generated/uppercase.js @@ -0,0 +1,1513 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "AnyTypeAnnotation", { + enumerable: true, + get: function () { + return _index.anyTypeAnnotation; + } +}); +Object.defineProperty(exports, "ArgumentPlaceholder", { + enumerable: true, + get: function () { + return _index.argumentPlaceholder; + } +}); +Object.defineProperty(exports, "ArrayExpression", { + enumerable: true, + get: function () { + return _index.arrayExpression; + } +}); +Object.defineProperty(exports, "ArrayPattern", { + enumerable: true, + get: function () { + return _index.arrayPattern; + } +}); +Object.defineProperty(exports, "ArrayTypeAnnotation", { + enumerable: true, + get: function () { + return _index.arrayTypeAnnotation; + } +}); +Object.defineProperty(exports, "ArrowFunctionExpression", { + enumerable: true, + get: function () { + return _index.arrowFunctionExpression; + } +}); +Object.defineProperty(exports, "AssignmentExpression", { + enumerable: true, + get: function () { + return _index.assignmentExpression; + } +}); +Object.defineProperty(exports, "AssignmentPattern", { + enumerable: true, + get: function () { + return _index.assignmentPattern; + } +}); +Object.defineProperty(exports, "AwaitExpression", { + enumerable: true, + get: function () { + return _index.awaitExpression; + } +}); +Object.defineProperty(exports, "BigIntLiteral", { + enumerable: true, + get: function () { + return _index.bigIntLiteral; + } +}); +Object.defineProperty(exports, "BinaryExpression", { + enumerable: true, + get: function () { + return _index.binaryExpression; + } +}); +Object.defineProperty(exports, "BindExpression", { + enumerable: true, + get: function () { + return _index.bindExpression; + } +}); +Object.defineProperty(exports, "BlockStatement", { + enumerable: true, + get: function () { + return _index.blockStatement; + } +}); +Object.defineProperty(exports, "BooleanLiteral", { + enumerable: true, + get: function () { + return _index.booleanLiteral; + } +}); +Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", { + enumerable: true, + get: function () { + return _index.booleanLiteralTypeAnnotation; + } +}); +Object.defineProperty(exports, "BooleanTypeAnnotation", { + enumerable: true, + get: function () { + return _index.booleanTypeAnnotation; + } +}); +Object.defineProperty(exports, "BreakStatement", { + enumerable: true, + get: function () { + return _index.breakStatement; + } +}); +Object.defineProperty(exports, "CallExpression", { + enumerable: true, + get: function () { + return _index.callExpression; + } +}); +Object.defineProperty(exports, "CatchClause", { + enumerable: true, + get: function () { + return _index.catchClause; + } +}); +Object.defineProperty(exports, "ClassAccessorProperty", { + enumerable: true, + get: function () { + return _index.classAccessorProperty; + } +}); +Object.defineProperty(exports, "ClassBody", { + enumerable: true, + get: function () { + return _index.classBody; + } +}); +Object.defineProperty(exports, "ClassDeclaration", { + enumerable: true, + get: function () { + return _index.classDeclaration; + } +}); +Object.defineProperty(exports, "ClassExpression", { + enumerable: true, + get: function () { + return _index.classExpression; + } +}); +Object.defineProperty(exports, "ClassImplements", { + enumerable: true, + get: function () { + return _index.classImplements; + } +}); +Object.defineProperty(exports, "ClassMethod", { + enumerable: true, + get: function () { + return _index.classMethod; + } +}); +Object.defineProperty(exports, "ClassPrivateMethod", { + enumerable: true, + get: function () { + return _index.classPrivateMethod; + } +}); +Object.defineProperty(exports, "ClassPrivateProperty", { + enumerable: true, + get: function () { + return _index.classPrivateProperty; + } +}); +Object.defineProperty(exports, "ClassProperty", { + enumerable: true, + get: function () { + return _index.classProperty; + } +}); +Object.defineProperty(exports, "ConditionalExpression", { + enumerable: true, + get: function () { + return _index.conditionalExpression; + } +}); +Object.defineProperty(exports, "ContinueStatement", { + enumerable: true, + get: function () { + return _index.continueStatement; + } +}); +Object.defineProperty(exports, "DebuggerStatement", { + enumerable: true, + get: function () { + return _index.debuggerStatement; + } +}); +Object.defineProperty(exports, "DecimalLiteral", { + enumerable: true, + get: function () { + return _index.decimalLiteral; + } +}); +Object.defineProperty(exports, "DeclareClass", { + enumerable: true, + get: function () { + return _index.declareClass; + } +}); +Object.defineProperty(exports, "DeclareExportAllDeclaration", { + enumerable: true, + get: function () { + return _index.declareExportAllDeclaration; + } +}); +Object.defineProperty(exports, "DeclareExportDeclaration", { + enumerable: true, + get: function () { + return _index.declareExportDeclaration; + } +}); +Object.defineProperty(exports, "DeclareFunction", { + enumerable: true, + get: function () { + return _index.declareFunction; + } +}); +Object.defineProperty(exports, "DeclareInterface", { + enumerable: true, + get: function () { + return _index.declareInterface; + } +}); +Object.defineProperty(exports, "DeclareModule", { + enumerable: true, + get: function () { + return _index.declareModule; + } +}); +Object.defineProperty(exports, "DeclareModuleExports", { + enumerable: true, + get: function () { + return _index.declareModuleExports; + } +}); +Object.defineProperty(exports, "DeclareOpaqueType", { + enumerable: true, + get: function () { + return _index.declareOpaqueType; + } +}); +Object.defineProperty(exports, "DeclareTypeAlias", { + enumerable: true, + get: function () { + return _index.declareTypeAlias; + } +}); +Object.defineProperty(exports, "DeclareVariable", { + enumerable: true, + get: function () { + return _index.declareVariable; + } +}); +Object.defineProperty(exports, "DeclaredPredicate", { + enumerable: true, + get: function () { + return _index.declaredPredicate; + } +}); +Object.defineProperty(exports, "Decorator", { + enumerable: true, + get: function () { + return _index.decorator; + } +}); +Object.defineProperty(exports, "Directive", { + enumerable: true, + get: function () { + return _index.directive; + } +}); +Object.defineProperty(exports, "DirectiveLiteral", { + enumerable: true, + get: function () { + return _index.directiveLiteral; + } +}); +Object.defineProperty(exports, "DoExpression", { + enumerable: true, + get: function () { + return _index.doExpression; + } +}); +Object.defineProperty(exports, "DoWhileStatement", { + enumerable: true, + get: function () { + return _index.doWhileStatement; + } +}); +Object.defineProperty(exports, "EmptyStatement", { + enumerable: true, + get: function () { + return _index.emptyStatement; + } +}); +Object.defineProperty(exports, "EmptyTypeAnnotation", { + enumerable: true, + get: function () { + return _index.emptyTypeAnnotation; + } +}); +Object.defineProperty(exports, "EnumBooleanBody", { + enumerable: true, + get: function () { + return _index.enumBooleanBody; + } +}); +Object.defineProperty(exports, "EnumBooleanMember", { + enumerable: true, + get: function () { + return _index.enumBooleanMember; + } +}); +Object.defineProperty(exports, "EnumDeclaration", { + enumerable: true, + get: function () { + return _index.enumDeclaration; + } +}); +Object.defineProperty(exports, "EnumDefaultedMember", { + enumerable: true, + get: function () { + return _index.enumDefaultedMember; + } +}); +Object.defineProperty(exports, "EnumNumberBody", { + enumerable: true, + get: function () { + return _index.enumNumberBody; + } +}); +Object.defineProperty(exports, "EnumNumberMember", { + enumerable: true, + get: function () { + return _index.enumNumberMember; + } +}); +Object.defineProperty(exports, "EnumStringBody", { + enumerable: true, + get: function () { + return _index.enumStringBody; + } +}); +Object.defineProperty(exports, "EnumStringMember", { + enumerable: true, + get: function () { + return _index.enumStringMember; + } +}); +Object.defineProperty(exports, "EnumSymbolBody", { + enumerable: true, + get: function () { + return _index.enumSymbolBody; + } +}); +Object.defineProperty(exports, "ExistsTypeAnnotation", { + enumerable: true, + get: function () { + return _index.existsTypeAnnotation; + } +}); +Object.defineProperty(exports, "ExportAllDeclaration", { + enumerable: true, + get: function () { + return _index.exportAllDeclaration; + } +}); +Object.defineProperty(exports, "ExportDefaultDeclaration", { + enumerable: true, + get: function () { + return _index.exportDefaultDeclaration; + } +}); +Object.defineProperty(exports, "ExportDefaultSpecifier", { + enumerable: true, + get: function () { + return _index.exportDefaultSpecifier; + } +}); +Object.defineProperty(exports, "ExportNamedDeclaration", { + enumerable: true, + get: function () { + return _index.exportNamedDeclaration; + } +}); +Object.defineProperty(exports, "ExportNamespaceSpecifier", { + enumerable: true, + get: function () { + return _index.exportNamespaceSpecifier; + } +}); +Object.defineProperty(exports, "ExportSpecifier", { + enumerable: true, + get: function () { + return _index.exportSpecifier; + } +}); +Object.defineProperty(exports, "ExpressionStatement", { + enumerable: true, + get: function () { + return _index.expressionStatement; + } +}); +Object.defineProperty(exports, "File", { + enumerable: true, + get: function () { + return _index.file; + } +}); +Object.defineProperty(exports, "ForInStatement", { + enumerable: true, + get: function () { + return _index.forInStatement; + } +}); +Object.defineProperty(exports, "ForOfStatement", { + enumerable: true, + get: function () { + return _index.forOfStatement; + } +}); +Object.defineProperty(exports, "ForStatement", { + enumerable: true, + get: function () { + return _index.forStatement; + } +}); +Object.defineProperty(exports, "FunctionDeclaration", { + enumerable: true, + get: function () { + return _index.functionDeclaration; + } +}); +Object.defineProperty(exports, "FunctionExpression", { + enumerable: true, + get: function () { + return _index.functionExpression; + } +}); +Object.defineProperty(exports, "FunctionTypeAnnotation", { + enumerable: true, + get: function () { + return _index.functionTypeAnnotation; + } +}); +Object.defineProperty(exports, "FunctionTypeParam", { + enumerable: true, + get: function () { + return _index.functionTypeParam; + } +}); +Object.defineProperty(exports, "GenericTypeAnnotation", { + enumerable: true, + get: function () { + return _index.genericTypeAnnotation; + } +}); +Object.defineProperty(exports, "Identifier", { + enumerable: true, + get: function () { + return _index.identifier; + } +}); +Object.defineProperty(exports, "IfStatement", { + enumerable: true, + get: function () { + return _index.ifStatement; + } +}); +Object.defineProperty(exports, "Import", { + enumerable: true, + get: function () { + return _index.import; + } +}); +Object.defineProperty(exports, "ImportAttribute", { + enumerable: true, + get: function () { + return _index.importAttribute; + } +}); +Object.defineProperty(exports, "ImportDeclaration", { + enumerable: true, + get: function () { + return _index.importDeclaration; + } +}); +Object.defineProperty(exports, "ImportDefaultSpecifier", { + enumerable: true, + get: function () { + return _index.importDefaultSpecifier; + } +}); +Object.defineProperty(exports, "ImportNamespaceSpecifier", { + enumerable: true, + get: function () { + return _index.importNamespaceSpecifier; + } +}); +Object.defineProperty(exports, "ImportSpecifier", { + enumerable: true, + get: function () { + return _index.importSpecifier; + } +}); +Object.defineProperty(exports, "IndexedAccessType", { + enumerable: true, + get: function () { + return _index.indexedAccessType; + } +}); +Object.defineProperty(exports, "InferredPredicate", { + enumerable: true, + get: function () { + return _index.inferredPredicate; + } +}); +Object.defineProperty(exports, "InterfaceDeclaration", { + enumerable: true, + get: function () { + return _index.interfaceDeclaration; + } +}); +Object.defineProperty(exports, "InterfaceExtends", { + enumerable: true, + get: function () { + return _index.interfaceExtends; + } +}); +Object.defineProperty(exports, "InterfaceTypeAnnotation", { + enumerable: true, + get: function () { + return _index.interfaceTypeAnnotation; + } +}); +Object.defineProperty(exports, "InterpreterDirective", { + enumerable: true, + get: function () { + return _index.interpreterDirective; + } +}); +Object.defineProperty(exports, "IntersectionTypeAnnotation", { + enumerable: true, + get: function () { + return _index.intersectionTypeAnnotation; + } +}); +Object.defineProperty(exports, "JSXAttribute", { + enumerable: true, + get: function () { + return _index.jsxAttribute; + } +}); +Object.defineProperty(exports, "JSXClosingElement", { + enumerable: true, + get: function () { + return _index.jsxClosingElement; + } +}); +Object.defineProperty(exports, "JSXClosingFragment", { + enumerable: true, + get: function () { + return _index.jsxClosingFragment; + } +}); +Object.defineProperty(exports, "JSXElement", { + enumerable: true, + get: function () { + return _index.jsxElement; + } +}); +Object.defineProperty(exports, "JSXEmptyExpression", { + enumerable: true, + get: function () { + return _index.jsxEmptyExpression; + } +}); +Object.defineProperty(exports, "JSXExpressionContainer", { + enumerable: true, + get: function () { + return _index.jsxExpressionContainer; + } +}); +Object.defineProperty(exports, "JSXFragment", { + enumerable: true, + get: function () { + return _index.jsxFragment; + } +}); +Object.defineProperty(exports, "JSXIdentifier", { + enumerable: true, + get: function () { + return _index.jsxIdentifier; + } +}); +Object.defineProperty(exports, "JSXMemberExpression", { + enumerable: true, + get: function () { + return _index.jsxMemberExpression; + } +}); +Object.defineProperty(exports, "JSXNamespacedName", { + enumerable: true, + get: function () { + return _index.jsxNamespacedName; + } +}); +Object.defineProperty(exports, "JSXOpeningElement", { + enumerable: true, + get: function () { + return _index.jsxOpeningElement; + } +}); +Object.defineProperty(exports, "JSXOpeningFragment", { + enumerable: true, + get: function () { + return _index.jsxOpeningFragment; + } +}); +Object.defineProperty(exports, "JSXSpreadAttribute", { + enumerable: true, + get: function () { + return _index.jsxSpreadAttribute; + } +}); +Object.defineProperty(exports, "JSXSpreadChild", { + enumerable: true, + get: function () { + return _index.jsxSpreadChild; + } +}); +Object.defineProperty(exports, "JSXText", { + enumerable: true, + get: function () { + return _index.jsxText; + } +}); +Object.defineProperty(exports, "LabeledStatement", { + enumerable: true, + get: function () { + return _index.labeledStatement; + } +}); +Object.defineProperty(exports, "LogicalExpression", { + enumerable: true, + get: function () { + return _index.logicalExpression; + } +}); +Object.defineProperty(exports, "MemberExpression", { + enumerable: true, + get: function () { + return _index.memberExpression; + } +}); +Object.defineProperty(exports, "MetaProperty", { + enumerable: true, + get: function () { + return _index.metaProperty; + } +}); +Object.defineProperty(exports, "MixedTypeAnnotation", { + enumerable: true, + get: function () { + return _index.mixedTypeAnnotation; + } +}); +Object.defineProperty(exports, "ModuleExpression", { + enumerable: true, + get: function () { + return _index.moduleExpression; + } +}); +Object.defineProperty(exports, "NewExpression", { + enumerable: true, + get: function () { + return _index.newExpression; + } +}); +Object.defineProperty(exports, "Noop", { + enumerable: true, + get: function () { + return _index.noop; + } +}); +Object.defineProperty(exports, "NullLiteral", { + enumerable: true, + get: function () { + return _index.nullLiteral; + } +}); +Object.defineProperty(exports, "NullLiteralTypeAnnotation", { + enumerable: true, + get: function () { + return _index.nullLiteralTypeAnnotation; + } +}); +Object.defineProperty(exports, "NullableTypeAnnotation", { + enumerable: true, + get: function () { + return _index.nullableTypeAnnotation; + } +}); +Object.defineProperty(exports, "NumberLiteral", { + enumerable: true, + get: function () { + return _index.numberLiteral; + } +}); +Object.defineProperty(exports, "NumberLiteralTypeAnnotation", { + enumerable: true, + get: function () { + return _index.numberLiteralTypeAnnotation; + } +}); +Object.defineProperty(exports, "NumberTypeAnnotation", { + enumerable: true, + get: function () { + return _index.numberTypeAnnotation; + } +}); +Object.defineProperty(exports, "NumericLiteral", { + enumerable: true, + get: function () { + return _index.numericLiteral; + } +}); +Object.defineProperty(exports, "ObjectExpression", { + enumerable: true, + get: function () { + return _index.objectExpression; + } +}); +Object.defineProperty(exports, "ObjectMethod", { + enumerable: true, + get: function () { + return _index.objectMethod; + } +}); +Object.defineProperty(exports, "ObjectPattern", { + enumerable: true, + get: function () { + return _index.objectPattern; + } +}); +Object.defineProperty(exports, "ObjectProperty", { + enumerable: true, + get: function () { + return _index.objectProperty; + } +}); +Object.defineProperty(exports, "ObjectTypeAnnotation", { + enumerable: true, + get: function () { + return _index.objectTypeAnnotation; + } +}); +Object.defineProperty(exports, "ObjectTypeCallProperty", { + enumerable: true, + get: function () { + return _index.objectTypeCallProperty; + } +}); +Object.defineProperty(exports, "ObjectTypeIndexer", { + enumerable: true, + get: function () { + return _index.objectTypeIndexer; + } +}); +Object.defineProperty(exports, "ObjectTypeInternalSlot", { + enumerable: true, + get: function () { + return _index.objectTypeInternalSlot; + } +}); +Object.defineProperty(exports, "ObjectTypeProperty", { + enumerable: true, + get: function () { + return _index.objectTypeProperty; + } +}); +Object.defineProperty(exports, "ObjectTypeSpreadProperty", { + enumerable: true, + get: function () { + return _index.objectTypeSpreadProperty; + } +}); +Object.defineProperty(exports, "OpaqueType", { + enumerable: true, + get: function () { + return _index.opaqueType; + } +}); +Object.defineProperty(exports, "OptionalCallExpression", { + enumerable: true, + get: function () { + return _index.optionalCallExpression; + } +}); +Object.defineProperty(exports, "OptionalIndexedAccessType", { + enumerable: true, + get: function () { + return _index.optionalIndexedAccessType; + } +}); +Object.defineProperty(exports, "OptionalMemberExpression", { + enumerable: true, + get: function () { + return _index.optionalMemberExpression; + } +}); +Object.defineProperty(exports, "ParenthesizedExpression", { + enumerable: true, + get: function () { + return _index.parenthesizedExpression; + } +}); +Object.defineProperty(exports, "PipelineBareFunction", { + enumerable: true, + get: function () { + return _index.pipelineBareFunction; + } +}); +Object.defineProperty(exports, "PipelinePrimaryTopicReference", { + enumerable: true, + get: function () { + return _index.pipelinePrimaryTopicReference; + } +}); +Object.defineProperty(exports, "PipelineTopicExpression", { + enumerable: true, + get: function () { + return _index.pipelineTopicExpression; + } +}); +Object.defineProperty(exports, "Placeholder", { + enumerable: true, + get: function () { + return _index.placeholder; + } +}); +Object.defineProperty(exports, "PrivateName", { + enumerable: true, + get: function () { + return _index.privateName; + } +}); +Object.defineProperty(exports, "Program", { + enumerable: true, + get: function () { + return _index.program; + } +}); +Object.defineProperty(exports, "QualifiedTypeIdentifier", { + enumerable: true, + get: function () { + return _index.qualifiedTypeIdentifier; + } +}); +Object.defineProperty(exports, "RecordExpression", { + enumerable: true, + get: function () { + return _index.recordExpression; + } +}); +Object.defineProperty(exports, "RegExpLiteral", { + enumerable: true, + get: function () { + return _index.regExpLiteral; + } +}); +Object.defineProperty(exports, "RegexLiteral", { + enumerable: true, + get: function () { + return _index.regexLiteral; + } +}); +Object.defineProperty(exports, "RestElement", { + enumerable: true, + get: function () { + return _index.restElement; + } +}); +Object.defineProperty(exports, "RestProperty", { + enumerable: true, + get: function () { + return _index.restProperty; + } +}); +Object.defineProperty(exports, "ReturnStatement", { + enumerable: true, + get: function () { + return _index.returnStatement; + } +}); +Object.defineProperty(exports, "SequenceExpression", { + enumerable: true, + get: function () { + return _index.sequenceExpression; + } +}); +Object.defineProperty(exports, "SpreadElement", { + enumerable: true, + get: function () { + return _index.spreadElement; + } +}); +Object.defineProperty(exports, "SpreadProperty", { + enumerable: true, + get: function () { + return _index.spreadProperty; + } +}); +Object.defineProperty(exports, "StaticBlock", { + enumerable: true, + get: function () { + return _index.staticBlock; + } +}); +Object.defineProperty(exports, "StringLiteral", { + enumerable: true, + get: function () { + return _index.stringLiteral; + } +}); +Object.defineProperty(exports, "StringLiteralTypeAnnotation", { + enumerable: true, + get: function () { + return _index.stringLiteralTypeAnnotation; + } +}); +Object.defineProperty(exports, "StringTypeAnnotation", { + enumerable: true, + get: function () { + return _index.stringTypeAnnotation; + } +}); +Object.defineProperty(exports, "Super", { + enumerable: true, + get: function () { + return _index.super; + } +}); +Object.defineProperty(exports, "SwitchCase", { + enumerable: true, + get: function () { + return _index.switchCase; + } +}); +Object.defineProperty(exports, "SwitchStatement", { + enumerable: true, + get: function () { + return _index.switchStatement; + } +}); +Object.defineProperty(exports, "SymbolTypeAnnotation", { + enumerable: true, + get: function () { + return _index.symbolTypeAnnotation; + } +}); +Object.defineProperty(exports, "TSAnyKeyword", { + enumerable: true, + get: function () { + return _index.tsAnyKeyword; + } +}); +Object.defineProperty(exports, "TSArrayType", { + enumerable: true, + get: function () { + return _index.tsArrayType; + } +}); +Object.defineProperty(exports, "TSAsExpression", { + enumerable: true, + get: function () { + return _index.tsAsExpression; + } +}); +Object.defineProperty(exports, "TSBigIntKeyword", { + enumerable: true, + get: function () { + return _index.tsBigIntKeyword; + } +}); +Object.defineProperty(exports, "TSBooleanKeyword", { + enumerable: true, + get: function () { + return _index.tsBooleanKeyword; + } +}); +Object.defineProperty(exports, "TSCallSignatureDeclaration", { + enumerable: true, + get: function () { + return _index.tsCallSignatureDeclaration; + } +}); +Object.defineProperty(exports, "TSConditionalType", { + enumerable: true, + get: function () { + return _index.tsConditionalType; + } +}); +Object.defineProperty(exports, "TSConstructSignatureDeclaration", { + enumerable: true, + get: function () { + return _index.tsConstructSignatureDeclaration; + } +}); +Object.defineProperty(exports, "TSConstructorType", { + enumerable: true, + get: function () { + return _index.tsConstructorType; + } +}); +Object.defineProperty(exports, "TSDeclareFunction", { + enumerable: true, + get: function () { + return _index.tsDeclareFunction; + } +}); +Object.defineProperty(exports, "TSDeclareMethod", { + enumerable: true, + get: function () { + return _index.tsDeclareMethod; + } +}); +Object.defineProperty(exports, "TSEnumDeclaration", { + enumerable: true, + get: function () { + return _index.tsEnumDeclaration; + } +}); +Object.defineProperty(exports, "TSEnumMember", { + enumerable: true, + get: function () { + return _index.tsEnumMember; + } +}); +Object.defineProperty(exports, "TSExportAssignment", { + enumerable: true, + get: function () { + return _index.tsExportAssignment; + } +}); +Object.defineProperty(exports, "TSExpressionWithTypeArguments", { + enumerable: true, + get: function () { + return _index.tsExpressionWithTypeArguments; + } +}); +Object.defineProperty(exports, "TSExternalModuleReference", { + enumerable: true, + get: function () { + return _index.tsExternalModuleReference; + } +}); +Object.defineProperty(exports, "TSFunctionType", { + enumerable: true, + get: function () { + return _index.tsFunctionType; + } +}); +Object.defineProperty(exports, "TSImportEqualsDeclaration", { + enumerable: true, + get: function () { + return _index.tsImportEqualsDeclaration; + } +}); +Object.defineProperty(exports, "TSImportType", { + enumerable: true, + get: function () { + return _index.tsImportType; + } +}); +Object.defineProperty(exports, "TSIndexSignature", { + enumerable: true, + get: function () { + return _index.tsIndexSignature; + } +}); +Object.defineProperty(exports, "TSIndexedAccessType", { + enumerable: true, + get: function () { + return _index.tsIndexedAccessType; + } +}); +Object.defineProperty(exports, "TSInferType", { + enumerable: true, + get: function () { + return _index.tsInferType; + } +}); +Object.defineProperty(exports, "TSInterfaceBody", { + enumerable: true, + get: function () { + return _index.tsInterfaceBody; + } +}); +Object.defineProperty(exports, "TSInterfaceDeclaration", { + enumerable: true, + get: function () { + return _index.tsInterfaceDeclaration; + } +}); +Object.defineProperty(exports, "TSIntersectionType", { + enumerable: true, + get: function () { + return _index.tsIntersectionType; + } +}); +Object.defineProperty(exports, "TSIntrinsicKeyword", { + enumerable: true, + get: function () { + return _index.tsIntrinsicKeyword; + } +}); +Object.defineProperty(exports, "TSLiteralType", { + enumerable: true, + get: function () { + return _index.tsLiteralType; + } +}); +Object.defineProperty(exports, "TSMappedType", { + enumerable: true, + get: function () { + return _index.tsMappedType; + } +}); +Object.defineProperty(exports, "TSMethodSignature", { + enumerable: true, + get: function () { + return _index.tsMethodSignature; + } +}); +Object.defineProperty(exports, "TSModuleBlock", { + enumerable: true, + get: function () { + return _index.tsModuleBlock; + } +}); +Object.defineProperty(exports, "TSModuleDeclaration", { + enumerable: true, + get: function () { + return _index.tsModuleDeclaration; + } +}); +Object.defineProperty(exports, "TSNamedTupleMember", { + enumerable: true, + get: function () { + return _index.tsNamedTupleMember; + } +}); +Object.defineProperty(exports, "TSNamespaceExportDeclaration", { + enumerable: true, + get: function () { + return _index.tsNamespaceExportDeclaration; + } +}); +Object.defineProperty(exports, "TSNeverKeyword", { + enumerable: true, + get: function () { + return _index.tsNeverKeyword; + } +}); +Object.defineProperty(exports, "TSNonNullExpression", { + enumerable: true, + get: function () { + return _index.tsNonNullExpression; + } +}); +Object.defineProperty(exports, "TSNullKeyword", { + enumerable: true, + get: function () { + return _index.tsNullKeyword; + } +}); +Object.defineProperty(exports, "TSNumberKeyword", { + enumerable: true, + get: function () { + return _index.tsNumberKeyword; + } +}); +Object.defineProperty(exports, "TSObjectKeyword", { + enumerable: true, + get: function () { + return _index.tsObjectKeyword; + } +}); +Object.defineProperty(exports, "TSOptionalType", { + enumerable: true, + get: function () { + return _index.tsOptionalType; + } +}); +Object.defineProperty(exports, "TSParameterProperty", { + enumerable: true, + get: function () { + return _index.tsParameterProperty; + } +}); +Object.defineProperty(exports, "TSParenthesizedType", { + enumerable: true, + get: function () { + return _index.tsParenthesizedType; + } +}); +Object.defineProperty(exports, "TSPropertySignature", { + enumerable: true, + get: function () { + return _index.tsPropertySignature; + } +}); +Object.defineProperty(exports, "TSQualifiedName", { + enumerable: true, + get: function () { + return _index.tsQualifiedName; + } +}); +Object.defineProperty(exports, "TSRestType", { + enumerable: true, + get: function () { + return _index.tsRestType; + } +}); +Object.defineProperty(exports, "TSStringKeyword", { + enumerable: true, + get: function () { + return _index.tsStringKeyword; + } +}); +Object.defineProperty(exports, "TSSymbolKeyword", { + enumerable: true, + get: function () { + return _index.tsSymbolKeyword; + } +}); +Object.defineProperty(exports, "TSThisType", { + enumerable: true, + get: function () { + return _index.tsThisType; + } +}); +Object.defineProperty(exports, "TSTupleType", { + enumerable: true, + get: function () { + return _index.tsTupleType; + } +}); +Object.defineProperty(exports, "TSTypeAliasDeclaration", { + enumerable: true, + get: function () { + return _index.tsTypeAliasDeclaration; + } +}); +Object.defineProperty(exports, "TSTypeAnnotation", { + enumerable: true, + get: function () { + return _index.tsTypeAnnotation; + } +}); +Object.defineProperty(exports, "TSTypeAssertion", { + enumerable: true, + get: function () { + return _index.tsTypeAssertion; + } +}); +Object.defineProperty(exports, "TSTypeLiteral", { + enumerable: true, + get: function () { + return _index.tsTypeLiteral; + } +}); +Object.defineProperty(exports, "TSTypeOperator", { + enumerable: true, + get: function () { + return _index.tsTypeOperator; + } +}); +Object.defineProperty(exports, "TSTypeParameter", { + enumerable: true, + get: function () { + return _index.tsTypeParameter; + } +}); +Object.defineProperty(exports, "TSTypeParameterDeclaration", { + enumerable: true, + get: function () { + return _index.tsTypeParameterDeclaration; + } +}); +Object.defineProperty(exports, "TSTypeParameterInstantiation", { + enumerable: true, + get: function () { + return _index.tsTypeParameterInstantiation; + } +}); +Object.defineProperty(exports, "TSTypePredicate", { + enumerable: true, + get: function () { + return _index.tsTypePredicate; + } +}); +Object.defineProperty(exports, "TSTypeQuery", { + enumerable: true, + get: function () { + return _index.tsTypeQuery; + } +}); +Object.defineProperty(exports, "TSTypeReference", { + enumerable: true, + get: function () { + return _index.tsTypeReference; + } +}); +Object.defineProperty(exports, "TSUndefinedKeyword", { + enumerable: true, + get: function () { + return _index.tsUndefinedKeyword; + } +}); +Object.defineProperty(exports, "TSUnionType", { + enumerable: true, + get: function () { + return _index.tsUnionType; + } +}); +Object.defineProperty(exports, "TSUnknownKeyword", { + enumerable: true, + get: function () { + return _index.tsUnknownKeyword; + } +}); +Object.defineProperty(exports, "TSVoidKeyword", { + enumerable: true, + get: function () { + return _index.tsVoidKeyword; + } +}); +Object.defineProperty(exports, "TaggedTemplateExpression", { + enumerable: true, + get: function () { + return _index.taggedTemplateExpression; + } +}); +Object.defineProperty(exports, "TemplateElement", { + enumerable: true, + get: function () { + return _index.templateElement; + } +}); +Object.defineProperty(exports, "TemplateLiteral", { + enumerable: true, + get: function () { + return _index.templateLiteral; + } +}); +Object.defineProperty(exports, "ThisExpression", { + enumerable: true, + get: function () { + return _index.thisExpression; + } +}); +Object.defineProperty(exports, "ThisTypeAnnotation", { + enumerable: true, + get: function () { + return _index.thisTypeAnnotation; + } +}); +Object.defineProperty(exports, "ThrowStatement", { + enumerable: true, + get: function () { + return _index.throwStatement; + } +}); +Object.defineProperty(exports, "TopicReference", { + enumerable: true, + get: function () { + return _index.topicReference; + } +}); +Object.defineProperty(exports, "TryStatement", { + enumerable: true, + get: function () { + return _index.tryStatement; + } +}); +Object.defineProperty(exports, "TupleExpression", { + enumerable: true, + get: function () { + return _index.tupleExpression; + } +}); +Object.defineProperty(exports, "TupleTypeAnnotation", { + enumerable: true, + get: function () { + return _index.tupleTypeAnnotation; + } +}); +Object.defineProperty(exports, "TypeAlias", { + enumerable: true, + get: function () { + return _index.typeAlias; + } +}); +Object.defineProperty(exports, "TypeAnnotation", { + enumerable: true, + get: function () { + return _index.typeAnnotation; + } +}); +Object.defineProperty(exports, "TypeCastExpression", { + enumerable: true, + get: function () { + return _index.typeCastExpression; + } +}); +Object.defineProperty(exports, "TypeParameter", { + enumerable: true, + get: function () { + return _index.typeParameter; + } +}); +Object.defineProperty(exports, "TypeParameterDeclaration", { + enumerable: true, + get: function () { + return _index.typeParameterDeclaration; + } +}); +Object.defineProperty(exports, "TypeParameterInstantiation", { + enumerable: true, + get: function () { + return _index.typeParameterInstantiation; + } +}); +Object.defineProperty(exports, "TypeofTypeAnnotation", { + enumerable: true, + get: function () { + return _index.typeofTypeAnnotation; + } +}); +Object.defineProperty(exports, "UnaryExpression", { + enumerable: true, + get: function () { + return _index.unaryExpression; + } +}); +Object.defineProperty(exports, "UnionTypeAnnotation", { + enumerable: true, + get: function () { + return _index.unionTypeAnnotation; + } +}); +Object.defineProperty(exports, "UpdateExpression", { + enumerable: true, + get: function () { + return _index.updateExpression; + } +}); +Object.defineProperty(exports, "V8IntrinsicIdentifier", { + enumerable: true, + get: function () { + return _index.v8IntrinsicIdentifier; + } +}); +Object.defineProperty(exports, "VariableDeclaration", { + enumerable: true, + get: function () { + return _index.variableDeclaration; + } +}); +Object.defineProperty(exports, "VariableDeclarator", { + enumerable: true, + get: function () { + return _index.variableDeclarator; + } +}); +Object.defineProperty(exports, "Variance", { + enumerable: true, + get: function () { + return _index.variance; + } +}); +Object.defineProperty(exports, "VoidTypeAnnotation", { + enumerable: true, + get: function () { + return _index.voidTypeAnnotation; + } +}); +Object.defineProperty(exports, "WhileStatement", { + enumerable: true, + get: function () { + return _index.whileStatement; + } +}); +Object.defineProperty(exports, "WithStatement", { + enumerable: true, + get: function () { + return _index.withStatement; + } +}); +Object.defineProperty(exports, "YieldExpression", { + enumerable: true, + get: function () { + return _index.yieldExpression; + } +}); + +var _index = require("./index");
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/react/buildChildren.js b/node_modules/@babel/types/lib/builders/react/buildChildren.js new file mode 100644 index 0000000..20a194b --- /dev/null +++ b/node_modules/@babel/types/lib/builders/react/buildChildren.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildChildren; + +var _generated = require("../../validators/generated"); + +var _cleanJSXElementLiteralChild = require("../../utils/react/cleanJSXElementLiteralChild"); + +function buildChildren(node) { + const elements = []; + + for (let i = 0; i < node.children.length; i++) { + let child = node.children[i]; + + if ((0, _generated.isJSXText)(child)) { + (0, _cleanJSXElementLiteralChild.default)(child, elements); + continue; + } + + if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression; + if ((0, _generated.isJSXEmptyExpression)(child)) continue; + elements.push(child); + } + + return elements; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js b/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js new file mode 100644 index 0000000..9b53be2 --- /dev/null +++ b/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createTSUnionType; + +var _generated = require("../generated"); + +var _removeTypeDuplicates = require("../../modifications/typescript/removeTypeDuplicates"); + +function createTSUnionType(typeAnnotations) { + const types = typeAnnotations.map(type => type.typeAnnotation); + const flattened = (0, _removeTypeDuplicates.default)(types); + + if (flattened.length === 1) { + return flattened[0]; + } else { + return (0, _generated.tsUnionType)(flattened); + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/clone.js b/node_modules/@babel/types/lib/clone/clone.js new file mode 100644 index 0000000..e262c63 --- /dev/null +++ b/node_modules/@babel/types/lib/clone/clone.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = clone; + +var _cloneNode = require("./cloneNode"); + +function clone(node) { + return (0, _cloneNode.default)(node, false); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneDeep.js b/node_modules/@babel/types/lib/clone/cloneDeep.js new file mode 100644 index 0000000..9067e7b --- /dev/null +++ b/node_modules/@babel/types/lib/clone/cloneDeep.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneDeep; + +var _cloneNode = require("./cloneNode"); + +function cloneDeep(node) { + return (0, _cloneNode.default)(node); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js b/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js new file mode 100644 index 0000000..a8c53dd --- /dev/null +++ b/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneDeepWithoutLoc; + +var _cloneNode = require("./cloneNode"); + +function cloneDeepWithoutLoc(node) { + return (0, _cloneNode.default)(node, true, true); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneNode.js b/node_modules/@babel/types/lib/clone/cloneNode.js new file mode 100644 index 0000000..5980f2d --- /dev/null +++ b/node_modules/@babel/types/lib/clone/cloneNode.js @@ -0,0 +1,114 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneNode; + +var _definitions = require("../definitions"); + +var _generated = require("../validators/generated"); + +const has = Function.call.bind(Object.prototype.hasOwnProperty); + +function cloneIfNode(obj, deep, withoutLoc) { + if (obj && typeof obj.type === "string") { + return cloneNode(obj, deep, withoutLoc); + } + + return obj; +} + +function cloneIfNodeOrArray(obj, deep, withoutLoc) { + if (Array.isArray(obj)) { + return obj.map(node => cloneIfNode(node, deep, withoutLoc)); + } + + return cloneIfNode(obj, deep, withoutLoc); +} + +function cloneNode(node, deep = true, withoutLoc = false) { + if (!node) return node; + const { + type + } = node; + const newNode = { + type: node.type + }; + + if ((0, _generated.isIdentifier)(node)) { + newNode.name = node.name; + + if (has(node, "optional") && typeof node.optional === "boolean") { + newNode.optional = node.optional; + } + + if (has(node, "typeAnnotation")) { + newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation; + } + } else if (!has(_definitions.NODE_FIELDS, type)) { + throw new Error(`Unknown node type: "${type}"`); + } else { + for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { + if (has(node, field)) { + if (deep) { + newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc); + } else { + newNode[field] = node[field]; + } + } + } + } + + if (has(node, "loc")) { + if (withoutLoc) { + newNode.loc = null; + } else { + newNode.loc = node.loc; + } + } + + if (has(node, "leadingComments")) { + newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc); + } + + if (has(node, "innerComments")) { + newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc); + } + + if (has(node, "trailingComments")) { + newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc); + } + + if (has(node, "extra")) { + newNode.extra = Object.assign({}, node.extra); + } + + return newNode; +} + +function maybeCloneComments(comments, deep, withoutLoc) { + if (!comments || !deep) { + return comments; + } + + return comments.map(({ + type, + value, + loc + }) => { + if (withoutLoc) { + return { + type, + value, + loc: null + }; + } + + return { + type, + value, + loc + }; + }); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js new file mode 100644 index 0000000..d0420b1 --- /dev/null +++ b/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneWithoutLoc; + +var _cloneNode = require("./cloneNode"); + +function cloneWithoutLoc(node) { + return (0, _cloneNode.default)(node, false, true); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/addComment.js b/node_modules/@babel/types/lib/comments/addComment.js new file mode 100644 index 0000000..de19ab7 --- /dev/null +++ b/node_modules/@babel/types/lib/comments/addComment.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addComment; + +var _addComments = require("./addComments"); + +function addComment(node, type, content, line) { + return (0, _addComments.default)(node, type, [{ + type: line ? "CommentLine" : "CommentBlock", + value: content + }]); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/addComments.js b/node_modules/@babel/types/lib/comments/addComments.js new file mode 100644 index 0000000..26c456f --- /dev/null +++ b/node_modules/@babel/types/lib/comments/addComments.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addComments; + +function addComments(node, type, comments) { + if (!comments || !node) return node; + const key = `${type}Comments`; + + if (node[key]) { + if (type === "leading") { + node[key] = comments.concat(node[key]); + } else { + node[key].push(...comments); + } + } else { + node[key] = comments; + } + + return node; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/inheritInnerComments.js b/node_modules/@babel/types/lib/comments/inheritInnerComments.js new file mode 100644 index 0000000..4b5dc9c --- /dev/null +++ b/node_modules/@babel/types/lib/comments/inheritInnerComments.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritInnerComments; + +var _inherit = require("../utils/inherit"); + +function inheritInnerComments(child, parent) { + (0, _inherit.default)("innerComments", child, parent); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/inheritLeadingComments.js b/node_modules/@babel/types/lib/comments/inheritLeadingComments.js new file mode 100644 index 0000000..6aa2b25 --- /dev/null +++ b/node_modules/@babel/types/lib/comments/inheritLeadingComments.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritLeadingComments; + +var _inherit = require("../utils/inherit"); + +function inheritLeadingComments(child, parent) { + (0, _inherit.default)("leadingComments", child, parent); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/inheritTrailingComments.js b/node_modules/@babel/types/lib/comments/inheritTrailingComments.js new file mode 100644 index 0000000..934ef0b --- /dev/null +++ b/node_modules/@babel/types/lib/comments/inheritTrailingComments.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritTrailingComments; + +var _inherit = require("../utils/inherit"); + +function inheritTrailingComments(child, parent) { + (0, _inherit.default)("trailingComments", child, parent); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/inheritsComments.js b/node_modules/@babel/types/lib/comments/inheritsComments.js new file mode 100644 index 0000000..49476cf --- /dev/null +++ b/node_modules/@babel/types/lib/comments/inheritsComments.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritsComments; + +var _inheritTrailingComments = require("./inheritTrailingComments"); + +var _inheritLeadingComments = require("./inheritLeadingComments"); + +var _inheritInnerComments = require("./inheritInnerComments"); + +function inheritsComments(child, parent) { + (0, _inheritTrailingComments.default)(child, parent); + (0, _inheritLeadingComments.default)(child, parent); + (0, _inheritInnerComments.default)(child, parent); + return child; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/removeComments.js b/node_modules/@babel/types/lib/comments/removeComments.js new file mode 100644 index 0000000..fe34f1a --- /dev/null +++ b/node_modules/@babel/types/lib/comments/removeComments.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeComments; + +var _constants = require("../constants"); + +function removeComments(node) { + _constants.COMMENT_KEYS.forEach(key => { + node[key] = null; + }); + + return node; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/constants/generated/index.js b/node_modules/@babel/types/lib/constants/generated/index.js new file mode 100644 index 0000000..1e109e6 --- /dev/null +++ b/node_modules/@babel/types/lib/constants/generated/index.js @@ -0,0 +1,107 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WHILE_TYPES = exports.USERWHITESPACABLE_TYPES = exports.UNARYLIKE_TYPES = exports.TYPESCRIPT_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.TSENTITYNAME_TYPES = exports.TSBASETYPE_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.STANDARDIZED_TYPES = exports.SCOPABLE_TYPES = exports.PUREISH_TYPES = exports.PROPERTY_TYPES = exports.PRIVATE_TYPES = exports.PATTERN_TYPES = exports.PATTERNLIKE_TYPES = exports.OBJECTMEMBER_TYPES = exports.MODULESPECIFIER_TYPES = exports.MODULEDECLARATION_TYPES = exports.MISCELLANEOUS_TYPES = exports.METHOD_TYPES = exports.LVAL_TYPES = exports.LOOP_TYPES = exports.LITERAL_TYPES = exports.JSX_TYPES = exports.IMMUTABLE_TYPES = exports.FUNCTION_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FOR_TYPES = exports.FORXSTATEMENT_TYPES = exports.FLOW_TYPES = exports.FLOWTYPE_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.EXPRESSION_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.DECLARATION_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.CLASS_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.BINARY_TYPES = exports.ACCESSOR_TYPES = void 0; + +var _definitions = require("../../definitions"); + +const STANDARDIZED_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Standardized"]; +exports.STANDARDIZED_TYPES = STANDARDIZED_TYPES; +const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; +exports.EXPRESSION_TYPES = EXPRESSION_TYPES; +const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; +exports.BINARY_TYPES = BINARY_TYPES; +const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; +exports.SCOPABLE_TYPES = SCOPABLE_TYPES; +const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; +exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; +const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; +exports.BLOCK_TYPES = BLOCK_TYPES; +const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; +exports.STATEMENT_TYPES = STATEMENT_TYPES; +const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; +exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; +const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; +exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; +const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; +exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; +const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; +exports.LOOP_TYPES = LOOP_TYPES; +const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; +exports.WHILE_TYPES = WHILE_TYPES; +const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; +exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; +const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; +exports.FOR_TYPES = FOR_TYPES; +const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; +exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; +const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; +exports.FUNCTION_TYPES = FUNCTION_TYPES; +const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; +exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; +const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; +exports.PUREISH_TYPES = PUREISH_TYPES; +const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; +exports.DECLARATION_TYPES = DECLARATION_TYPES; +const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; +exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; +const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; +exports.LVAL_TYPES = LVAL_TYPES; +const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; +exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; +const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; +exports.LITERAL_TYPES = LITERAL_TYPES; +const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; +exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; +const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; +exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; +const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; +exports.METHOD_TYPES = METHOD_TYPES; +const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; +exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; +const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; +exports.PROPERTY_TYPES = PROPERTY_TYPES; +const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; +exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; +const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; +exports.PATTERN_TYPES = PATTERN_TYPES; +const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; +exports.CLASS_TYPES = CLASS_TYPES; +const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; +exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; +const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; +exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; +const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; +exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; +const ACCESSOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Accessor"]; +exports.ACCESSOR_TYPES = ACCESSOR_TYPES; +const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; +exports.PRIVATE_TYPES = PRIVATE_TYPES; +const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; +exports.FLOW_TYPES = FLOW_TYPES; +const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; +exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; +const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; +exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; +const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; +exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; +const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; +exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; +const ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"]; +exports.ENUMBODY_TYPES = ENUMBODY_TYPES; +const ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"]; +exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES; +const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; +exports.JSX_TYPES = JSX_TYPES; +const MISCELLANEOUS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Miscellaneous"]; +exports.MISCELLANEOUS_TYPES = MISCELLANEOUS_TYPES; +const TYPESCRIPT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TypeScript"]; +exports.TYPESCRIPT_TYPES = TYPESCRIPT_TYPES; +const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; +exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; +const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; +exports.TSTYPE_TYPES = TSTYPE_TYPES; +const TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"]; +exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/constants/index.js b/node_modules/@babel/types/lib/constants/index.js new file mode 100644 index 0000000..3caa438 --- /dev/null +++ b/node_modules/@babel/types/lib/constants/index.js @@ -0,0 +1,49 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UPDATE_OPERATORS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.STATEMENT_OR_BLOCK_KEYS = exports.NUMBER_UNARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.NOT_LOCAL_BINDING = exports.LOGICAL_OPERATORS = exports.INHERIT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.EQUALITY_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.COMMENT_KEYS = exports.BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.BLOCK_SCOPED_SYMBOL = exports.BINARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = void 0; +const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; +exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; +const FLATTENABLE_KEYS = ["body", "expressions"]; +exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; +const FOR_INIT_KEYS = ["left", "init"]; +exports.FOR_INIT_KEYS = FOR_INIT_KEYS; +const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; +exports.COMMENT_KEYS = COMMENT_KEYS; +const LOGICAL_OPERATORS = ["||", "&&", "??"]; +exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; +const UPDATE_OPERATORS = ["++", "--"]; +exports.UPDATE_OPERATORS = UPDATE_OPERATORS; +const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; +exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; +const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; +exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; +const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; +exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; +const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; +exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; +const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; +exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; +const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; +exports.BINARY_OPERATORS = BINARY_OPERATORS; +const ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map(op => op + "="), ...LOGICAL_OPERATORS.map(op => op + "=")]; +exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS; +const BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; +exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; +const NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; +exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; +const STRING_UNARY_OPERATORS = ["typeof"]; +exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; +const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; +exports.UNARY_OPERATORS = UNARY_OPERATORS; +const INHERIT_KEYS = { + optional: ["typeAnnotation", "typeParameters", "returnType"], + force: ["start", "loc", "end"] +}; +exports.INHERIT_KEYS = INHERIT_KEYS; +const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); +exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; +const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); +exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/Scope.js b/node_modules/@babel/types/lib/converters/Scope.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/node_modules/@babel/types/lib/converters/Scope.js diff --git a/node_modules/@babel/types/lib/converters/ensureBlock.js b/node_modules/@babel/types/lib/converters/ensureBlock.js new file mode 100644 index 0000000..56fdf1f --- /dev/null +++ b/node_modules/@babel/types/lib/converters/ensureBlock.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ensureBlock; + +var _toBlock = require("./toBlock"); + +function ensureBlock(node, key = "body") { + return node[key] = (0, _toBlock.default)(node[key], node); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js new file mode 100644 index 0000000..379e5ff --- /dev/null +++ b/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js @@ -0,0 +1,75 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gatherSequenceExpressions; + +var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers"); + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +var _cloneNode = require("../clone/cloneNode"); + +function gatherSequenceExpressions(nodes, scope, declars) { + const exprs = []; + let ensureLastUndefined = true; + + for (const node of nodes) { + if (!(0, _generated.isEmptyStatement)(node)) { + ensureLastUndefined = false; + } + + if ((0, _generated.isExpression)(node)) { + exprs.push(node); + } else if ((0, _generated.isExpressionStatement)(node)) { + exprs.push(node.expression); + } else if ((0, _generated.isVariableDeclaration)(node)) { + if (node.kind !== "var") return; + + for (const declar of node.declarations) { + const bindings = (0, _getBindingIdentifiers.default)(declar); + + for (const key of Object.keys(bindings)) { + declars.push({ + kind: node.kind, + id: (0, _cloneNode.default)(bindings[key]) + }); + } + + if (declar.init) { + exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); + } + } + + ensureLastUndefined = true; + } else if ((0, _generated.isIfStatement)(node)) { + const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); + const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); + if (!consequent || !alternate) return; + exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); + } else if ((0, _generated.isBlockStatement)(node)) { + const body = gatherSequenceExpressions(node.body, scope, declars); + if (!body) return; + exprs.push(body); + } else if ((0, _generated.isEmptyStatement)(node)) { + if (nodes.indexOf(node) === 0) { + ensureLastUndefined = true; + } + } else { + return; + } + } + + if (ensureLastUndefined) { + exprs.push(scope.buildUndefinedNode()); + } + + if (exprs.length === 1) { + return exprs[0]; + } else { + return (0, _generated2.sequenceExpression)(exprs); + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js b/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js new file mode 100644 index 0000000..6bbce6e --- /dev/null +++ b/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBindingIdentifierName; + +var _toIdentifier = require("./toIdentifier"); + +function toBindingIdentifierName(name) { + name = (0, _toIdentifier.default)(name); + if (name === "eval" || name === "arguments") name = "_" + name; + return name; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toBlock.js b/node_modules/@babel/types/lib/converters/toBlock.js new file mode 100644 index 0000000..1988683 --- /dev/null +++ b/node_modules/@babel/types/lib/converters/toBlock.js @@ -0,0 +1,34 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBlock; + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +function toBlock(node, parent) { + if ((0, _generated.isBlockStatement)(node)) { + return node; + } + + let blockNodes = []; + + if ((0, _generated.isEmptyStatement)(node)) { + blockNodes = []; + } else { + if (!(0, _generated.isStatement)(node)) { + if ((0, _generated.isFunction)(parent)) { + node = (0, _generated2.returnStatement)(node); + } else { + node = (0, _generated2.expressionStatement)(node); + } + } + + blockNodes = [node]; + } + + return (0, _generated2.blockStatement)(blockNodes); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toComputedKey.js b/node_modules/@babel/types/lib/converters/toComputedKey.js new file mode 100644 index 0000000..31e6770 --- /dev/null +++ b/node_modules/@babel/types/lib/converters/toComputedKey.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toComputedKey; + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +function toComputedKey(node, key = node.key || node.property) { + if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); + return key; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toExpression.js b/node_modules/@babel/types/lib/converters/toExpression.js new file mode 100644 index 0000000..2d944f0 --- /dev/null +++ b/node_modules/@babel/types/lib/converters/toExpression.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _generated = require("../validators/generated"); + +var _default = toExpression; +exports.default = _default; + +function toExpression(node) { + if ((0, _generated.isExpressionStatement)(node)) { + node = node.expression; + } + + if ((0, _generated.isExpression)(node)) { + return node; + } + + if ((0, _generated.isClass)(node)) { + node.type = "ClassExpression"; + } else if ((0, _generated.isFunction)(node)) { + node.type = "FunctionExpression"; + } + + if (!(0, _generated.isExpression)(node)) { + throw new Error(`cannot turn ${node.type} to an expression`); + } + + return node; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toIdentifier.js b/node_modules/@babel/types/lib/converters/toIdentifier.js new file mode 100644 index 0000000..2fd4028 --- /dev/null +++ b/node_modules/@babel/types/lib/converters/toIdentifier.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toIdentifier; + +var _isValidIdentifier = require("../validators/isValidIdentifier"); + +var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); + +function toIdentifier(input) { + input = input + ""; + let name = ""; + + for (const c of input) { + name += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-"; + } + + name = name.replace(/^[-0-9]+/, ""); + name = name.replace(/[-\s]+(.)?/g, function (match, c) { + return c ? c.toUpperCase() : ""; + }); + + if (!(0, _isValidIdentifier.default)(name)) { + name = `_${name}`; + } + + return name || "_"; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toKeyAlias.js b/node_modules/@babel/types/lib/converters/toKeyAlias.js new file mode 100644 index 0000000..49ef4b8 --- /dev/null +++ b/node_modules/@babel/types/lib/converters/toKeyAlias.js @@ -0,0 +1,46 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toKeyAlias; + +var _generated = require("../validators/generated"); + +var _cloneNode = require("../clone/cloneNode"); + +var _removePropertiesDeep = require("../modifications/removePropertiesDeep"); + +function toKeyAlias(node, key = node.key) { + let alias; + + if (node.kind === "method") { + return toKeyAlias.increment() + ""; + } else if ((0, _generated.isIdentifier)(key)) { + alias = key.name; + } else if ((0, _generated.isStringLiteral)(key)) { + alias = JSON.stringify(key.value); + } else { + alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key))); + } + + if (node.computed) { + alias = `[${alias}]`; + } + + if (node.static) { + alias = `static:${alias}`; + } + + return alias; +} + +toKeyAlias.uid = 0; + +toKeyAlias.increment = function () { + if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { + return toKeyAlias.uid = 0; + } else { + return toKeyAlias.uid++; + } +};
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/node_modules/@babel/types/lib/converters/toSequenceExpression.js new file mode 100644 index 0000000..c3d3133 --- /dev/null +++ b/node_modules/@babel/types/lib/converters/toSequenceExpression.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toSequenceExpression; + +var _gatherSequenceExpressions = require("./gatherSequenceExpressions"); + +function toSequenceExpression(nodes, scope) { + if (!(nodes != null && nodes.length)) return; + const declars = []; + const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); + if (!result) return; + + for (const declar of declars) { + scope.push(declar); + } + + return result; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toStatement.js b/node_modules/@babel/types/lib/converters/toStatement.js new file mode 100644 index 0000000..da020a6 --- /dev/null +++ b/node_modules/@babel/types/lib/converters/toStatement.js @@ -0,0 +1,47 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +var _default = toStatement; +exports.default = _default; + +function toStatement(node, ignore) { + if ((0, _generated.isStatement)(node)) { + return node; + } + + let mustHaveId = false; + let newType; + + if ((0, _generated.isClass)(node)) { + mustHaveId = true; + newType = "ClassDeclaration"; + } else if ((0, _generated.isFunction)(node)) { + mustHaveId = true; + newType = "FunctionDeclaration"; + } else if ((0, _generated.isAssignmentExpression)(node)) { + return (0, _generated2.expressionStatement)(node); + } + + if (mustHaveId && !node.id) { + newType = false; + } + + if (!newType) { + if (ignore) { + return false; + } else { + throw new Error(`cannot turn ${node.type} to a statement`); + } + } + + node.type = newType; + return node; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/valueToNode.js b/node_modules/@babel/types/lib/converters/valueToNode.js new file mode 100644 index 0000000..b3e531b --- /dev/null +++ b/node_modules/@babel/types/lib/converters/valueToNode.js @@ -0,0 +1,99 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _isValidIdentifier = require("../validators/isValidIdentifier"); + +var _generated = require("../builders/generated"); + +var _default = valueToNode; +exports.default = _default; +const objectToString = Function.call.bind(Object.prototype.toString); + +function isRegExp(value) { + return objectToString(value) === "[object RegExp]"; +} + +function isPlainObject(value) { + if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") { + return false; + } + + const proto = Object.getPrototypeOf(value); + return proto === null || Object.getPrototypeOf(proto) === null; +} + +function valueToNode(value) { + if (value === undefined) { + return (0, _generated.identifier)("undefined"); + } + + if (value === true || value === false) { + return (0, _generated.booleanLiteral)(value); + } + + if (value === null) { + return (0, _generated.nullLiteral)(); + } + + if (typeof value === "string") { + return (0, _generated.stringLiteral)(value); + } + + if (typeof value === "number") { + let result; + + if (Number.isFinite(value)) { + result = (0, _generated.numericLiteral)(Math.abs(value)); + } else { + let numerator; + + if (Number.isNaN(value)) { + numerator = (0, _generated.numericLiteral)(0); + } else { + numerator = (0, _generated.numericLiteral)(1); + } + + result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); + } + + if (value < 0 || Object.is(value, -0)) { + result = (0, _generated.unaryExpression)("-", result); + } + + return result; + } + + if (isRegExp(value)) { + const pattern = value.source; + const flags = value.toString().match(/\/([a-z]+|)$/)[1]; + return (0, _generated.regExpLiteral)(pattern, flags); + } + + if (Array.isArray(value)) { + return (0, _generated.arrayExpression)(value.map(valueToNode)); + } + + if (isPlainObject(value)) { + const props = []; + + for (const key of Object.keys(value)) { + let nodeKey; + + if ((0, _isValidIdentifier.default)(key)) { + nodeKey = (0, _generated.identifier)(key); + } else { + nodeKey = (0, _generated.stringLiteral)(key); + } + + props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); + } + + return (0, _generated.objectExpression)(props); + } + + throw new Error("don't know how to turn this value into a node"); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/core.js b/node_modules/@babel/types/lib/definitions/core.js new file mode 100644 index 0000000..1c46733 --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/core.js @@ -0,0 +1,1649 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.patternLikeCommon = exports.functionTypeAnnotationCommon = exports.functionDeclarationCommon = exports.functionCommon = exports.classMethodOrPropertyCommon = exports.classMethodOrDeclareMethodCommon = void 0; + +var _is = require("../validators/is"); + +var _isValidIdentifier = require("../validators/isValidIdentifier"); + +var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); + +var _constants = require("../constants"); + +var _utils = require("./utils"); + +const defineType = (0, _utils.defineAliasedType)("Standardized"); +defineType("ArrayExpression", { + fields: { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), + default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined + } + }, + visitor: ["elements"], + aliases: ["Expression"] +}); +defineType("AssignmentExpression", { + fields: { + operator: { + validate: function () { + if (!process.env.BABEL_TYPES_8_BREAKING) { + return (0, _utils.assertValueType)("string"); + } + + const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS); + const pattern = (0, _utils.assertOneOf)("="); + return function (node, key, val) { + const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier; + validator(node, key, val); + }; + }() + }, + left: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Expression"] +}); +defineType("BinaryExpression", { + builder: ["operator", "left", "right"], + fields: { + operator: { + validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) + }, + left: { + validate: function () { + const expression = (0, _utils.assertNodeType)("Expression"); + const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName"); + + const validator = function (node, key, val) { + const validator = node.operator === "in" ? inOp : expression; + validator(node, key, val); + }; + + validator.oneOfNodeTypes = ["Expression", "PrivateName"]; + return validator; + }() + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + visitor: ["left", "right"], + aliases: ["Binary", "Expression"] +}); +defineType("InterpreterDirective", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +defineType("Directive", { + visitor: ["value"], + fields: { + value: { + validate: (0, _utils.assertNodeType)("DirectiveLiteral") + } + } +}); +defineType("DirectiveLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +defineType("BlockStatement", { + builder: ["body", "directives"], + visitor: ["directives", "body"], + fields: { + directives: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "Statement"] +}); +defineType("BreakStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); +defineType("CallExpression", { + visitor: ["callee", "arguments", "typeParameters", "typeArguments"], + builder: ["callee", "arguments"], + aliases: ["Expression"], + fields: Object.assign({ + callee: { + validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier") + }, + arguments: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + } + }, !process.env.BABEL_TYPES_8_BREAKING ? { + optional: { + validate: (0, _utils.assertOneOf)(true, false), + optional: true + } + } : {}, { + typeArguments: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), + optional: true + } + }) +}); +defineType("CatchClause", { + visitor: ["param", "body"], + fields: { + param: { + validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }, + aliases: ["Scopable", "BlockParent"] +}); +defineType("ConditionalExpression", { + visitor: ["test", "consequent", "alternate"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _utils.assertNodeType)("Expression") + }, + alternate: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Expression", "Conditional"] +}); +defineType("ContinueStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); +defineType("DebuggerStatement", { + aliases: ["Statement"] +}); +defineType("DoWhileStatement", { + visitor: ["test", "body"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + }, + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] +}); +defineType("EmptyStatement", { + aliases: ["Statement"] +}); +defineType("ExpressionStatement", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Statement", "ExpressionWrapper"] +}); +defineType("File", { + builder: ["program", "comments", "tokens"], + visitor: ["program"], + fields: { + program: { + validate: (0, _utils.assertNodeType)("Program") + }, + comments: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {}, { + each: { + oneOfNodeTypes: ["CommentBlock", "CommentLine"] + } + }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")), + optional: true + }, + tokens: { + validate: (0, _utils.assertEach)(Object.assign(() => {}, { + type: "any" + })), + optional: true + } + } +}); +defineType("ForInStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +defineType("ForStatement", { + visitor: ["init", "test", "update", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], + fields: { + init: { + validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), + optional: true + }, + test: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + update: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +const functionCommon = { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement"))) + }, + generator: { + default: false + }, + async: { + default: false + } +}; +exports.functionCommon = functionCommon; +const functionTypeAnnotationCommon = { + returnType: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: true + } +}; +exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon; +const functionDeclarationCommon = Object.assign({}, functionCommon, { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } +}); +exports.functionDeclarationCommon = functionDeclarationCommon; +defineType("FunctionDeclaration", { + builder: ["id", "params", "body", "generator", "async"], + visitor: ["id", "params", "body", "returnType", "typeParameters"], + fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }), + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"], + validate: function () { + if (!process.env.BABEL_TYPES_8_BREAKING) return () => {}; + const identifier = (0, _utils.assertNodeType)("Identifier"); + return function (parent, key, node) { + if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { + identifier(node, "id", node.id); + } + }; + }() +}); +defineType("FunctionExpression", { + inherits: "FunctionDeclaration", + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +const patternLikeCommon = { + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) + } +}; +exports.patternLikeCommon = patternLikeCommon; +defineType("Identifier", { + builder: ["name"], + visitor: ["typeAnnotation", "decorators"], + aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], + fields: Object.assign({}, patternLikeCommon, { + name: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (!(0, _isValidIdentifier.default)(val, false)) { + throw new TypeError(`"${val}" is not a valid identifier name`); + } + }, { + type: "string" + })) + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }), + + validate(parent, key, node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + const match = /\.(\w+)$/.exec(key); + if (!match) return; + const [, parentKey] = match; + const nonComp = { + computed: false + }; + + if (parentKey === "property") { + if ((0, _is.default)("MemberExpression", parent, nonComp)) return; + if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return; + } else if (parentKey === "key") { + if ((0, _is.default)("Property", parent, nonComp)) return; + if ((0, _is.default)("Method", parent, nonComp)) return; + } else if (parentKey === "exported") { + if ((0, _is.default)("ExportSpecifier", parent)) return; + } else if (parentKey === "imported") { + if ((0, _is.default)("ImportSpecifier", parent, { + imported: node + })) return; + } else if (parentKey === "meta") { + if ((0, _is.default)("MetaProperty", parent, { + meta: node + })) return; + } + + if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") { + throw new TypeError(`"${node.name}" is not a valid identifier`); + } + } + +}); +defineType("IfStatement", { + visitor: ["test", "consequent", "alternate"], + aliases: ["Statement", "Conditional"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _utils.assertNodeType)("Statement") + }, + alternate: { + optional: true, + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +defineType("LabeledStatement", { + visitor: ["label", "body"], + aliases: ["Statement"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +defineType("StringLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +defineType("NumericLiteral", { + builder: ["value"], + deprecatedAlias: "NumberLiteral", + fields: { + value: { + validate: (0, _utils.assertValueType)("number") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +defineType("NullLiteral", { + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +defineType("BooleanLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("boolean") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +defineType("RegExpLiteral", { + builder: ["pattern", "flags"], + deprecatedAlias: "RegexLiteral", + aliases: ["Expression", "Pureish", "Literal"], + fields: { + pattern: { + validate: (0, _utils.assertValueType)("string") + }, + flags: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + const invalid = /[^gimsuy]/.exec(val); + + if (invalid) { + throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`); + } + }, { + type: "string" + })), + default: "" + } + } +}); +defineType("LogicalExpression", { + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Binary", "Expression"], + fields: { + operator: { + validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) + }, + left: { + validate: (0, _utils.assertNodeType)("Expression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("MemberExpression", { + builder: ["object", "property", "computed", ...(!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : [])], + visitor: ["object", "property"], + aliases: ["Expression", "LVal"], + fields: Object.assign({ + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + property: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); + const computed = (0, _utils.assertNodeType)("Expression"); + + const validator = function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + + validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"]; + return validator; + }() + }, + computed: { + default: false + } + }, !process.env.BABEL_TYPES_8_BREAKING ? { + optional: { + validate: (0, _utils.assertOneOf)(true, false), + optional: true + } + } : {}) +}); +defineType("NewExpression", { + inherits: "CallExpression" +}); +defineType("Program", { + visitor: ["directives", "body"], + builder: ["body", "directives", "sourceType", "interpreter"], + fields: { + sourceFile: { + validate: (0, _utils.assertValueType)("string") + }, + sourceType: { + validate: (0, _utils.assertOneOf)("script", "module"), + default: "script" + }, + interpreter: { + validate: (0, _utils.assertNodeType)("InterpreterDirective"), + default: null, + optional: true + }, + directives: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block"] +}); +defineType("ObjectExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) + } + } +}); +defineType("ObjectMethod", { + builder: ["kind", "key", "params", "body", "computed", "generator", "async"], + fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { + kind: Object.assign({ + validate: (0, _utils.assertOneOf)("method", "get", "set") + }, !process.env.BABEL_TYPES_8_BREAKING ? { + default: "method" + } : {}), + computed: { + default: false + }, + key: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); + + const validator = function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + + validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"]; + return validator; + }() + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }), + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] +}); +defineType("ObjectProperty", { + builder: ["key", "value", "computed", "shorthand", ...(!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : [])], + fields: { + computed: { + default: false + }, + key: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); + + const validator = function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + + validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"]; + return validator; + }() + }, + value: { + validate: (0, _utils.assertNodeType)("Expression", "PatternLike") + }, + shorthand: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && node.computed) { + throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); + } + }, { + type: "boolean" + }), function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && !(0, _is.default)("Identifier", node.key)) { + throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); + } + }), + default: false + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }, + visitor: ["key", "value", "decorators"], + aliases: ["UserWhitespacable", "Property", "ObjectMember"], + validate: function () { + const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern"); + const expression = (0, _utils.assertNodeType)("Expression"); + return function (parent, key, node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression; + validator(node, "value", node.value); + }; + }() +}); +defineType("RestElement", { + visitor: ["argument", "typeAnnotation"], + builder: ["argument"], + aliases: ["LVal", "PatternLike"], + deprecatedAlias: "RestProperty", + fields: Object.assign({}, patternLikeCommon, { + argument: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression") + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }), + + validate(parent, key) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + const match = /(\w+)\[(\d+)\]/.exec(key); + if (!match) throw new Error("Internal Babel error: malformed key."); + const [, listKey, index] = match; + + if (parent[listKey].length > index + 1) { + throw new TypeError(`RestElement must be last element of ${listKey}`); + } + } + +}); +defineType("ReturnStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + } + } +}); +defineType("SequenceExpression", { + visitor: ["expressions"], + fields: { + expressions: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) + } + }, + aliases: ["Expression"] +}); +defineType("ParenthesizedExpression", { + visitor: ["expression"], + aliases: ["Expression", "ExpressionWrapper"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("SwitchCase", { + visitor: ["test", "consequent"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + consequent: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + } +}); +defineType("SwitchStatement", { + visitor: ["discriminant", "cases"], + aliases: ["Statement", "BlockParent", "Scopable"], + fields: { + discriminant: { + validate: (0, _utils.assertNodeType)("Expression") + }, + cases: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) + } + } +}); +defineType("ThisExpression", { + aliases: ["Expression"] +}); +defineType("ThrowStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("TryStatement", { + visitor: ["block", "handler", "finalizer"], + aliases: ["Statement"], + fields: { + block: { + validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function (node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (!node.handler && !node.finalizer) { + throw new TypeError("TryStatement expects either a handler or finalizer, or both"); + } + }, { + oneOfNodeTypes: ["BlockStatement"] + })) + }, + handler: { + optional: true, + validate: (0, _utils.assertNodeType)("CatchClause") + }, + finalizer: { + optional: true, + validate: (0, _utils.assertNodeType)("BlockStatement") + } + } +}); +defineType("UnaryExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: true + }, + argument: { + validate: (0, _utils.assertNodeType)("Expression") + }, + operator: { + validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["UnaryLike", "Expression"] +}); +defineType("UpdateExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: false + }, + argument: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression") + }, + operator: { + validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["Expression"] +}); +defineType("VariableDeclaration", { + builder: ["kind", "declarations"], + visitor: ["declarations"], + aliases: ["Statement", "Declaration"], + fields: { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + kind: { + validate: (0, _utils.assertOneOf)("var", "let", "const") + }, + declarations: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) + } + }, + + validate(parent, key, node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + if (!(0, _is.default)("ForXStatement", parent, { + left: node + })) return; + + if (node.declarations.length !== 1) { + throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`); + } + } + +}); +defineType("VariableDeclarator", { + visitor: ["id", "init"], + fields: { + id: { + validate: function () { + if (!process.env.BABEL_TYPES_8_BREAKING) { + return (0, _utils.assertNodeType)("LVal"); + } + + const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"); + const without = (0, _utils.assertNodeType)("Identifier"); + return function (node, key, val) { + const validator = node.init ? normal : without; + validator(node, key, val); + }; + }() + }, + definite: { + optional: true, + validate: (0, _utils.assertValueType)("boolean") + }, + init: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("WhileStatement", { + visitor: ["test", "body"], + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +defineType("WithStatement", { + visitor: ["object", "body"], + aliases: ["Statement"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +defineType("AssignmentPattern", { + visitor: ["left", "right", "decorators"], + builder: ["left", "right"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, patternLikeCommon, { + left: { + validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }) +}); +defineType("ArrayPattern", { + visitor: ["elements", "typeAnnotation"], + builder: ["elements"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, patternLikeCommon, { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike"))) + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }) +}); +defineType("ArrowFunctionExpression", { + builder: ["params", "body", "async"], + visitor: ["params", "body", "returnType", "typeParameters"], + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { + expression: { + validate: (0, _utils.assertValueType)("boolean") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") + } + }) +}); +defineType("ClassBody", { + visitor: ["body"], + fields: { + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock"))) + } + } +}); +defineType("ClassExpression", { + builder: ["id", "superClass", "body", "decorators"], + visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], + aliases: ["Scopable", "Class", "Expression"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + }, + superTypeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + }, + implements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + mixins: { + validate: (0, _utils.assertNodeType)("InterfaceExtends"), + optional: true + } + } +}); +defineType("ClassDeclaration", { + inherits: "ClassExpression", + aliases: ["Scopable", "Class", "Statement", "Declaration"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + }, + superTypeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + }, + implements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + mixins: { + validate: (0, _utils.assertNodeType)("InterfaceExtends"), + optional: true + }, + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + abstract: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }, + validate: function () { + const identifier = (0, _utils.assertNodeType)("Identifier"); + return function (parent, key, node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { + identifier(node, "id", node.id); + } + }; + }() +}); +defineType("ExportAllDeclaration", { + visitor: ["source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + source: { + validate: (0, _utils.assertNodeType)("StringLiteral") + }, + exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")), + assertions: { + optional: true, + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) + } + } +}); +defineType("ExportDefaultDeclaration", { + visitor: ["declaration"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") + }, + exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("value")) + } +}); +defineType("ExportNamedDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + optional: true, + validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && node.specifiers.length) { + throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); + } + }, { + oneOfNodeTypes: ["Declaration"] + }), function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && node.source) { + throw new TypeError("Cannot export a declaration from a source"); + } + }) + }, + assertions: { + optional: true, + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) + }, + specifiers: { + default: [], + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function () { + const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); + const sourceless = (0, _utils.assertNodeType)("ExportSpecifier"); + if (!process.env.BABEL_TYPES_8_BREAKING) return sourced; + return function (node, key, val) { + const validator = node.source ? sourced : sourceless; + validator(node, key, val); + }; + }())) + }, + source: { + validate: (0, _utils.assertNodeType)("StringLiteral"), + optional: true + }, + exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) + } +}); +defineType("ExportSpecifier", { + visitor: ["local", "exported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + exported: { + validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") + }, + exportKind: { + validate: (0, _utils.assertOneOf)("type", "value"), + optional: true + } + } +}); +defineType("ForOfStatement", { + visitor: ["left", "right", "body"], + builder: ["left", "right", "body", "await"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: function () { + if (!process.env.BABEL_TYPES_8_BREAKING) { + return (0, _utils.assertNodeType)("VariableDeclaration", "LVal"); + } + + const declaration = (0, _utils.assertNodeType)("VariableDeclaration"); + const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"); + return function (node, key, val) { + if ((0, _is.default)("VariableDeclaration", val)) { + declaration(node, key, val); + } else { + lval(node, key, val); + } + }; + }() + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + }, + await: { + default: false + } + } +}); +defineType("ImportDeclaration", { + visitor: ["specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration"], + fields: { + assertions: { + optional: true, + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) + }, + specifiers: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) + }, + source: { + validate: (0, _utils.assertNodeType)("StringLiteral") + }, + importKind: { + validate: (0, _utils.assertOneOf)("type", "typeof", "value"), + optional: true + } + } +}); +defineType("ImportDefaultSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +defineType("ImportNamespaceSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +defineType("ImportSpecifier", { + visitor: ["local", "imported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + imported: { + validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") + }, + importKind: { + validate: (0, _utils.assertOneOf)("type", "typeof", "value"), + optional: true + } + } +}); +defineType("MetaProperty", { + visitor: ["meta", "property"], + aliases: ["Expression"], + fields: { + meta: { + validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + let property; + + switch (val.name) { + case "function": + property = "sent"; + break; + + case "new": + property = "target"; + break; + + case "import": + property = "meta"; + break; + } + + if (!(0, _is.default)("Identifier", node.property, { + name: property + })) { + throw new TypeError("Unrecognised MetaProperty"); + } + }, { + oneOfNodeTypes: ["Identifier"] + })) + }, + property: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +const classMethodOrPropertyCommon = { + abstract: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + accessibility: { + validate: (0, _utils.assertOneOf)("public", "private", "protected"), + optional: true + }, + static: { + default: false + }, + override: { + default: false + }, + computed: { + default: false + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + key: { + validate: (0, _utils.chain)(function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) + } +}; +exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon; +const classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) + }, + kind: { + validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"), + default: "method" + }, + access: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } +}); +exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; +defineType("ClassMethod", { + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], + builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +defineType("ObjectPattern", { + visitor: ["properties", "typeAnnotation", "decorators"], + builder: ["properties"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, patternLikeCommon, { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) + } + }) +}); +defineType("SpreadElement", { + visitor: ["argument"], + aliases: ["UnaryLike"], + deprecatedAlias: "SpreadProperty", + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("Super", { + aliases: ["Expression"] +}); +defineType("TaggedTemplateExpression", { + visitor: ["tag", "quasi", "typeParameters"], + builder: ["tag", "quasi"], + aliases: ["Expression"], + fields: { + tag: { + validate: (0, _utils.assertNodeType)("Expression") + }, + quasi: { + validate: (0, _utils.assertNodeType)("TemplateLiteral") + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + } + } +}); +defineType("TemplateElement", { + builder: ["value", "tail"], + fields: { + value: { + validate: (0, _utils.assertShape)({ + raw: { + validate: (0, _utils.assertValueType)("string") + }, + cooked: { + validate: (0, _utils.assertValueType)("string"), + optional: true + } + }) + }, + tail: { + default: false + } + } +}); +defineType("TemplateLiteral", { + visitor: ["quasis", "expressions"], + aliases: ["Expression", "Literal"], + fields: { + quasis: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) + }, + expressions: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function (node, key, val) { + if (node.quasis.length !== val.length + 1) { + throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.\nExpected ${val.length + 1} quasis but got ${node.quasis.length}`); + } + }) + } + } +}); +defineType("YieldExpression", { + builder: ["argument", "delegate"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + delegate: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && !node.argument) { + throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); + } + }, { + type: "boolean" + })), + default: false + }, + argument: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("AwaitExpression", { + builder: ["argument"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("Import", { + aliases: ["Expression"] +}); +defineType("BigIntLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +defineType("ExportNamespaceSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +defineType("OptionalMemberExpression", { + builder: ["object", "property", "computed", "optional"], + visitor: ["object", "property"], + aliases: ["Expression"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + property: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier"); + const computed = (0, _utils.assertNodeType)("Expression"); + + const validator = function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + + validator.oneOfNodeTypes = ["Expression", "Identifier"]; + return validator; + }() + }, + computed: { + default: false + }, + optional: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) + } + } +}); +defineType("OptionalCallExpression", { + visitor: ["callee", "arguments", "typeParameters", "typeArguments"], + builder: ["callee", "arguments", "optional"], + aliases: ["Expression"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + }, + optional: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) + }, + typeArguments: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), + optional: true + } + } +}); +defineType("ClassProperty", { + visitor: ["key", "value", "typeAnnotation", "decorators"], + builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], + aliases: ["Property"], + fields: Object.assign({}, classMethodOrPropertyCommon, { + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + definite: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + variance: { + validate: (0, _utils.assertNodeType)("Variance"), + optional: true + } + }) +}); +defineType("ClassAccessorProperty", { + visitor: ["key", "value", "typeAnnotation", "decorators"], + builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], + aliases: ["Property", "Accessor"], + fields: Object.assign({}, classMethodOrPropertyCommon, { + key: { + validate: (0, _utils.chain)(function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "PrivateName"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression", "PrivateName")) + }, + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + definite: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + variance: { + validate: (0, _utils.assertNodeType)("Variance"), + optional: true + } + }) +}); +defineType("ClassPrivateProperty", { + visitor: ["key", "value", "decorators", "typeAnnotation"], + builder: ["key", "value", "decorators", "static"], + aliases: ["Property", "Private"], + fields: { + key: { + validate: (0, _utils.assertNodeType)("PrivateName") + }, + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + definite: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + variance: { + validate: (0, _utils.assertNodeType)("Variance"), + optional: true + } + } +}); +defineType("ClassPrivateMethod", { + builder: ["kind", "key", "params", "body", "static"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], + fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, { + key: { + validate: (0, _utils.assertNodeType)("PrivateName") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +defineType("PrivateName", { + visitor: ["id"], + aliases: ["Private"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +defineType("StaticBlock", { + visitor: ["body"], + fields: { + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "FunctionParent"] +});
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/experimental.js b/node_modules/@babel/types/lib/definitions/experimental.js new file mode 100644 index 0000000..be97c0d --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/experimental.js @@ -0,0 +1,133 @@ +"use strict"; + +var _utils = require("./utils"); + +(0, _utils.default)("ArgumentPlaceholder", {}); +(0, _utils.default)("BindExpression", { + visitor: ["object", "callee"], + aliases: ["Expression"], + fields: !process.env.BABEL_TYPES_8_BREAKING ? { + object: { + validate: Object.assign(() => {}, { + oneOfNodeTypes: ["Expression"] + }) + }, + callee: { + validate: Object.assign(() => {}, { + oneOfNodeTypes: ["Expression"] + }) + } + } : { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + callee: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("ImportAttribute", { + visitor: ["key", "value"], + fields: { + key: { + validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") + }, + value: { + validate: (0, _utils.assertNodeType)("StringLiteral") + } + } +}); +(0, _utils.default)("Decorator", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("DoExpression", { + visitor: ["body"], + builder: ["body", "async"], + aliases: ["Expression"], + fields: { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + }, + async: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + } + } +}); +(0, _utils.default)("ExportDefaultSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("RecordExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement"))) + } + } +}); +(0, _utils.default)("TupleExpression", { + fields: { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))), + default: [] + } + }, + visitor: ["elements"], + aliases: ["Expression"] +}); +(0, _utils.default)("DecimalLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("ModuleExpression", { + visitor: ["body"], + fields: { + body: { + validate: (0, _utils.assertNodeType)("Program") + } + }, + aliases: ["Expression"] +}); +(0, _utils.default)("TopicReference", { + aliases: ["Expression"] +}); +(0, _utils.default)("PipelineTopicExpression", { + builder: ["expression"], + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Expression"] +}); +(0, _utils.default)("PipelineBareFunction", { + builder: ["callee"], + visitor: ["callee"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Expression"] +}); +(0, _utils.default)("PipelinePrimaryTopicReference", { + aliases: ["Expression"] +});
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/flow.js b/node_modules/@babel/types/lib/definitions/flow.js new file mode 100644 index 0000000..706de24 --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/flow.js @@ -0,0 +1,474 @@ +"use strict"; + +var _utils = require("./utils"); + +const defineType = (0, _utils.defineAliasedType)("Flow"); + +const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { + defineType(name, { + builder: ["id", "typeParameters", "extends", "body"], + visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)(typeParameterType), + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), + body: (0, _utils.validateType)("ObjectTypeAnnotation") + } + }); +}; + +defineType("AnyTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("ArrayTypeAnnotation", { + visitor: ["elementType"], + aliases: ["FlowType"], + fields: { + elementType: (0, _utils.validateType)("FlowType") + } +}); +defineType("BooleanTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("BooleanLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("NullLiteralTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("ClassImplements", { + visitor: ["id", "typeParameters"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineInterfaceishType("DeclareClass"); +defineType("DeclareFunction", { + visitor: ["id"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") + } +}); +defineInterfaceishType("DeclareInterface"); +defineType("DeclareModule", { + builder: ["id", "body", "kind"], + visitor: ["id", "body"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + body: (0, _utils.validateType)("BlockStatement"), + kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) + } +}); +defineType("DeclareModuleExports", { + visitor: ["typeAnnotation"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + typeAnnotation: (0, _utils.validateType)("TypeAnnotation") + } +}); +defineType("DeclareTypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + right: (0, _utils.validateType)("FlowType") + } +}); +defineType("DeclareOpaqueType", { + visitor: ["id", "typeParameters", "supertype"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, _utils.validateOptionalType)("FlowType"), + impltype: (0, _utils.validateOptionalType)("FlowType") + } +}); +defineType("DeclareVariable", { + visitor: ["id"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +defineType("DeclareExportDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + declaration: (0, _utils.validateOptionalType)("Flow"), + specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), + source: (0, _utils.validateOptionalType)("StringLiteral"), + default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("DeclareExportAllDeclaration", { + visitor: ["source"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + source: (0, _utils.validateType)("StringLiteral"), + exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) + } +}); +defineType("DeclaredPredicate", { + visitor: ["value"], + aliases: ["FlowPredicate"], + fields: { + value: (0, _utils.validateType)("Flow") + } +}); +defineType("ExistsTypeAnnotation", { + aliases: ["FlowType"] +}); +defineType("FunctionTypeAnnotation", { + visitor: ["typeParameters", "params", "rest", "returnType"], + aliases: ["FlowType"], + fields: { + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), + rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), + this: (0, _utils.validateOptionalType)("FunctionTypeParam"), + returnType: (0, _utils.validateType)("FlowType") + } +}); +defineType("FunctionTypeParam", { + visitor: ["name", "typeAnnotation"], + fields: { + name: (0, _utils.validateOptionalType)("Identifier"), + typeAnnotation: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("GenericTypeAnnotation", { + visitor: ["id", "typeParameters"], + aliases: ["FlowType"], + fields: { + id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineType("InferredPredicate", { + aliases: ["FlowPredicate"] +}); +defineType("InterfaceExtends", { + visitor: ["id", "typeParameters"], + fields: { + id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineInterfaceishType("InterfaceDeclaration"); +defineType("InterfaceTypeAnnotation", { + visitor: ["extends", "body"], + aliases: ["FlowType"], + fields: { + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + body: (0, _utils.validateType)("ObjectTypeAnnotation") + } +}); +defineType("IntersectionTypeAnnotation", { + visitor: ["types"], + aliases: ["FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +defineType("MixedTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("EmptyTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("NullableTypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["FlowType"], + fields: { + typeAnnotation: (0, _utils.validateType)("FlowType") + } +}); +defineType("NumberLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("number")) + } +}); +defineType("NumberTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("ObjectTypeAnnotation", { + visitor: ["properties", "indexers", "callProperties", "internalSlots"], + aliases: ["FlowType"], + builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], + fields: { + properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), + indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), + callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), + internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), + exact: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("ObjectTypeInternalSlot", { + visitor: ["id", "value", "optional", "static", "method"], + aliases: ["UserWhitespacable"], + fields: { + id: (0, _utils.validateType)("Identifier"), + value: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("ObjectTypeCallProperty", { + visitor: ["value"], + aliases: ["UserWhitespacable"], + fields: { + value: (0, _utils.validateType)("FlowType"), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("ObjectTypeIndexer", { + visitor: ["id", "key", "value", "variance"], + aliases: ["UserWhitespacable"], + fields: { + id: (0, _utils.validateOptionalType)("Identifier"), + key: (0, _utils.validateType)("FlowType"), + value: (0, _utils.validateType)("FlowType"), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +defineType("ObjectTypeProperty", { + visitor: ["key", "value", "variance"], + aliases: ["UserWhitespacable"], + fields: { + key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + value: (0, _utils.validateType)("FlowType"), + kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + variance: (0, _utils.validateOptionalType)("Variance"), + method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("ObjectTypeSpreadProperty", { + visitor: ["argument"], + aliases: ["UserWhitespacable"], + fields: { + argument: (0, _utils.validateType)("FlowType") + } +}); +defineType("OpaqueType", { + visitor: ["id", "typeParameters", "supertype", "impltype"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, _utils.validateOptionalType)("FlowType"), + impltype: (0, _utils.validateType)("FlowType") + } +}); +defineType("QualifiedTypeIdentifier", { + visitor: ["id", "qualification"], + fields: { + id: (0, _utils.validateType)("Identifier"), + qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) + } +}); +defineType("StringLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("string")) + } +}); +defineType("StringTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("SymbolTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("ThisTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("TupleTypeAnnotation", { + visitor: ["types"], + aliases: ["FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +defineType("TypeofTypeAnnotation", { + visitor: ["argument"], + aliases: ["FlowType"], + fields: { + argument: (0, _utils.validateType)("FlowType") + } +}); +defineType("TypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + right: (0, _utils.validateType)("FlowType") + } +}); +defineType("TypeAnnotation", { + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("FlowType") + } +}); +defineType("TypeCastExpression", { + visitor: ["expression", "typeAnnotation"], + aliases: ["ExpressionWrapper", "Expression"], + fields: { + expression: (0, _utils.validateType)("Expression"), + typeAnnotation: (0, _utils.validateType)("TypeAnnotation") + } +}); +defineType("TypeParameter", { + visitor: ["bound", "default", "variance"], + fields: { + name: (0, _utils.validate)((0, _utils.assertValueType)("string")), + bound: (0, _utils.validateOptionalType)("TypeAnnotation"), + default: (0, _utils.validateOptionalType)("FlowType"), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +defineType("TypeParameterDeclaration", { + visitor: ["params"], + fields: { + params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) + } +}); +defineType("TypeParameterInstantiation", { + visitor: ["params"], + fields: { + params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +defineType("UnionTypeAnnotation", { + visitor: ["types"], + aliases: ["FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +defineType("Variance", { + builder: ["kind"], + fields: { + kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) + } +}); +defineType("VoidTypeAnnotation", { + aliases: ["FlowType", "FlowBaseAnnotation"] +}); +defineType("EnumDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "body"], + fields: { + id: (0, _utils.validateType)("Identifier"), + body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"]) + } +}); +defineType("EnumBooleanBody", { + aliases: ["EnumBody"], + visitor: ["members"], + fields: { + explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + members: (0, _utils.validateArrayOfType)("EnumBooleanMember"), + hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("EnumNumberBody", { + aliases: ["EnumBody"], + visitor: ["members"], + fields: { + explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + members: (0, _utils.validateArrayOfType)("EnumNumberMember"), + hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("EnumStringBody", { + aliases: ["EnumBody"], + visitor: ["members"], + fields: { + explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]), + hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("EnumSymbolBody", { + aliases: ["EnumBody"], + visitor: ["members"], + fields: { + members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"), + hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +defineType("EnumBooleanMember", { + aliases: ["EnumMember"], + visitor: ["id"], + fields: { + id: (0, _utils.validateType)("Identifier"), + init: (0, _utils.validateType)("BooleanLiteral") + } +}); +defineType("EnumNumberMember", { + aliases: ["EnumMember"], + visitor: ["id", "init"], + fields: { + id: (0, _utils.validateType)("Identifier"), + init: (0, _utils.validateType)("NumericLiteral") + } +}); +defineType("EnumStringMember", { + aliases: ["EnumMember"], + visitor: ["id", "init"], + fields: { + id: (0, _utils.validateType)("Identifier"), + init: (0, _utils.validateType)("StringLiteral") + } +}); +defineType("EnumDefaultedMember", { + aliases: ["EnumMember"], + visitor: ["id"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +defineType("IndexedAccessType", { + visitor: ["objectType", "indexType"], + aliases: ["FlowType"], + fields: { + objectType: (0, _utils.validateType)("FlowType"), + indexType: (0, _utils.validateType)("FlowType") + } +}); +defineType("OptionalIndexedAccessType", { + visitor: ["objectType", "indexType"], + aliases: ["FlowType"], + fields: { + objectType: (0, _utils.validateType)("FlowType"), + indexType: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +});
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/index.js b/node_modules/@babel/types/lib/definitions/index.js new file mode 100644 index 0000000..9b7c92c --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/index.js @@ -0,0 +1,103 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "ALIAS_KEYS", { + enumerable: true, + get: function () { + return _utils.ALIAS_KEYS; + } +}); +Object.defineProperty(exports, "BUILDER_KEYS", { + enumerable: true, + get: function () { + return _utils.BUILDER_KEYS; + } +}); +Object.defineProperty(exports, "DEPRECATED_KEYS", { + enumerable: true, + get: function () { + return _utils.DEPRECATED_KEYS; + } +}); +Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", { + enumerable: true, + get: function () { + return _utils.FLIPPED_ALIAS_KEYS; + } +}); +Object.defineProperty(exports, "NODE_FIELDS", { + enumerable: true, + get: function () { + return _utils.NODE_FIELDS; + } +}); +Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", { + enumerable: true, + get: function () { + return _utils.NODE_PARENT_VALIDATIONS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS_ALIAS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; + } +}); +exports.TYPES = void 0; +Object.defineProperty(exports, "VISITOR_KEYS", { + enumerable: true, + get: function () { + return _utils.VISITOR_KEYS; + } +}); + +var _toFastProperties = require("to-fast-properties"); + +require("./core"); + +require("./flow"); + +require("./jsx"); + +require("./misc"); + +require("./experimental"); + +require("./typescript"); + +var _utils = require("./utils"); + +var _placeholders = require("./placeholders"); + +_toFastProperties(_utils.VISITOR_KEYS); + +_toFastProperties(_utils.ALIAS_KEYS); + +_toFastProperties(_utils.FLIPPED_ALIAS_KEYS); + +_toFastProperties(_utils.NODE_FIELDS); + +_toFastProperties(_utils.BUILDER_KEYS); + +_toFastProperties(_utils.DEPRECATED_KEYS); + +_toFastProperties(_placeholders.PLACEHOLDERS_ALIAS); + +_toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); + +const TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS)); +exports.TYPES = TYPES;
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/jsx.js b/node_modules/@babel/types/lib/definitions/jsx.js new file mode 100644 index 0000000..4d7fb75 --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/jsx.js @@ -0,0 +1,156 @@ +"use strict"; + +var _utils = require("./utils"); + +const defineType = (0, _utils.defineAliasedType)("JSX"); +defineType("JSXAttribute", { + visitor: ["name", "value"], + aliases: ["Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") + }, + value: { + optional: true, + validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") + } + } +}); +defineType("JSXClosingElement", { + visitor: ["name"], + aliases: ["Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") + } + } +}); +defineType("JSXElement", { + builder: ["openingElement", "closingElement", "children", "selfClosing"], + visitor: ["openingElement", "children", "closingElement"], + aliases: ["Immutable", "Expression"], + fields: { + openingElement: { + validate: (0, _utils.assertNodeType)("JSXOpeningElement") + }, + closingElement: { + optional: true, + validate: (0, _utils.assertNodeType)("JSXClosingElement") + }, + children: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + }, + selfClosing: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + } +}); +defineType("JSXEmptyExpression", {}); +defineType("JSXExpressionContainer", { + visitor: ["expression"], + aliases: ["Immutable"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") + } + } +}); +defineType("JSXSpreadChild", { + visitor: ["expression"], + aliases: ["Immutable"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("JSXIdentifier", { + builder: ["name"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +defineType("JSXMemberExpression", { + visitor: ["object", "property"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") + }, + property: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + } + } +}); +defineType("JSXNamespacedName", { + visitor: ["namespace", "name"], + fields: { + namespace: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + }, + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + } + } +}); +defineType("JSXOpeningElement", { + builder: ["name", "attributes", "selfClosing"], + visitor: ["name", "attributes"], + aliases: ["Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") + }, + selfClosing: { + default: false + }, + attributes: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + } + } +}); +defineType("JSXSpreadAttribute", { + visitor: ["argument"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +defineType("JSXText", { + aliases: ["Immutable"], + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +defineType("JSXFragment", { + builder: ["openingFragment", "closingFragment", "children"], + visitor: ["openingFragment", "children", "closingFragment"], + aliases: ["Immutable", "Expression"], + fields: { + openingFragment: { + validate: (0, _utils.assertNodeType)("JSXOpeningFragment") + }, + closingFragment: { + validate: (0, _utils.assertNodeType)("JSXClosingFragment") + }, + children: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + } + } +}); +defineType("JSXOpeningFragment", { + aliases: ["Immutable"] +}); +defineType("JSXClosingFragment", { + aliases: ["Immutable"] +});
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/misc.js b/node_modules/@babel/types/lib/definitions/misc.js new file mode 100644 index 0000000..07898bd --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/misc.js @@ -0,0 +1,32 @@ +"use strict"; + +var _utils = require("./utils"); + +var _placeholders = require("./placeholders"); + +const defineType = (0, _utils.defineAliasedType)("Miscellaneous"); +{ + defineType("Noop", { + visitor: [] + }); +} +defineType("Placeholder", { + visitor: [], + builder: ["expectedNode", "name"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + expectedNode: { + validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) + } + } +}); +defineType("V8IntrinsicIdentifier", { + builder: ["name"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + } + } +});
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/placeholders.js b/node_modules/@babel/types/lib/definitions/placeholders.js new file mode 100644 index 0000000..7277239 --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/placeholders.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0; + +var _utils = require("./utils"); + +const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; +exports.PLACEHOLDERS = PLACEHOLDERS; +const PLACEHOLDERS_ALIAS = { + Declaration: ["Statement"], + Pattern: ["PatternLike", "LVal"] +}; +exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; + +for (const type of PLACEHOLDERS) { + const alias = _utils.ALIAS_KEYS[type]; + if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type] = alias; +} + +const PLACEHOLDERS_FLIPPED_ALIAS = {}; +exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; +Object.keys(PLACEHOLDERS_ALIAS).forEach(type => { + PLACEHOLDERS_ALIAS[type].forEach(alias => { + if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { + PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; + } + + PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); + }); +});
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/typescript.js b/node_modules/@babel/types/lib/definitions/typescript.js new file mode 100644 index 0000000..3f4382a --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/typescript.js @@ -0,0 +1,470 @@ +"use strict"; + +var _utils = require("./utils"); + +var _core = require("./core"); + +var _is = require("../validators/is"); + +const defineType = (0, _utils.defineAliasedType)("TypeScript"); +const bool = (0, _utils.assertValueType)("boolean"); +const tSFunctionTypeAnnotationCommon = { + returnType: { + validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), + optional: true + } +}; +defineType("TSParameterProperty", { + aliases: ["LVal"], + visitor: ["parameter"], + fields: { + accessibility: { + validate: (0, _utils.assertOneOf)("public", "private", "protected"), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + parameter: { + validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") + }, + override: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + } +}); +defineType("TSDeclareFunction", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "params", "returnType"], + fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) +}); +defineType("TSDeclareMethod", { + visitor: ["decorators", "key", "typeParameters", "params", "returnType"], + fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) +}); +defineType("TSQualifiedName", { + aliases: ["TSEntityName"], + visitor: ["left", "right"], + fields: { + left: (0, _utils.validateType)("TSEntityName"), + right: (0, _utils.validateType)("Identifier") + } +}); +const signatureDeclarationCommon = { + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + ["parameters"]: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), + ["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation") +}; +const callConstructSignatureDeclaration = { + aliases: ["TSTypeElement"], + visitor: ["typeParameters", "parameters", "typeAnnotation"], + fields: signatureDeclarationCommon +}; +defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration); +defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); +const namedTypeElementCommon = { + key: (0, _utils.validateType)("Expression"), + computed: (0, _utils.validate)(bool), + optional: (0, _utils.validateOptional)(bool) +}; +defineType("TSPropertySignature", { + aliases: ["TSTypeElement"], + visitor: ["key", "typeAnnotation", "initializer"], + fields: Object.assign({}, namedTypeElementCommon, { + readonly: (0, _utils.validateOptional)(bool), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), + initializer: (0, _utils.validateOptionalType)("Expression"), + kind: { + validate: (0, _utils.assertOneOf)("get", "set") + } + }) +}); +defineType("TSMethodSignature", { + aliases: ["TSTypeElement"], + visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], + fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, { + kind: { + validate: (0, _utils.assertOneOf)("method", "get", "set") + } + }) +}); +defineType("TSIndexSignature", { + aliases: ["TSTypeElement"], + visitor: ["parameters", "typeAnnotation"], + fields: { + readonly: (0, _utils.validateOptional)(bool), + static: (0, _utils.validateOptional)(bool), + parameters: (0, _utils.validateArrayOfType)("Identifier"), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") + } +}); +const tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"]; + +for (const type of tsKeywordTypes) { + defineType(type, { + aliases: ["TSType", "TSBaseType"], + visitor: [], + fields: {} + }); +} + +defineType("TSThisType", { + aliases: ["TSType", "TSBaseType"], + visitor: [], + fields: {} +}); +const fnOrCtrBase = { + aliases: ["TSType"], + visitor: ["typeParameters", "parameters", "typeAnnotation"] +}; +defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, { + fields: signatureDeclarationCommon +})); +defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, { + fields: Object.assign({}, signatureDeclarationCommon, { + abstract: (0, _utils.validateOptional)(bool) + }) +})); +defineType("TSTypeReference", { + aliases: ["TSType"], + visitor: ["typeName", "typeParameters"], + fields: { + typeName: (0, _utils.validateType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +defineType("TSTypePredicate", { + aliases: ["TSType"], + visitor: ["parameterName", "typeAnnotation"], + builder: ["parameterName", "typeAnnotation", "asserts"], + fields: { + parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), + asserts: (0, _utils.validateOptional)(bool) + } +}); +defineType("TSTypeQuery", { + aliases: ["TSType"], + visitor: ["exprName"], + fields: { + exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) + } +}); +defineType("TSTypeLiteral", { + aliases: ["TSType"], + visitor: ["members"], + fields: { + members: (0, _utils.validateArrayOfType)("TSTypeElement") + } +}); +defineType("TSArrayType", { + aliases: ["TSType"], + visitor: ["elementType"], + fields: { + elementType: (0, _utils.validateType)("TSType") + } +}); +defineType("TSTupleType", { + aliases: ["TSType"], + visitor: ["elementTypes"], + fields: { + elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"]) + } +}); +defineType("TSOptionalType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +defineType("TSRestType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +defineType("TSNamedTupleMember", { + visitor: ["label", "elementType"], + builder: ["label", "elementType", "optional"], + fields: { + label: (0, _utils.validateType)("Identifier"), + optional: { + validate: bool, + default: false + }, + elementType: (0, _utils.validateType)("TSType") + } +}); +const unionOrIntersection = { + aliases: ["TSType"], + visitor: ["types"], + fields: { + types: (0, _utils.validateArrayOfType)("TSType") + } +}; +defineType("TSUnionType", unionOrIntersection); +defineType("TSIntersectionType", unionOrIntersection); +defineType("TSConditionalType", { + aliases: ["TSType"], + visitor: ["checkType", "extendsType", "trueType", "falseType"], + fields: { + checkType: (0, _utils.validateType)("TSType"), + extendsType: (0, _utils.validateType)("TSType"), + trueType: (0, _utils.validateType)("TSType"), + falseType: (0, _utils.validateType)("TSType") + } +}); +defineType("TSInferType", { + aliases: ["TSType"], + visitor: ["typeParameter"], + fields: { + typeParameter: (0, _utils.validateType)("TSTypeParameter") + } +}); +defineType("TSParenthesizedType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +defineType("TSTypeOperator", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +defineType("TSIndexedAccessType", { + aliases: ["TSType"], + visitor: ["objectType", "indexType"], + fields: { + objectType: (0, _utils.validateType)("TSType"), + indexType: (0, _utils.validateType)("TSType") + } +}); +defineType("TSMappedType", { + aliases: ["TSType"], + visitor: ["typeParameter", "typeAnnotation", "nameType"], + fields: { + readonly: (0, _utils.validateOptional)(bool), + typeParameter: (0, _utils.validateType)("TSTypeParameter"), + optional: (0, _utils.validateOptional)(bool), + typeAnnotation: (0, _utils.validateOptionalType)("TSType"), + nameType: (0, _utils.validateOptionalType)("TSType") + } +}); +defineType("TSLiteralType", { + aliases: ["TSType", "TSBaseType"], + visitor: ["literal"], + fields: { + literal: { + validate: function () { + const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral"); + const unaryOperator = (0, _utils.assertOneOf)("-"); + const literal = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"); + + function validator(parent, key, node) { + if ((0, _is.default)("UnaryExpression", node)) { + unaryOperator(node, "operator", node.operator); + unaryExpression(node, "argument", node.argument); + } else { + literal(parent, key, node); + } + } + + validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "UnaryExpression"]; + return validator; + }() + } + } +}); +defineType("TSExpressionWithTypeArguments", { + aliases: ["TSType"], + visitor: ["expression", "typeParameters"], + fields: { + expression: (0, _utils.validateType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +defineType("TSInterfaceDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "extends", "body"], + fields: { + declare: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), + body: (0, _utils.validateType)("TSInterfaceBody") + } +}); +defineType("TSInterfaceBody", { + visitor: ["body"], + fields: { + body: (0, _utils.validateArrayOfType)("TSTypeElement") + } +}); +defineType("TSTypeAliasDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "typeAnnotation"], + fields: { + declare: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +defineType("TSAsExpression", { + aliases: ["Expression"], + visitor: ["expression", "typeAnnotation"], + fields: { + expression: (0, _utils.validateType)("Expression"), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +defineType("TSTypeAssertion", { + aliases: ["Expression"], + visitor: ["typeAnnotation", "expression"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType"), + expression: (0, _utils.validateType)("Expression") + } +}); +defineType("TSEnumDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "members"], + fields: { + declare: (0, _utils.validateOptional)(bool), + const: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + members: (0, _utils.validateArrayOfType)("TSEnumMember"), + initializer: (0, _utils.validateOptionalType)("Expression") + } +}); +defineType("TSEnumMember", { + visitor: ["id", "initializer"], + fields: { + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + initializer: (0, _utils.validateOptionalType)("Expression") + } +}); +defineType("TSModuleDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "body"], + fields: { + declare: (0, _utils.validateOptional)(bool), + global: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) + } +}); +defineType("TSModuleBlock", { + aliases: ["Scopable", "Block", "BlockParent"], + visitor: ["body"], + fields: { + body: (0, _utils.validateArrayOfType)("Statement") + } +}); +defineType("TSImportType", { + aliases: ["TSType"], + visitor: ["argument", "qualifier", "typeParameters"], + fields: { + argument: (0, _utils.validateType)("StringLiteral"), + qualifier: (0, _utils.validateOptionalType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +defineType("TSImportEqualsDeclaration", { + aliases: ["Statement"], + visitor: ["id", "moduleReference"], + fields: { + isExport: (0, _utils.validate)(bool), + id: (0, _utils.validateType)("Identifier"), + moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]), + importKind: { + validate: (0, _utils.assertOneOf)("type", "value"), + optional: true + } + } +}); +defineType("TSExternalModuleReference", { + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("StringLiteral") + } +}); +defineType("TSNonNullExpression", { + aliases: ["Expression"], + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("Expression") + } +}); +defineType("TSExportAssignment", { + aliases: ["Statement"], + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("Expression") + } +}); +defineType("TSNamespaceExportDeclaration", { + aliases: ["Statement"], + visitor: ["id"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +defineType("TSTypeAnnotation", { + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TSType") + } + } +}); +defineType("TSTypeParameterInstantiation", { + visitor: ["params"], + fields: { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) + } + } +}); +defineType("TSTypeParameterDeclaration", { + visitor: ["params"], + fields: { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) + } + } +}); +defineType("TSTypeParameter", { + builder: ["constraint", "default", "name"], + visitor: ["constraint", "default"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + }, + constraint: { + validate: (0, _utils.assertNodeType)("TSType"), + optional: true + }, + default: { + validate: (0, _utils.assertNodeType)("TSType"), + optional: true + } + } +});
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/utils.js b/node_modules/@babel/types/lib/definitions/utils.js new file mode 100644 index 0000000..70263e5 --- /dev/null +++ b/node_modules/@babel/types/lib/definitions/utils.js @@ -0,0 +1,343 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.VISITOR_KEYS = exports.NODE_PARENT_VALIDATIONS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.ALIAS_KEYS = void 0; +exports.arrayOf = arrayOf; +exports.arrayOfType = arrayOfType; +exports.assertEach = assertEach; +exports.assertNodeOrValueType = assertNodeOrValueType; +exports.assertNodeType = assertNodeType; +exports.assertOneOf = assertOneOf; +exports.assertOptionalChainStart = assertOptionalChainStart; +exports.assertShape = assertShape; +exports.assertValueType = assertValueType; +exports.chain = chain; +exports.default = defineType; +exports.defineAliasedType = defineAliasedType; +exports.typeIs = typeIs; +exports.validate = validate; +exports.validateArrayOfType = validateArrayOfType; +exports.validateOptional = validateOptional; +exports.validateOptionalType = validateOptionalType; +exports.validateType = validateType; + +var _is = require("../validators/is"); + +var _validate = require("../validators/validate"); + +const VISITOR_KEYS = {}; +exports.VISITOR_KEYS = VISITOR_KEYS; +const ALIAS_KEYS = {}; +exports.ALIAS_KEYS = ALIAS_KEYS; +const FLIPPED_ALIAS_KEYS = {}; +exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; +const NODE_FIELDS = {}; +exports.NODE_FIELDS = NODE_FIELDS; +const BUILDER_KEYS = {}; +exports.BUILDER_KEYS = BUILDER_KEYS; +const DEPRECATED_KEYS = {}; +exports.DEPRECATED_KEYS = DEPRECATED_KEYS; +const NODE_PARENT_VALIDATIONS = {}; +exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS; + +function getType(val) { + if (Array.isArray(val)) { + return "array"; + } else if (val === null) { + return "null"; + } else { + return typeof val; + } +} + +function validate(validate) { + return { + validate + }; +} + +function typeIs(typeName) { + return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); +} + +function validateType(typeName) { + return validate(typeIs(typeName)); +} + +function validateOptional(validate) { + return { + validate, + optional: true + }; +} + +function validateOptionalType(typeName) { + return { + validate: typeIs(typeName), + optional: true + }; +} + +function arrayOf(elementType) { + return chain(assertValueType("array"), assertEach(elementType)); +} + +function arrayOfType(typeName) { + return arrayOf(typeIs(typeName)); +} + +function validateArrayOfType(typeName) { + return validate(arrayOfType(typeName)); +} + +function assertEach(callback) { + function validator(node, key, val) { + if (!Array.isArray(val)) return; + + for (let i = 0; i < val.length; i++) { + const subkey = `${key}[${i}]`; + const v = val[i]; + callback(node, subkey, v); + if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v); + } + } + + validator.each = callback; + return validator; +} + +function assertOneOf(...values) { + function validate(node, key, val) { + if (values.indexOf(val) < 0) { + throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); + } + } + + validate.oneOf = values; + return validate; +} + +function assertNodeType(...types) { + function validate(node, key, val) { + for (const type of types) { + if ((0, _is.default)(type, val)) { + (0, _validate.validateChild)(node, key, val); + return; + } + } + + throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`); + } + + validate.oneOfNodeTypes = types; + return validate; +} + +function assertNodeOrValueType(...types) { + function validate(node, key, val) { + for (const type of types) { + if (getType(val) === type || (0, _is.default)(type, val)) { + (0, _validate.validateChild)(node, key, val); + return; + } + } + + throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`); + } + + validate.oneOfNodeOrValueTypes = types; + return validate; +} + +function assertValueType(type) { + function validate(node, key, val) { + const valid = getType(val) === type; + + if (!valid) { + throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); + } + } + + validate.type = type; + return validate; +} + +function assertShape(shape) { + function validate(node, key, val) { + const errors = []; + + for (const property of Object.keys(shape)) { + try { + (0, _validate.validateField)(node, property, val[property], shape[property]); + } catch (error) { + if (error instanceof TypeError) { + errors.push(error.message); + continue; + } + + throw error; + } + } + + if (errors.length) { + throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`); + } + } + + validate.shapeOf = shape; + return validate; +} + +function assertOptionalChainStart() { + function validate(node) { + var _current; + + let current = node; + + while (node) { + const { + type + } = current; + + if (type === "OptionalCallExpression") { + if (current.optional) return; + current = current.callee; + continue; + } + + if (type === "OptionalMemberExpression") { + if (current.optional) return; + current = current.object; + continue; + } + + break; + } + + throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`); + } + + return validate; +} + +function chain(...fns) { + function validate(...args) { + for (const fn of fns) { + fn(...args); + } + } + + validate.chainOf = fns; + + if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) { + throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`); + } + + return validate; +} + +const validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]; +const validFieldKeys = ["default", "optional", "validate"]; + +function defineAliasedType(...aliases) { + return (type, opts = {}) => { + let defined = opts.aliases; + + if (!defined) { + var _store$opts$inherits$, _defined; + + if (opts.inherits) defined = (_store$opts$inherits$ = store[opts.inherits].aliases) == null ? void 0 : _store$opts$inherits$.slice(); + (_defined = defined) != null ? _defined : defined = []; + opts.aliases = defined; + } + + const additional = aliases.filter(a => !defined.includes(a)); + defined.unshift(...additional); + return defineType(type, opts); + }; +} + +function defineType(type, opts = {}) { + const inherits = opts.inherits && store[opts.inherits] || {}; + let fields = opts.fields; + + if (!fields) { + fields = {}; + + if (inherits.fields) { + const keys = Object.getOwnPropertyNames(inherits.fields); + + for (const key of keys) { + const field = inherits.fields[key]; + const def = field.default; + + if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") { + throw new Error("field defaults can only be primitives or empty arrays currently"); + } + + fields[key] = { + default: Array.isArray(def) ? [] : def, + optional: field.optional, + validate: field.validate + }; + } + } + } + + const visitor = opts.visitor || inherits.visitor || []; + const aliases = opts.aliases || inherits.aliases || []; + const builder = opts.builder || inherits.builder || opts.visitor || []; + + for (const k of Object.keys(opts)) { + if (validTypeOpts.indexOf(k) === -1) { + throw new Error(`Unknown type option "${k}" on ${type}`); + } + } + + if (opts.deprecatedAlias) { + DEPRECATED_KEYS[opts.deprecatedAlias] = type; + } + + for (const key of visitor.concat(builder)) { + fields[key] = fields[key] || {}; + } + + for (const key of Object.keys(fields)) { + const field = fields[key]; + + if (field.default !== undefined && builder.indexOf(key) === -1) { + field.optional = true; + } + + if (field.default === undefined) { + field.default = null; + } else if (!field.validate && field.default != null) { + field.validate = assertValueType(getType(field.default)); + } + + for (const k of Object.keys(field)) { + if (validFieldKeys.indexOf(k) === -1) { + throw new Error(`Unknown field key "${k}" on ${type}.${key}`); + } + } + } + + VISITOR_KEYS[type] = opts.visitor = visitor; + BUILDER_KEYS[type] = opts.builder = builder; + NODE_FIELDS[type] = opts.fields = fields; + ALIAS_KEYS[type] = opts.aliases = aliases; + aliases.forEach(alias => { + FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; + FLIPPED_ALIAS_KEYS[alias].push(type); + }); + + if (opts.validate) { + NODE_PARENT_VALIDATIONS[type] = opts.validate; + } + + store[type] = opts; +} + +const store = {};
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/index-legacy.d.ts b/node_modules/@babel/types/lib/index-legacy.d.ts new file mode 100644 index 0000000..9c81afe --- /dev/null +++ b/node_modules/@babel/types/lib/index-legacy.d.ts @@ -0,0 +1,2717 @@ +// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/typescript-legacy.js for script used. + +interface BaseComment { + value: string; + start: number; + end: number; + loc: SourceLocation; + type: "CommentBlock" | "CommentLine"; +} + +export interface CommentBlock extends BaseComment { + type: "CommentBlock"; +} + +export interface CommentLine extends BaseComment { + type: "CommentLine"; +} + +export type Comment = CommentBlock | CommentLine; + +export interface SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +interface BaseNode { + leadingComments: ReadonlyArray<Comment> | null; + innerComments: ReadonlyArray<Comment> | null; + trailingComments: ReadonlyArray<Comment> | null; + start: number | null; + end: number | null; + loc: SourceLocation | null; + type: Node["type"]; + extra?: Record<string, unknown>; +} + +export type Node = Accessor | AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassAccessorProperty | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | DecimalLiteral | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBody | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | Miscellaneous | MixedTypeAnnotation | ModuleDeclaration | ModuleExpression | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Standardized | Statement | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBaseType | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeScript | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression; + +export interface ArrayExpression extends BaseNode { + type: "ArrayExpression"; + elements: Array<null | Expression | SpreadElement>; +} + +export interface AssignmentExpression extends BaseNode { + type: "AssignmentExpression"; + operator: string; + left: LVal; + right: Expression; +} + +export interface BinaryExpression extends BaseNode { + type: "BinaryExpression"; + operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; + left: Expression | PrivateName; + right: Expression; +} + +export interface InterpreterDirective extends BaseNode { + type: "InterpreterDirective"; + value: string; +} + +export interface Directive extends BaseNode { + type: "Directive"; + value: DirectiveLiteral; +} + +export interface DirectiveLiteral extends BaseNode { + type: "DirectiveLiteral"; + value: string; +} + +export interface BlockStatement extends BaseNode { + type: "BlockStatement"; + body: Array<Statement>; + directives: Array<Directive>; +} + +export interface BreakStatement extends BaseNode { + type: "BreakStatement"; + label: Identifier | null; +} + +export interface CallExpression extends BaseNode { + type: "CallExpression"; + callee: Expression | V8IntrinsicIdentifier; + arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>; + optional: true | false | null; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface CatchClause extends BaseNode { + type: "CatchClause"; + param: Identifier | ArrayPattern | ObjectPattern | null; + body: BlockStatement; +} + +export interface ConditionalExpression extends BaseNode { + type: "ConditionalExpression"; + test: Expression; + consequent: Expression; + alternate: Expression; +} + +export interface ContinueStatement extends BaseNode { + type: "ContinueStatement"; + label: Identifier | null; +} + +export interface DebuggerStatement extends BaseNode { + type: "DebuggerStatement"; +} + +export interface DoWhileStatement extends BaseNode { + type: "DoWhileStatement"; + test: Expression; + body: Statement; +} + +export interface EmptyStatement extends BaseNode { + type: "EmptyStatement"; +} + +export interface ExpressionStatement extends BaseNode { + type: "ExpressionStatement"; + expression: Expression; +} + +export interface File extends BaseNode { + type: "File"; + program: Program; + comments: Array<CommentBlock | CommentLine> | null; + tokens: Array<any> | null; +} + +export interface ForInStatement extends BaseNode { + type: "ForInStatement"; + left: VariableDeclaration | LVal; + right: Expression; + body: Statement; +} + +export interface ForStatement extends BaseNode { + type: "ForStatement"; + init: VariableDeclaration | Expression | null; + test: Expression | null; + update: Expression | null; + body: Statement; +} + +export interface FunctionDeclaration extends BaseNode { + type: "FunctionDeclaration"; + id: Identifier | null; + params: Array<Identifier | Pattern | RestElement>; + body: BlockStatement; + generator: boolean; + async: boolean; + declare: boolean | null; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface FunctionExpression extends BaseNode { + type: "FunctionExpression"; + id: Identifier | null; + params: Array<Identifier | Pattern | RestElement>; + body: BlockStatement; + generator: boolean; + async: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface Identifier extends BaseNode { + type: "Identifier"; + name: string; + decorators: Array<Decorator> | null; + optional: boolean | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface IfStatement extends BaseNode { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate: Statement | null; +} + +export interface LabeledStatement extends BaseNode { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} + +export interface StringLiteral extends BaseNode { + type: "StringLiteral"; + value: string; +} + +export interface NumericLiteral extends BaseNode { + type: "NumericLiteral"; + value: number; +} + +export interface NullLiteral extends BaseNode { + type: "NullLiteral"; +} + +export interface BooleanLiteral extends BaseNode { + type: "BooleanLiteral"; + value: boolean; +} + +export interface RegExpLiteral extends BaseNode { + type: "RegExpLiteral"; + pattern: string; + flags: string; +} + +export interface LogicalExpression extends BaseNode { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: Expression; + right: Expression; +} + +export interface MemberExpression extends BaseNode { + type: "MemberExpression"; + object: Expression; + property: Expression | Identifier | PrivateName; + computed: boolean; + optional: true | false | null; +} + +export interface NewExpression extends BaseNode { + type: "NewExpression"; + callee: Expression | V8IntrinsicIdentifier; + arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>; + optional: true | false | null; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface Program extends BaseNode { + type: "Program"; + body: Array<Statement>; + directives: Array<Directive>; + sourceType: "script" | "module"; + interpreter: InterpreterDirective | null; + sourceFile: string; +} + +export interface ObjectExpression extends BaseNode { + type: "ObjectExpression"; + properties: Array<ObjectMethod | ObjectProperty | SpreadElement>; +} + +export interface ObjectMethod extends BaseNode { + type: "ObjectMethod"; + kind: "method" | "get" | "set"; + key: Expression | Identifier | StringLiteral | NumericLiteral; + params: Array<Identifier | Pattern | RestElement>; + body: BlockStatement; + computed: boolean; + generator: boolean; + async: boolean; + decorators: Array<Decorator> | null; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ObjectProperty extends BaseNode { + type: "ObjectProperty"; + key: Expression | Identifier | StringLiteral | NumericLiteral; + value: Expression | PatternLike; + computed: boolean; + shorthand: boolean; + decorators: Array<Decorator> | null; +} + +export interface RestElement extends BaseNode { + type: "RestElement"; + argument: LVal; + decorators: Array<Decorator> | null; + optional: boolean | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ReturnStatement extends BaseNode { + type: "ReturnStatement"; + argument: Expression | null; +} + +export interface SequenceExpression extends BaseNode { + type: "SequenceExpression"; + expressions: Array<Expression>; +} + +export interface ParenthesizedExpression extends BaseNode { + type: "ParenthesizedExpression"; + expression: Expression; +} + +export interface SwitchCase extends BaseNode { + type: "SwitchCase"; + test: Expression | null; + consequent: Array<Statement>; +} + +export interface SwitchStatement extends BaseNode { + type: "SwitchStatement"; + discriminant: Expression; + cases: Array<SwitchCase>; +} + +export interface ThisExpression extends BaseNode { + type: "ThisExpression"; +} + +export interface ThrowStatement extends BaseNode { + type: "ThrowStatement"; + argument: Expression; +} + +export interface TryStatement extends BaseNode { + type: "TryStatement"; + block: BlockStatement; + handler: CatchClause | null; + finalizer: BlockStatement | null; +} + +export interface UnaryExpression extends BaseNode { + type: "UnaryExpression"; + operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; + argument: Expression; + prefix: boolean; +} + +export interface UpdateExpression extends BaseNode { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: Expression; + prefix: boolean; +} + +export interface VariableDeclaration extends BaseNode { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: Array<VariableDeclarator>; + declare: boolean | null; +} + +export interface VariableDeclarator extends BaseNode { + type: "VariableDeclarator"; + id: LVal; + init: Expression | null; + definite: boolean | null; +} + +export interface WhileStatement extends BaseNode { + type: "WhileStatement"; + test: Expression; + body: Statement; +} + +export interface WithStatement extends BaseNode { + type: "WithStatement"; + object: Expression; + body: Statement; +} + +export interface AssignmentPattern extends BaseNode { + type: "AssignmentPattern"; + left: Identifier | ObjectPattern | ArrayPattern | MemberExpression; + right: Expression; + decorators: Array<Decorator> | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ArrayPattern extends BaseNode { + type: "ArrayPattern"; + elements: Array<null | PatternLike>; + decorators: Array<Decorator> | null; + optional: boolean | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ArrowFunctionExpression extends BaseNode { + type: "ArrowFunctionExpression"; + params: Array<Identifier | Pattern | RestElement>; + body: BlockStatement | Expression; + async: boolean; + expression: boolean; + generator: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ClassBody extends BaseNode { + type: "ClassBody"; + body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>; +} + +export interface ClassExpression extends BaseNode { + type: "ClassExpression"; + id: Identifier | null; + superClass: Expression | null; + body: ClassBody; + decorators: Array<Decorator> | null; + implements: Array<TSExpressionWithTypeArguments | ClassImplements> | null; + mixins: InterfaceExtends | null; + superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ClassDeclaration extends BaseNode { + type: "ClassDeclaration"; + id: Identifier; + superClass: Expression | null; + body: ClassBody; + decorators: Array<Decorator> | null; + abstract: boolean | null; + declare: boolean | null; + implements: Array<TSExpressionWithTypeArguments | ClassImplements> | null; + mixins: InterfaceExtends | null; + superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ExportAllDeclaration extends BaseNode { + type: "ExportAllDeclaration"; + source: StringLiteral; + assertions: Array<ImportAttribute> | null; + exportKind: "type" | "value" | null; +} + +export interface ExportDefaultDeclaration extends BaseNode { + type: "ExportDefaultDeclaration"; + declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression; + exportKind: "value" | null; +} + +export interface ExportNamedDeclaration extends BaseNode { + type: "ExportNamedDeclaration"; + declaration: Declaration | null; + specifiers: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>; + source: StringLiteral | null; + assertions: Array<ImportAttribute> | null; + exportKind: "type" | "value" | null; +} + +export interface ExportSpecifier extends BaseNode { + type: "ExportSpecifier"; + local: Identifier; + exported: Identifier | StringLiteral; + exportKind: "type" | "value" | null; +} + +export interface ForOfStatement extends BaseNode { + type: "ForOfStatement"; + left: VariableDeclaration | LVal; + right: Expression; + body: Statement; + await: boolean; +} + +export interface ImportDeclaration extends BaseNode { + type: "ImportDeclaration"; + specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>; + source: StringLiteral; + assertions: Array<ImportAttribute> | null; + importKind: "type" | "typeof" | "value" | null; +} + +export interface ImportDefaultSpecifier extends BaseNode { + type: "ImportDefaultSpecifier"; + local: Identifier; +} + +export interface ImportNamespaceSpecifier extends BaseNode { + type: "ImportNamespaceSpecifier"; + local: Identifier; +} + +export interface ImportSpecifier extends BaseNode { + type: "ImportSpecifier"; + local: Identifier; + imported: Identifier | StringLiteral; + importKind: "type" | "typeof" | "value" | null; +} + +export interface MetaProperty extends BaseNode { + type: "MetaProperty"; + meta: Identifier; + property: Identifier; +} + +export interface ClassMethod extends BaseNode { + type: "ClassMethod"; + kind: "get" | "set" | "method" | "constructor"; + key: Identifier | StringLiteral | NumericLiteral | Expression; + params: Array<Identifier | Pattern | RestElement | TSParameterProperty>; + body: BlockStatement; + computed: boolean; + static: boolean; + generator: boolean; + async: boolean; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + decorators: Array<Decorator> | null; + optional: boolean | null; + override: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ObjectPattern extends BaseNode { + type: "ObjectPattern"; + properties: Array<RestElement | ObjectProperty>; + decorators: Array<Decorator> | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface SpreadElement extends BaseNode { + type: "SpreadElement"; + argument: Expression; +} + +export interface Super extends BaseNode { + type: "Super"; +} + +export interface TaggedTemplateExpression extends BaseNode { + type: "TaggedTemplateExpression"; + tag: Expression; + quasi: TemplateLiteral; + typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; +} + +export interface TemplateElement extends BaseNode { + type: "TemplateElement"; + value: { raw: string, cooked?: string }; + tail: boolean; +} + +export interface TemplateLiteral extends BaseNode { + type: "TemplateLiteral"; + quasis: Array<TemplateElement>; + expressions: Array<Expression | TSType>; +} + +export interface YieldExpression extends BaseNode { + type: "YieldExpression"; + argument: Expression | null; + delegate: boolean; +} + +export interface AwaitExpression extends BaseNode { + type: "AwaitExpression"; + argument: Expression; +} + +export interface Import extends BaseNode { + type: "Import"; +} + +export interface BigIntLiteral extends BaseNode { + type: "BigIntLiteral"; + value: string; +} + +export interface ExportNamespaceSpecifier extends BaseNode { + type: "ExportNamespaceSpecifier"; + exported: Identifier; +} + +export interface OptionalMemberExpression extends BaseNode { + type: "OptionalMemberExpression"; + object: Expression; + property: Expression | Identifier; + computed: boolean; + optional: boolean; +} + +export interface OptionalCallExpression extends BaseNode { + type: "OptionalCallExpression"; + callee: Expression; + arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>; + optional: boolean; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface ClassProperty extends BaseNode { + type: "ClassProperty"; + key: Identifier | StringLiteral | NumericLiteral | Expression; + value: Expression | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; + decorators: Array<Decorator> | null; + computed: boolean; + static: boolean; + abstract: boolean | null; + accessibility: "public" | "private" | "protected" | null; + declare: boolean | null; + definite: boolean | null; + optional: boolean | null; + override: boolean; + readonly: boolean | null; + variance: Variance | null; +} + +export interface ClassAccessorProperty extends BaseNode { + type: "ClassAccessorProperty"; + key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName; + value: Expression | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; + decorators: Array<Decorator> | null; + computed: boolean; + static: boolean; + abstract: boolean | null; + accessibility: "public" | "private" | "protected" | null; + declare: boolean | null; + definite: boolean | null; + optional: boolean | null; + override: boolean; + readonly: boolean | null; + variance: Variance | null; +} + +export interface ClassPrivateProperty extends BaseNode { + type: "ClassPrivateProperty"; + key: PrivateName; + value: Expression | null; + decorators: Array<Decorator> | null; + static: any; + definite: boolean | null; + readonly: boolean | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; + variance: Variance | null; +} + +export interface ClassPrivateMethod extends BaseNode { + type: "ClassPrivateMethod"; + kind: "get" | "set" | "method" | "constructor"; + key: PrivateName; + params: Array<Identifier | Pattern | RestElement | TSParameterProperty>; + body: BlockStatement; + static: boolean; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + async: boolean; + computed: boolean; + decorators: Array<Decorator> | null; + generator: boolean; + optional: boolean | null; + override: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface PrivateName extends BaseNode { + type: "PrivateName"; + id: Identifier; +} + +export interface StaticBlock extends BaseNode { + type: "StaticBlock"; + body: Array<Statement>; +} + +export interface AnyTypeAnnotation extends BaseNode { + type: "AnyTypeAnnotation"; +} + +export interface ArrayTypeAnnotation extends BaseNode { + type: "ArrayTypeAnnotation"; + elementType: FlowType; +} + +export interface BooleanTypeAnnotation extends BaseNode { + type: "BooleanTypeAnnotation"; +} + +export interface BooleanLiteralTypeAnnotation extends BaseNode { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; +} + +export interface NullLiteralTypeAnnotation extends BaseNode { + type: "NullLiteralTypeAnnotation"; +} + +export interface ClassImplements extends BaseNode { + type: "ClassImplements"; + id: Identifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface DeclareClass extends BaseNode { + type: "DeclareClass"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array<InterfaceExtends> | null; + body: ObjectTypeAnnotation; + implements: Array<ClassImplements> | null; + mixins: Array<InterfaceExtends> | null; +} + +export interface DeclareFunction extends BaseNode { + type: "DeclareFunction"; + id: Identifier; + predicate: DeclaredPredicate | null; +} + +export interface DeclareInterface extends BaseNode { + type: "DeclareInterface"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array<InterfaceExtends> | null; + body: ObjectTypeAnnotation; + implements: Array<ClassImplements> | null; + mixins: Array<InterfaceExtends> | null; +} + +export interface DeclareModule extends BaseNode { + type: "DeclareModule"; + id: Identifier | StringLiteral; + body: BlockStatement; + kind: "CommonJS" | "ES" | null; +} + +export interface DeclareModuleExports extends BaseNode { + type: "DeclareModuleExports"; + typeAnnotation: TypeAnnotation; +} + +export interface DeclareTypeAlias extends BaseNode { + type: "DeclareTypeAlias"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + right: FlowType; +} + +export interface DeclareOpaqueType extends BaseNode { + type: "DeclareOpaqueType"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + supertype: FlowType | null; + impltype: FlowType | null; +} + +export interface DeclareVariable extends BaseNode { + type: "DeclareVariable"; + id: Identifier; +} + +export interface DeclareExportDeclaration extends BaseNode { + type: "DeclareExportDeclaration"; + declaration: Flow | null; + specifiers: Array<ExportSpecifier | ExportNamespaceSpecifier> | null; + source: StringLiteral | null; + default: boolean | null; +} + +export interface DeclareExportAllDeclaration extends BaseNode { + type: "DeclareExportAllDeclaration"; + source: StringLiteral; + exportKind: "type" | "value" | null; +} + +export interface DeclaredPredicate extends BaseNode { + type: "DeclaredPredicate"; + value: Flow; +} + +export interface ExistsTypeAnnotation extends BaseNode { + type: "ExistsTypeAnnotation"; +} + +export interface FunctionTypeAnnotation extends BaseNode { + type: "FunctionTypeAnnotation"; + typeParameters: TypeParameterDeclaration | null; + params: Array<FunctionTypeParam>; + rest: FunctionTypeParam | null; + returnType: FlowType; + this: FunctionTypeParam | null; +} + +export interface FunctionTypeParam extends BaseNode { + type: "FunctionTypeParam"; + name: Identifier | null; + typeAnnotation: FlowType; + optional: boolean | null; +} + +export interface GenericTypeAnnotation extends BaseNode { + type: "GenericTypeAnnotation"; + id: Identifier | QualifiedTypeIdentifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface InferredPredicate extends BaseNode { + type: "InferredPredicate"; +} + +export interface InterfaceExtends extends BaseNode { + type: "InterfaceExtends"; + id: Identifier | QualifiedTypeIdentifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface InterfaceDeclaration extends BaseNode { + type: "InterfaceDeclaration"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array<InterfaceExtends> | null; + body: ObjectTypeAnnotation; + implements: Array<ClassImplements> | null; + mixins: Array<InterfaceExtends> | null; +} + +export interface InterfaceTypeAnnotation extends BaseNode { + type: "InterfaceTypeAnnotation"; + extends: Array<InterfaceExtends> | null; + body: ObjectTypeAnnotation; +} + +export interface IntersectionTypeAnnotation extends BaseNode { + type: "IntersectionTypeAnnotation"; + types: Array<FlowType>; +} + +export interface MixedTypeAnnotation extends BaseNode { + type: "MixedTypeAnnotation"; +} + +export interface EmptyTypeAnnotation extends BaseNode { + type: "EmptyTypeAnnotation"; +} + +export interface NullableTypeAnnotation extends BaseNode { + type: "NullableTypeAnnotation"; + typeAnnotation: FlowType; +} + +export interface NumberLiteralTypeAnnotation extends BaseNode { + type: "NumberLiteralTypeAnnotation"; + value: number; +} + +export interface NumberTypeAnnotation extends BaseNode { + type: "NumberTypeAnnotation"; +} + +export interface ObjectTypeAnnotation extends BaseNode { + type: "ObjectTypeAnnotation"; + properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>; + indexers: Array<ObjectTypeIndexer> | null; + callProperties: Array<ObjectTypeCallProperty> | null; + internalSlots: Array<ObjectTypeInternalSlot> | null; + exact: boolean; + inexact: boolean | null; +} + +export interface ObjectTypeInternalSlot extends BaseNode { + type: "ObjectTypeInternalSlot"; + id: Identifier; + value: FlowType; + optional: boolean; + static: boolean; + method: boolean; +} + +export interface ObjectTypeCallProperty extends BaseNode { + type: "ObjectTypeCallProperty"; + value: FlowType; + static: boolean; +} + +export interface ObjectTypeIndexer extends BaseNode { + type: "ObjectTypeIndexer"; + id: Identifier | null; + key: FlowType; + value: FlowType; + variance: Variance | null; + static: boolean; +} + +export interface ObjectTypeProperty extends BaseNode { + type: "ObjectTypeProperty"; + key: Identifier | StringLiteral; + value: FlowType; + variance: Variance | null; + kind: "init" | "get" | "set"; + method: boolean; + optional: boolean; + proto: boolean; + static: boolean; +} + +export interface ObjectTypeSpreadProperty extends BaseNode { + type: "ObjectTypeSpreadProperty"; + argument: FlowType; +} + +export interface OpaqueType extends BaseNode { + type: "OpaqueType"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + supertype: FlowType | null; + impltype: FlowType; +} + +export interface QualifiedTypeIdentifier extends BaseNode { + type: "QualifiedTypeIdentifier"; + id: Identifier; + qualification: Identifier | QualifiedTypeIdentifier; +} + +export interface StringLiteralTypeAnnotation extends BaseNode { + type: "StringLiteralTypeAnnotation"; + value: string; +} + +export interface StringTypeAnnotation extends BaseNode { + type: "StringTypeAnnotation"; +} + +export interface SymbolTypeAnnotation extends BaseNode { + type: "SymbolTypeAnnotation"; +} + +export interface ThisTypeAnnotation extends BaseNode { + type: "ThisTypeAnnotation"; +} + +export interface TupleTypeAnnotation extends BaseNode { + type: "TupleTypeAnnotation"; + types: Array<FlowType>; +} + +export interface TypeofTypeAnnotation extends BaseNode { + type: "TypeofTypeAnnotation"; + argument: FlowType; +} + +export interface TypeAlias extends BaseNode { + type: "TypeAlias"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + right: FlowType; +} + +export interface TypeAnnotation extends BaseNode { + type: "TypeAnnotation"; + typeAnnotation: FlowType; +} + +export interface TypeCastExpression extends BaseNode { + type: "TypeCastExpression"; + expression: Expression; + typeAnnotation: TypeAnnotation; +} + +export interface TypeParameter extends BaseNode { + type: "TypeParameter"; + bound: TypeAnnotation | null; + default: FlowType | null; + variance: Variance | null; + name: string; +} + +export interface TypeParameterDeclaration extends BaseNode { + type: "TypeParameterDeclaration"; + params: Array<TypeParameter>; +} + +export interface TypeParameterInstantiation extends BaseNode { + type: "TypeParameterInstantiation"; + params: Array<FlowType>; +} + +export interface UnionTypeAnnotation extends BaseNode { + type: "UnionTypeAnnotation"; + types: Array<FlowType>; +} + +export interface Variance extends BaseNode { + type: "Variance"; + kind: "minus" | "plus"; +} + +export interface VoidTypeAnnotation extends BaseNode { + type: "VoidTypeAnnotation"; +} + +export interface EnumDeclaration extends BaseNode { + type: "EnumDeclaration"; + id: Identifier; + body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody; +} + +export interface EnumBooleanBody extends BaseNode { + type: "EnumBooleanBody"; + members: Array<EnumBooleanMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} + +export interface EnumNumberBody extends BaseNode { + type: "EnumNumberBody"; + members: Array<EnumNumberMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} + +export interface EnumStringBody extends BaseNode { + type: "EnumStringBody"; + members: Array<EnumStringMember | EnumDefaultedMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} + +export interface EnumSymbolBody extends BaseNode { + type: "EnumSymbolBody"; + members: Array<EnumDefaultedMember>; + hasUnknownMembers: boolean; +} + +export interface EnumBooleanMember extends BaseNode { + type: "EnumBooleanMember"; + id: Identifier; + init: BooleanLiteral; +} + +export interface EnumNumberMember extends BaseNode { + type: "EnumNumberMember"; + id: Identifier; + init: NumericLiteral; +} + +export interface EnumStringMember extends BaseNode { + type: "EnumStringMember"; + id: Identifier; + init: StringLiteral; +} + +export interface EnumDefaultedMember extends BaseNode { + type: "EnumDefaultedMember"; + id: Identifier; +} + +export interface IndexedAccessType extends BaseNode { + type: "IndexedAccessType"; + objectType: FlowType; + indexType: FlowType; +} + +export interface OptionalIndexedAccessType extends BaseNode { + type: "OptionalIndexedAccessType"; + objectType: FlowType; + indexType: FlowType; + optional: boolean; +} + +export interface JSXAttribute extends BaseNode { + type: "JSXAttribute"; + name: JSXIdentifier | JSXNamespacedName; + value: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null; +} + +export interface JSXClosingElement extends BaseNode { + type: "JSXClosingElement"; + name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName; +} + +export interface JSXElement extends BaseNode { + type: "JSXElement"; + openingElement: JSXOpeningElement; + closingElement: JSXClosingElement | null; + children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>; + selfClosing: boolean | null; +} + +export interface JSXEmptyExpression extends BaseNode { + type: "JSXEmptyExpression"; +} + +export interface JSXExpressionContainer extends BaseNode { + type: "JSXExpressionContainer"; + expression: Expression | JSXEmptyExpression; +} + +export interface JSXSpreadChild extends BaseNode { + type: "JSXSpreadChild"; + expression: Expression; +} + +export interface JSXIdentifier extends BaseNode { + type: "JSXIdentifier"; + name: string; +} + +export interface JSXMemberExpression extends BaseNode { + type: "JSXMemberExpression"; + object: JSXMemberExpression | JSXIdentifier; + property: JSXIdentifier; +} + +export interface JSXNamespacedName extends BaseNode { + type: "JSXNamespacedName"; + namespace: JSXIdentifier; + name: JSXIdentifier; +} + +export interface JSXOpeningElement extends BaseNode { + type: "JSXOpeningElement"; + name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName; + attributes: Array<JSXAttribute | JSXSpreadAttribute>; + selfClosing: boolean; + typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; +} + +export interface JSXSpreadAttribute extends BaseNode { + type: "JSXSpreadAttribute"; + argument: Expression; +} + +export interface JSXText extends BaseNode { + type: "JSXText"; + value: string; +} + +export interface JSXFragment extends BaseNode { + type: "JSXFragment"; + openingFragment: JSXOpeningFragment; + closingFragment: JSXClosingFragment; + children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>; +} + +export interface JSXOpeningFragment extends BaseNode { + type: "JSXOpeningFragment"; +} + +export interface JSXClosingFragment extends BaseNode { + type: "JSXClosingFragment"; +} + +export interface Noop extends BaseNode { + type: "Noop"; +} + +export interface Placeholder extends BaseNode { + type: "Placeholder"; + expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; + name: Identifier; +} + +export interface V8IntrinsicIdentifier extends BaseNode { + type: "V8IntrinsicIdentifier"; + name: string; +} + +export interface ArgumentPlaceholder extends BaseNode { + type: "ArgumentPlaceholder"; +} + +export interface BindExpression extends BaseNode { + type: "BindExpression"; + object: Expression; + callee: Expression; +} + +export interface ImportAttribute extends BaseNode { + type: "ImportAttribute"; + key: Identifier | StringLiteral; + value: StringLiteral; +} + +export interface Decorator extends BaseNode { + type: "Decorator"; + expression: Expression; +} + +export interface DoExpression extends BaseNode { + type: "DoExpression"; + body: BlockStatement; + async: boolean; +} + +export interface ExportDefaultSpecifier extends BaseNode { + type: "ExportDefaultSpecifier"; + exported: Identifier; +} + +export interface RecordExpression extends BaseNode { + type: "RecordExpression"; + properties: Array<ObjectProperty | SpreadElement>; +} + +export interface TupleExpression extends BaseNode { + type: "TupleExpression"; + elements: Array<Expression | SpreadElement>; +} + +export interface DecimalLiteral extends BaseNode { + type: "DecimalLiteral"; + value: string; +} + +export interface ModuleExpression extends BaseNode { + type: "ModuleExpression"; + body: Program; +} + +export interface TopicReference extends BaseNode { + type: "TopicReference"; +} + +export interface PipelineTopicExpression extends BaseNode { + type: "PipelineTopicExpression"; + expression: Expression; +} + +export interface PipelineBareFunction extends BaseNode { + type: "PipelineBareFunction"; + callee: Expression; +} + +export interface PipelinePrimaryTopicReference extends BaseNode { + type: "PipelinePrimaryTopicReference"; +} + +export interface TSParameterProperty extends BaseNode { + type: "TSParameterProperty"; + parameter: Identifier | AssignmentPattern; + accessibility: "public" | "private" | "protected" | null; + decorators: Array<Decorator> | null; + override: boolean | null; + readonly: boolean | null; +} + +export interface TSDeclareFunction extends BaseNode { + type: "TSDeclareFunction"; + id: Identifier | null; + typeParameters: TSTypeParameterDeclaration | Noop | null; + params: Array<Identifier | Pattern | RestElement>; + returnType: TSTypeAnnotation | Noop | null; + async: boolean; + declare: boolean | null; + generator: boolean; +} + +export interface TSDeclareMethod extends BaseNode { + type: "TSDeclareMethod"; + decorators: Array<Decorator> | null; + key: Identifier | StringLiteral | NumericLiteral | Expression; + typeParameters: TSTypeParameterDeclaration | Noop | null; + params: Array<Identifier | Pattern | RestElement | TSParameterProperty>; + returnType: TSTypeAnnotation | Noop | null; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + async: boolean; + computed: boolean; + generator: boolean; + kind: "get" | "set" | "method" | "constructor"; + optional: boolean | null; + override: boolean; + static: boolean; +} + +export interface TSQualifiedName extends BaseNode { + type: "TSQualifiedName"; + left: TSEntityName; + right: Identifier; +} + +export interface TSCallSignatureDeclaration extends BaseNode { + type: "TSCallSignatureDeclaration"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSConstructSignatureDeclaration extends BaseNode { + type: "TSConstructSignatureDeclaration"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSPropertySignature extends BaseNode { + type: "TSPropertySignature"; + key: Expression; + typeAnnotation: TSTypeAnnotation | null; + initializer: Expression | null; + computed: boolean | null; + kind: "get" | "set"; + optional: boolean | null; + readonly: boolean | null; +} + +export interface TSMethodSignature extends BaseNode { + type: "TSMethodSignature"; + key: Expression; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation: TSTypeAnnotation | null; + computed: boolean | null; + kind: "method" | "get" | "set"; + optional: boolean | null; +} + +export interface TSIndexSignature extends BaseNode { + type: "TSIndexSignature"; + parameters: Array<Identifier>; + typeAnnotation: TSTypeAnnotation | null; + readonly: boolean | null; + static: boolean | null; +} + +export interface TSAnyKeyword extends BaseNode { + type: "TSAnyKeyword"; +} + +export interface TSBooleanKeyword extends BaseNode { + type: "TSBooleanKeyword"; +} + +export interface TSBigIntKeyword extends BaseNode { + type: "TSBigIntKeyword"; +} + +export interface TSIntrinsicKeyword extends BaseNode { + type: "TSIntrinsicKeyword"; +} + +export interface TSNeverKeyword extends BaseNode { + type: "TSNeverKeyword"; +} + +export interface TSNullKeyword extends BaseNode { + type: "TSNullKeyword"; +} + +export interface TSNumberKeyword extends BaseNode { + type: "TSNumberKeyword"; +} + +export interface TSObjectKeyword extends BaseNode { + type: "TSObjectKeyword"; +} + +export interface TSStringKeyword extends BaseNode { + type: "TSStringKeyword"; +} + +export interface TSSymbolKeyword extends BaseNode { + type: "TSSymbolKeyword"; +} + +export interface TSUndefinedKeyword extends BaseNode { + type: "TSUndefinedKeyword"; +} + +export interface TSUnknownKeyword extends BaseNode { + type: "TSUnknownKeyword"; +} + +export interface TSVoidKeyword extends BaseNode { + type: "TSVoidKeyword"; +} + +export interface TSThisType extends BaseNode { + type: "TSThisType"; +} + +export interface TSFunctionType extends BaseNode { + type: "TSFunctionType"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSConstructorType extends BaseNode { + type: "TSConstructorType"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation: TSTypeAnnotation | null; + abstract: boolean | null; +} + +export interface TSTypeReference extends BaseNode { + type: "TSTypeReference"; + typeName: TSEntityName; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSTypePredicate extends BaseNode { + type: "TSTypePredicate"; + parameterName: Identifier | TSThisType; + typeAnnotation: TSTypeAnnotation | null; + asserts: boolean | null; +} + +export interface TSTypeQuery extends BaseNode { + type: "TSTypeQuery"; + exprName: TSEntityName | TSImportType; +} + +export interface TSTypeLiteral extends BaseNode { + type: "TSTypeLiteral"; + members: Array<TSTypeElement>; +} + +export interface TSArrayType extends BaseNode { + type: "TSArrayType"; + elementType: TSType; +} + +export interface TSTupleType extends BaseNode { + type: "TSTupleType"; + elementTypes: Array<TSType | TSNamedTupleMember>; +} + +export interface TSOptionalType extends BaseNode { + type: "TSOptionalType"; + typeAnnotation: TSType; +} + +export interface TSRestType extends BaseNode { + type: "TSRestType"; + typeAnnotation: TSType; +} + +export interface TSNamedTupleMember extends BaseNode { + type: "TSNamedTupleMember"; + label: Identifier; + elementType: TSType; + optional: boolean; +} + +export interface TSUnionType extends BaseNode { + type: "TSUnionType"; + types: Array<TSType>; +} + +export interface TSIntersectionType extends BaseNode { + type: "TSIntersectionType"; + types: Array<TSType>; +} + +export interface TSConditionalType extends BaseNode { + type: "TSConditionalType"; + checkType: TSType; + extendsType: TSType; + trueType: TSType; + falseType: TSType; +} + +export interface TSInferType extends BaseNode { + type: "TSInferType"; + typeParameter: TSTypeParameter; +} + +export interface TSParenthesizedType extends BaseNode { + type: "TSParenthesizedType"; + typeAnnotation: TSType; +} + +export interface TSTypeOperator extends BaseNode { + type: "TSTypeOperator"; + typeAnnotation: TSType; + operator: string; +} + +export interface TSIndexedAccessType extends BaseNode { + type: "TSIndexedAccessType"; + objectType: TSType; + indexType: TSType; +} + +export interface TSMappedType extends BaseNode { + type: "TSMappedType"; + typeParameter: TSTypeParameter; + typeAnnotation: TSType | null; + nameType: TSType | null; + optional: boolean | null; + readonly: boolean | null; +} + +export interface TSLiteralType extends BaseNode { + type: "TSLiteralType"; + literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression; +} + +export interface TSExpressionWithTypeArguments extends BaseNode { + type: "TSExpressionWithTypeArguments"; + expression: TSEntityName; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSInterfaceDeclaration extends BaseNode { + type: "TSInterfaceDeclaration"; + id: Identifier; + typeParameters: TSTypeParameterDeclaration | null; + extends: Array<TSExpressionWithTypeArguments> | null; + body: TSInterfaceBody; + declare: boolean | null; +} + +export interface TSInterfaceBody extends BaseNode { + type: "TSInterfaceBody"; + body: Array<TSTypeElement>; +} + +export interface TSTypeAliasDeclaration extends BaseNode { + type: "TSTypeAliasDeclaration"; + id: Identifier; + typeParameters: TSTypeParameterDeclaration | null; + typeAnnotation: TSType; + declare: boolean | null; +} + +export interface TSAsExpression extends BaseNode { + type: "TSAsExpression"; + expression: Expression; + typeAnnotation: TSType; +} + +export interface TSTypeAssertion extends BaseNode { + type: "TSTypeAssertion"; + typeAnnotation: TSType; + expression: Expression; +} + +export interface TSEnumDeclaration extends BaseNode { + type: "TSEnumDeclaration"; + id: Identifier; + members: Array<TSEnumMember>; + const: boolean | null; + declare: boolean | null; + initializer: Expression | null; +} + +export interface TSEnumMember extends BaseNode { + type: "TSEnumMember"; + id: Identifier | StringLiteral; + initializer: Expression | null; +} + +export interface TSModuleDeclaration extends BaseNode { + type: "TSModuleDeclaration"; + id: Identifier | StringLiteral; + body: TSModuleBlock | TSModuleDeclaration; + declare: boolean | null; + global: boolean | null; +} + +export interface TSModuleBlock extends BaseNode { + type: "TSModuleBlock"; + body: Array<Statement>; +} + +export interface TSImportType extends BaseNode { + type: "TSImportType"; + argument: StringLiteral; + qualifier: TSEntityName | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSImportEqualsDeclaration extends BaseNode { + type: "TSImportEqualsDeclaration"; + id: Identifier; + moduleReference: TSEntityName | TSExternalModuleReference; + importKind: "type" | "value" | null; + isExport: boolean; +} + +export interface TSExternalModuleReference extends BaseNode { + type: "TSExternalModuleReference"; + expression: StringLiteral; +} + +export interface TSNonNullExpression extends BaseNode { + type: "TSNonNullExpression"; + expression: Expression; +} + +export interface TSExportAssignment extends BaseNode { + type: "TSExportAssignment"; + expression: Expression; +} + +export interface TSNamespaceExportDeclaration extends BaseNode { + type: "TSNamespaceExportDeclaration"; + id: Identifier; +} + +export interface TSTypeAnnotation extends BaseNode { + type: "TSTypeAnnotation"; + typeAnnotation: TSType; +} + +export interface TSTypeParameterInstantiation extends BaseNode { + type: "TSTypeParameterInstantiation"; + params: Array<TSType>; +} + +export interface TSTypeParameterDeclaration extends BaseNode { + type: "TSTypeParameterDeclaration"; + params: Array<TSTypeParameter>; +} + +export interface TSTypeParameter extends BaseNode { + type: "TSTypeParameter"; + constraint: TSType | null; + default: TSType | null; + name: string; +} + +/** + * @deprecated Use `NumericLiteral` + */ +export type NumberLiteral = NumericLiteral; + +/** + * @deprecated Use `RegExpLiteral` + */ +export type RegexLiteral = RegExpLiteral; + +/** + * @deprecated Use `RestElement` + */ +export type RestProperty = RestElement; + +/** + * @deprecated Use `SpreadElement` + */ +export type SpreadProperty = SpreadElement; + +export type Standardized = ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassAccessorProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock; +export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | RecordExpression | TupleExpression | DecimalLiteral | ModuleExpression | TopicReference | PipelineTopicExpression | PipelineBareFunction | PipelinePrimaryTopicReference | TSAsExpression | TSTypeAssertion | TSNonNullExpression; +export type Binary = BinaryExpression | LogicalExpression; +export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock; +export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock; +export type Block = BlockStatement | Program | TSModuleBlock; +export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration; +export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression; +export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement; +export type Conditional = ConditionalExpression | IfStatement; +export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement; +export type While = DoWhileStatement | WhileStatement; +export type ExpressionWrapper = ExpressionStatement | ParenthesizedExpression | TypeCastExpression; +export type For = ForInStatement | ForStatement | ForOfStatement; +export type ForXStatement = ForInStatement | ForOfStatement; +export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; +export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod | StaticBlock; +export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral | DecimalLiteral; +export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; +export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern; +export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty; +export type TSEntityName = Identifier | TSQualifiedName; +export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral | DecimalLiteral; +export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | BigIntLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | DecimalLiteral; +export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty; +export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod; +export type ObjectMember = ObjectMethod | ObjectProperty; +export type Property = ObjectProperty | ClassProperty | ClassAccessorProperty | ClassPrivateProperty; +export type UnaryLike = UnaryExpression | SpreadElement; +export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern; +export type Class = ClassExpression | ClassDeclaration; +export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration; +export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; +export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportNamespaceSpecifier | ExportDefaultSpecifier; +export type Accessor = ClassAccessorProperty; +export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName; +export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | IndexedAccessType | OptionalIndexedAccessType; +export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType; +export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation; +export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias; +export type FlowPredicate = DeclaredPredicate | InferredPredicate; +export type EnumBody = EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody; +export type EnumMember = EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember; +export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment; +export type Miscellaneous = Noop | Placeholder | V8IntrinsicIdentifier; +export type TypeScript = TSParameterProperty | TSDeclareFunction | TSDeclareMethod | TSQualifiedName | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature | TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSNamedTupleMember | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSInterfaceDeclaration | TSInterfaceBody | TSTypeAliasDeclaration | TSAsExpression | TSTypeAssertion | TSEnumDeclaration | TSEnumMember | TSModuleDeclaration | TSModuleBlock | TSImportType | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | TSExportAssignment | TSNamespaceExportDeclaration | TSTypeAnnotation | TSTypeParameterInstantiation | TSTypeParameterDeclaration | TSTypeParameter; +export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature; +export type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType; +export type TSBaseType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSLiteralType; + +export interface Aliases { + Standardized: Standardized; + Expression: Expression; + Binary: Binary; + Scopable: Scopable; + BlockParent: BlockParent; + Block: Block; + Statement: Statement; + Terminatorless: Terminatorless; + CompletionStatement: CompletionStatement; + Conditional: Conditional; + Loop: Loop; + While: While; + ExpressionWrapper: ExpressionWrapper; + For: For; + ForXStatement: ForXStatement; + Function: Function; + FunctionParent: FunctionParent; + Pureish: Pureish; + Declaration: Declaration; + PatternLike: PatternLike; + LVal: LVal; + TSEntityName: TSEntityName; + Literal: Literal; + Immutable: Immutable; + UserWhitespacable: UserWhitespacable; + Method: Method; + ObjectMember: ObjectMember; + Property: Property; + UnaryLike: UnaryLike; + Pattern: Pattern; + Class: Class; + ModuleDeclaration: ModuleDeclaration; + ExportDeclaration: ExportDeclaration; + ModuleSpecifier: ModuleSpecifier; + Accessor: Accessor; + Private: Private; + Flow: Flow; + FlowType: FlowType; + FlowBaseAnnotation: FlowBaseAnnotation; + FlowDeclaration: FlowDeclaration; + FlowPredicate: FlowPredicate; + EnumBody: EnumBody; + EnumMember: EnumMember; + JSX: JSX; + Miscellaneous: Miscellaneous; + TypeScript: TypeScript; + TSTypeElement: TSTypeElement; + TSType: TSType; + TSBaseType: TSBaseType; +} + +export function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression; +export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression; +export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression | PrivateName, right: Expression): BinaryExpression; +export function interpreterDirective(value: string): InterpreterDirective; +export function directive(value: DirectiveLiteral): Directive; +export function directiveLiteral(value: string): DirectiveLiteral; +export function blockStatement(body: Array<Statement>, directives?: Array<Directive>): BlockStatement; +export function breakStatement(label?: Identifier | null): BreakStatement; +export function callExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): CallExpression; +export function catchClause(param: Identifier | ArrayPattern | ObjectPattern | null | undefined, body: BlockStatement): CatchClause; +export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression; +export function continueStatement(label?: Identifier | null): ContinueStatement; +export function debuggerStatement(): DebuggerStatement; +export function doWhileStatement(test: Expression, body: Statement): DoWhileStatement; +export function emptyStatement(): EmptyStatement; +export function expressionStatement(expression: Expression): ExpressionStatement; +export function file(program: Program, comments?: Array<CommentBlock | CommentLine> | null, tokens?: Array<any> | null): File; +export function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement; +export function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement; +export function functionDeclaration(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, generator?: boolean, async?: boolean): FunctionDeclaration; +export function functionExpression(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, generator?: boolean, async?: boolean): FunctionExpression; +export function identifier(name: string): Identifier; +export function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement; +export function labeledStatement(label: Identifier, body: Statement): LabeledStatement; +export function stringLiteral(value: string): StringLiteral; +export function numericLiteral(value: number): NumericLiteral; +export function nullLiteral(): NullLiteral; +export function booleanLiteral(value: boolean): BooleanLiteral; +export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral; +export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; +export function memberExpression(object: Expression, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: true | false | null): MemberExpression; +export function newExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): NewExpression; +export function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program; +export function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression; +export function objectMethod(kind: "method" | "get" | "set" | undefined, key: Expression | Identifier | StringLiteral | NumericLiteral, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod; +export function objectProperty(key: Expression | Identifier | StringLiteral | NumericLiteral, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<Decorator> | null): ObjectProperty; +export function restElement(argument: LVal): RestElement; +export function returnStatement(argument?: Expression | null): ReturnStatement; +export function sequenceExpression(expressions: Array<Expression>): SequenceExpression; +export function parenthesizedExpression(expression: Expression): ParenthesizedExpression; +export function switchCase(test: Expression | null | undefined, consequent: Array<Statement>): SwitchCase; +export function switchStatement(discriminant: Expression, cases: Array<SwitchCase>): SwitchStatement; +export function thisExpression(): ThisExpression; +export function throwStatement(argument: Expression): ThrowStatement; +export function tryStatement(block: BlockStatement, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement; +export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression; +export function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression; +export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<VariableDeclarator>): VariableDeclaration; +export function variableDeclarator(id: LVal, init?: Expression | null): VariableDeclarator; +export function whileStatement(test: Expression, body: Statement): WhileStatement; +export function withStatement(object: Expression, body: Statement): WithStatement; +export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression): AssignmentPattern; +export function arrayPattern(elements: Array<null | PatternLike>): ArrayPattern; +export function arrowFunctionExpression(params: Array<Identifier | Pattern | RestElement>, body: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression; +export function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>): ClassBody; +export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassExpression; +export function classDeclaration(id: Identifier, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassDeclaration; +export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration; +export function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration; +export function exportNamedDeclaration(declaration?: Declaration | null, specifiers?: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>, source?: StringLiteral | null): ExportNamedDeclaration; +export function exportSpecifier(local: Identifier, exported: Identifier | StringLiteral): ExportSpecifier; +export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement; +export function importDeclaration(specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source: StringLiteral): ImportDeclaration; +export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier; +export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier; +export function importSpecifier(local: Identifier, imported: Identifier | StringLiteral): ImportSpecifier; +export function metaProperty(meta: Identifier, property: Identifier): MetaProperty; +export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod; +export function objectPattern(properties: Array<RestElement | ObjectProperty>): ObjectPattern; +export function spreadElement(argument: Expression): SpreadElement; +declare function _super(): Super; +export { _super as super} +export function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral): TaggedTemplateExpression; +export function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): TemplateElement; +export function templateLiteral(quasis: Array<TemplateElement>, expressions: Array<Expression | TSType>): TemplateLiteral; +export function yieldExpression(argument?: Expression | null, delegate?: boolean): YieldExpression; +export function awaitExpression(argument: Expression): AwaitExpression; +declare function _import(): Import; +export { _import as import} +export function bigIntLiteral(value: string): BigIntLiteral; +export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier; +export function optionalMemberExpression(object: Expression, property: Expression | Identifier, computed: boolean | undefined, optional: boolean): OptionalMemberExpression; +export function optionalCallExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>, optional: boolean): OptionalCallExpression; +export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty; +export function classAccessorProperty(key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassAccessorProperty; +export function classPrivateProperty(key: PrivateName, value: Expression | null | undefined, decorators: Array<Decorator> | null | undefined, _static: any): ClassPrivateProperty; +export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean): ClassPrivateMethod; +export function privateName(id: Identifier): PrivateName; +export function staticBlock(body: Array<Statement>): StaticBlock; +export function anyTypeAnnotation(): AnyTypeAnnotation; +export function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation; +export function booleanTypeAnnotation(): BooleanTypeAnnotation; +export function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation; +export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation; +export function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements; +export function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): DeclareClass; +export function declareFunction(id: Identifier): DeclareFunction; +export function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): DeclareInterface; +export function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule; +export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports; +export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; +export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; +export function declareVariable(id: Identifier): DeclareVariable; +export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null): DeclareExportDeclaration; +export function declareExportAllDeclaration(source: StringLiteral): DeclareExportAllDeclaration; +export function declaredPredicate(value: Flow): DeclaredPredicate; +export function existsTypeAnnotation(): ExistsTypeAnnotation; +export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; +export function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType): FunctionTypeParam; +export function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation; +export function inferredPredicate(): InferredPredicate; +export function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends; +export function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceDeclaration; +export function interfaceTypeAnnotation(_extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation; +export function intersectionTypeAnnotation(types: Array<FlowType>): IntersectionTypeAnnotation; +export function mixedTypeAnnotation(): MixedTypeAnnotation; +export function emptyTypeAnnotation(): EmptyTypeAnnotation; +export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation; +export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation; +export function numberTypeAnnotation(): NumberTypeAnnotation; +export function objectTypeAnnotation(properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>, indexers?: Array<ObjectTypeIndexer> | null, callProperties?: Array<ObjectTypeCallProperty> | null, internalSlots?: Array<ObjectTypeInternalSlot> | null, exact?: boolean): ObjectTypeAnnotation; +export function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot; +export function objectTypeCallProperty(value: FlowType): ObjectTypeCallProperty; +export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null): ObjectTypeIndexer; +export function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null): ObjectTypeProperty; +export function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty; +export function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType; +export function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier; +export function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation; +export function stringTypeAnnotation(): StringTypeAnnotation; +export function symbolTypeAnnotation(): SymbolTypeAnnotation; +export function thisTypeAnnotation(): ThisTypeAnnotation; +export function tupleTypeAnnotation(types: Array<FlowType>): TupleTypeAnnotation; +export function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation; +export function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias; +export function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation; +export function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression; +export function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null): TypeParameter; +export function typeParameterDeclaration(params: Array<TypeParameter>): TypeParameterDeclaration; +export function typeParameterInstantiation(params: Array<FlowType>): TypeParameterInstantiation; +export function unionTypeAnnotation(types: Array<FlowType>): UnionTypeAnnotation; +export function variance(kind: "minus" | "plus"): Variance; +export function voidTypeAnnotation(): VoidTypeAnnotation; +export function enumDeclaration(id: Identifier, body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody): EnumDeclaration; +export function enumBooleanBody(members: Array<EnumBooleanMember>): EnumBooleanBody; +export function enumNumberBody(members: Array<EnumNumberMember>): EnumNumberBody; +export function enumStringBody(members: Array<EnumStringMember | EnumDefaultedMember>): EnumStringBody; +export function enumSymbolBody(members: Array<EnumDefaultedMember>): EnumSymbolBody; +export function enumBooleanMember(id: Identifier): EnumBooleanMember; +export function enumNumberMember(id: Identifier, init: NumericLiteral): EnumNumberMember; +export function enumStringMember(id: Identifier, init: StringLiteral): EnumStringMember; +export function enumDefaultedMember(id: Identifier): EnumDefaultedMember; +export function indexedAccessType(objectType: FlowType, indexType: FlowType): IndexedAccessType; +export function optionalIndexedAccessType(objectType: FlowType, indexType: FlowType): OptionalIndexedAccessType; +export function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute; +export function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName): JSXClosingElement; +export function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>, selfClosing?: boolean | null): JSXElement; +export function jsxEmptyExpression(): JSXEmptyExpression; +export function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer; +export function jsxSpreadChild(expression: Expression): JSXSpreadChild; +export function jsxIdentifier(name: string): JSXIdentifier; +export function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression; +export function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName; +export function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName, attributes: Array<JSXAttribute | JSXSpreadAttribute>, selfClosing?: boolean): JSXOpeningElement; +export function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute; +export function jsxText(value: string): JSXText; +export function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>): JSXFragment; +export function jsxOpeningFragment(): JSXOpeningFragment; +export function jsxClosingFragment(): JSXClosingFragment; +export function noop(): Noop; +export function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: Identifier): Placeholder; +export function v8IntrinsicIdentifier(name: string): V8IntrinsicIdentifier; +export function argumentPlaceholder(): ArgumentPlaceholder; +export function bindExpression(object: Expression, callee: Expression): BindExpression; +export function importAttribute(key: Identifier | StringLiteral, value: StringLiteral): ImportAttribute; +export function decorator(expression: Expression): Decorator; +export function doExpression(body: BlockStatement, async?: boolean): DoExpression; +export function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier; +export function recordExpression(properties: Array<ObjectProperty | SpreadElement>): RecordExpression; +export function tupleExpression(elements?: Array<Expression | SpreadElement>): TupleExpression; +export function decimalLiteral(value: string): DecimalLiteral; +export function moduleExpression(body: Program): ModuleExpression; +export function topicReference(): TopicReference; +export function pipelineTopicExpression(expression: Expression): PipelineTopicExpression; +export function pipelineBareFunction(callee: Expression): PipelineBareFunction; +export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference; +export function tsParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty; +export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareFunction; +export function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod; +export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName; +export function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration; +export function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration; +export function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null): TSPropertySignature; +export function tsMethodSignature(key: Expression, typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSMethodSignature; +export function tsIndexSignature(parameters: Array<Identifier>, typeAnnotation?: TSTypeAnnotation | null): TSIndexSignature; +export function tsAnyKeyword(): TSAnyKeyword; +export function tsBooleanKeyword(): TSBooleanKeyword; +export function tsBigIntKeyword(): TSBigIntKeyword; +export function tsIntrinsicKeyword(): TSIntrinsicKeyword; +export function tsNeverKeyword(): TSNeverKeyword; +export function tsNullKeyword(): TSNullKeyword; +export function tsNumberKeyword(): TSNumberKeyword; +export function tsObjectKeyword(): TSObjectKeyword; +export function tsStringKeyword(): TSStringKeyword; +export function tsSymbolKeyword(): TSSymbolKeyword; +export function tsUndefinedKeyword(): TSUndefinedKeyword; +export function tsUnknownKeyword(): TSUnknownKeyword; +export function tsVoidKeyword(): TSVoidKeyword; +export function tsThisType(): TSThisType; +export function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSFunctionType; +export function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType; +export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference; +export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation?: TSTypeAnnotation | null, asserts?: boolean | null): TSTypePredicate; +export function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery; +export function tsTypeLiteral(members: Array<TSTypeElement>): TSTypeLiteral; +export function tsArrayType(elementType: TSType): TSArrayType; +export function tsTupleType(elementTypes: Array<TSType | TSNamedTupleMember>): TSTupleType; +export function tsOptionalType(typeAnnotation: TSType): TSOptionalType; +export function tsRestType(typeAnnotation: TSType): TSRestType; +export function tsNamedTupleMember(label: Identifier, elementType: TSType, optional?: boolean): TSNamedTupleMember; +export function tsUnionType(types: Array<TSType>): TSUnionType; +export function tsIntersectionType(types: Array<TSType>): TSIntersectionType; +export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType; +export function tsInferType(typeParameter: TSTypeParameter): TSInferType; +export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType; +export function tsTypeOperator(typeAnnotation: TSType): TSTypeOperator; +export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType; +export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, nameType?: TSType | null): TSMappedType; +export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression): TSLiteralType; +export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments; +export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array<TSExpressionWithTypeArguments> | null | undefined, body: TSInterfaceBody): TSInterfaceDeclaration; +export function tsInterfaceBody(body: Array<TSTypeElement>): TSInterfaceBody; +export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType): TSTypeAliasDeclaration; +export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression; +export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion; +export function tsEnumDeclaration(id: Identifier, members: Array<TSEnumMember>): TSEnumDeclaration; +export function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember; +export function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration): TSModuleDeclaration; +export function tsModuleBlock(body: Array<Statement>): TSModuleBlock; +export function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType; +export function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference): TSImportEqualsDeclaration; +export function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference; +export function tsNonNullExpression(expression: Expression): TSNonNullExpression; +export function tsExportAssignment(expression: Expression): TSExportAssignment; +export function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration; +export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation; +export function tsTypeParameterInstantiation(params: Array<TSType>): TSTypeParameterInstantiation; +export function tsTypeParameterDeclaration(params: Array<TSTypeParameter>): TSTypeParameterDeclaration; +export function tsTypeParameter(constraint: TSType | null | undefined, _default: TSType | null | undefined, name: string): TSTypeParameter; +export function isAccessor(node: object | null | undefined, opts?: object | null): node is Accessor; +export function assertAccessor(node: object | null | undefined, opts?: object | null): void; +export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation; +export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder; +export function assertArgumentPlaceholder(node: object | null | undefined, opts?: object | null): void; +export function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression; +export function assertArrayExpression(node: object | null | undefined, opts?: object | null): void; +export function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern; +export function assertArrayPattern(node: object | null | undefined, opts?: object | null): void; +export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation; +export function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression; +export function assertArrowFunctionExpression(node: object | null | undefined, opts?: object | null): void; +export function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression; +export function assertAssignmentExpression(node: object | null | undefined, opts?: object | null): void; +export function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern; +export function assertAssignmentPattern(node: object | null | undefined, opts?: object | null): void; +export function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression; +export function assertAwaitExpression(node: object | null | undefined, opts?: object | null): void; +export function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral; +export function assertBigIntLiteral(node: object | null | undefined, opts?: object | null): void; +export function isBinary(node: object | null | undefined, opts?: object | null): node is Binary; +export function assertBinary(node: object | null | undefined, opts?: object | null): void; +export function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression; +export function assertBinaryExpression(node: object | null | undefined, opts?: object | null): void; +export function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression; +export function assertBindExpression(node: object | null | undefined, opts?: object | null): void; +export function isBlock(node: object | null | undefined, opts?: object | null): node is Block; +export function assertBlock(node: object | null | undefined, opts?: object | null): void; +export function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent; +export function assertBlockParent(node: object | null | undefined, opts?: object | null): void; +export function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement; +export function assertBlockStatement(node: object | null | undefined, opts?: object | null): void; +export function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral; +export function assertBooleanLiteral(node: object | null | undefined, opts?: object | null): void; +export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation; +export function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation; +export function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement; +export function assertBreakStatement(node: object | null | undefined, opts?: object | null): void; +export function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression; +export function assertCallExpression(node: object | null | undefined, opts?: object | null): void; +export function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause; +export function assertCatchClause(node: object | null | undefined, opts?: object | null): void; +export function isClass(node: object | null | undefined, opts?: object | null): node is Class; +export function assertClass(node: object | null | undefined, opts?: object | null): void; +export function isClassAccessorProperty(node: object | null | undefined, opts?: object | null): node is ClassAccessorProperty; +export function assertClassAccessorProperty(node: object | null | undefined, opts?: object | null): void; +export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody; +export function assertClassBody(node: object | null | undefined, opts?: object | null): void; +export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration; +export function assertClassDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression; +export function assertClassExpression(node: object | null | undefined, opts?: object | null): void; +export function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements; +export function assertClassImplements(node: object | null | undefined, opts?: object | null): void; +export function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod; +export function assertClassMethod(node: object | null | undefined, opts?: object | null): void; +export function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod; +export function assertClassPrivateMethod(node: object | null | undefined, opts?: object | null): void; +export function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty; +export function assertClassPrivateProperty(node: object | null | undefined, opts?: object | null): void; +export function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty; +export function assertClassProperty(node: object | null | undefined, opts?: object | null): void; +export function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement; +export function assertCompletionStatement(node: object | null | undefined, opts?: object | null): void; +export function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional; +export function assertConditional(node: object | null | undefined, opts?: object | null): void; +export function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression; +export function assertConditionalExpression(node: object | null | undefined, opts?: object | null): void; +export function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement; +export function assertContinueStatement(node: object | null | undefined, opts?: object | null): void; +export function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement; +export function assertDebuggerStatement(node: object | null | undefined, opts?: object | null): void; +export function isDecimalLiteral(node: object | null | undefined, opts?: object | null): node is DecimalLiteral; +export function assertDecimalLiteral(node: object | null | undefined, opts?: object | null): void; +export function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration; +export function assertDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass; +export function assertDeclareClass(node: object | null | undefined, opts?: object | null): void; +export function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration; +export function assertDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration; +export function assertDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction; +export function assertDeclareFunction(node: object | null | undefined, opts?: object | null): void; +export function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface; +export function assertDeclareInterface(node: object | null | undefined, opts?: object | null): void; +export function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule; +export function assertDeclareModule(node: object | null | undefined, opts?: object | null): void; +export function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports; +export function assertDeclareModuleExports(node: object | null | undefined, opts?: object | null): void; +export function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType; +export function assertDeclareOpaqueType(node: object | null | undefined, opts?: object | null): void; +export function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias; +export function assertDeclareTypeAlias(node: object | null | undefined, opts?: object | null): void; +export function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable; +export function assertDeclareVariable(node: object | null | undefined, opts?: object | null): void; +export function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate; +export function assertDeclaredPredicate(node: object | null | undefined, opts?: object | null): void; +export function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator; +export function assertDecorator(node: object | null | undefined, opts?: object | null): void; +export function isDirective(node: object | null | undefined, opts?: object | null): node is Directive; +export function assertDirective(node: object | null | undefined, opts?: object | null): void; +export function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral; +export function assertDirectiveLiteral(node: object | null | undefined, opts?: object | null): void; +export function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression; +export function assertDoExpression(node: object | null | undefined, opts?: object | null): void; +export function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement; +export function assertDoWhileStatement(node: object | null | undefined, opts?: object | null): void; +export function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement; +export function assertEmptyStatement(node: object | null | undefined, opts?: object | null): void; +export function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation; +export function assertEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isEnumBody(node: object | null | undefined, opts?: object | null): node is EnumBody; +export function assertEnumBody(node: object | null | undefined, opts?: object | null): void; +export function isEnumBooleanBody(node: object | null | undefined, opts?: object | null): node is EnumBooleanBody; +export function assertEnumBooleanBody(node: object | null | undefined, opts?: object | null): void; +export function isEnumBooleanMember(node: object | null | undefined, opts?: object | null): node is EnumBooleanMember; +export function assertEnumBooleanMember(node: object | null | undefined, opts?: object | null): void; +export function isEnumDeclaration(node: object | null | undefined, opts?: object | null): node is EnumDeclaration; +export function assertEnumDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isEnumDefaultedMember(node: object | null | undefined, opts?: object | null): node is EnumDefaultedMember; +export function assertEnumDefaultedMember(node: object | null | undefined, opts?: object | null): void; +export function isEnumMember(node: object | null | undefined, opts?: object | null): node is EnumMember; +export function assertEnumMember(node: object | null | undefined, opts?: object | null): void; +export function isEnumNumberBody(node: object | null | undefined, opts?: object | null): node is EnumNumberBody; +export function assertEnumNumberBody(node: object | null | undefined, opts?: object | null): void; +export function isEnumNumberMember(node: object | null | undefined, opts?: object | null): node is EnumNumberMember; +export function assertEnumNumberMember(node: object | null | undefined, opts?: object | null): void; +export function isEnumStringBody(node: object | null | undefined, opts?: object | null): node is EnumStringBody; +export function assertEnumStringBody(node: object | null | undefined, opts?: object | null): void; +export function isEnumStringMember(node: object | null | undefined, opts?: object | null): node is EnumStringMember; +export function assertEnumStringMember(node: object | null | undefined, opts?: object | null): void; +export function isEnumSymbolBody(node: object | null | undefined, opts?: object | null): node is EnumSymbolBody; +export function assertEnumSymbolBody(node: object | null | undefined, opts?: object | null): void; +export function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation; +export function assertExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration; +export function assertExportAllDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration; +export function assertExportDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration; +export function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier; +export function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): void; +export function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration; +export function assertExportNamedDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier; +export function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): void; +export function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier; +export function assertExportSpecifier(node: object | null | undefined, opts?: object | null): void; +export function isExpression(node: object | null | undefined, opts?: object | null): node is Expression; +export function assertExpression(node: object | null | undefined, opts?: object | null): void; +export function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement; +export function assertExpressionStatement(node: object | null | undefined, opts?: object | null): void; +export function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper; +export function assertExpressionWrapper(node: object | null | undefined, opts?: object | null): void; +export function isFile(node: object | null | undefined, opts?: object | null): node is File; +export function assertFile(node: object | null | undefined, opts?: object | null): void; +export function isFlow(node: object | null | undefined, opts?: object | null): node is Flow; +export function assertFlow(node: object | null | undefined, opts?: object | null): void; +export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation; +export function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration; +export function assertFlowDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate; +export function assertFlowPredicate(node: object | null | undefined, opts?: object | null): void; +export function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType; +export function assertFlowType(node: object | null | undefined, opts?: object | null): void; +export function isFor(node: object | null | undefined, opts?: object | null): node is For; +export function assertFor(node: object | null | undefined, opts?: object | null): void; +export function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement; +export function assertForInStatement(node: object | null | undefined, opts?: object | null): void; +export function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement; +export function assertForOfStatement(node: object | null | undefined, opts?: object | null): void; +export function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement; +export function assertForStatement(node: object | null | undefined, opts?: object | null): void; +export function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement; +export function assertForXStatement(node: object | null | undefined, opts?: object | null): void; +export function isFunction(node: object | null | undefined, opts?: object | null): node is Function; +export function assertFunction(node: object | null | undefined, opts?: object | null): void; +export function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration; +export function assertFunctionDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression; +export function assertFunctionExpression(node: object | null | undefined, opts?: object | null): void; +export function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent; +export function assertFunctionParent(node: object | null | undefined, opts?: object | null): void; +export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation; +export function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam; +export function assertFunctionTypeParam(node: object | null | undefined, opts?: object | null): void; +export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation; +export function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier; +export function assertIdentifier(node: object | null | undefined, opts?: object | null): void; +export function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement; +export function assertIfStatement(node: object | null | undefined, opts?: object | null): void; +export function isImmutable(node: object | null | undefined, opts?: object | null): node is Immutable; +export function assertImmutable(node: object | null | undefined, opts?: object | null): void; +export function isImport(node: object | null | undefined, opts?: object | null): node is Import; +export function assertImport(node: object | null | undefined, opts?: object | null): void; +export function isImportAttribute(node: object | null | undefined, opts?: object | null): node is ImportAttribute; +export function assertImportAttribute(node: object | null | undefined, opts?: object | null): void; +export function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration; +export function assertImportDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier; +export function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): void; +export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier; +export function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): void; +export function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier; +export function assertImportSpecifier(node: object | null | undefined, opts?: object | null): void; +export function isIndexedAccessType(node: object | null | undefined, opts?: object | null): node is IndexedAccessType; +export function assertIndexedAccessType(node: object | null | undefined, opts?: object | null): void; +export function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate; +export function assertInferredPredicate(node: object | null | undefined, opts?: object | null): void; +export function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration; +export function assertInterfaceDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends; +export function assertInterfaceExtends(node: object | null | undefined, opts?: object | null): void; +export function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation; +export function assertInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective; +export function assertInterpreterDirective(node: object | null | undefined, opts?: object | null): void; +export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation; +export function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isJSX(node: object | null | undefined, opts?: object | null): node is JSX; +export function assertJSX(node: object | null | undefined, opts?: object | null): void; +export function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute; +export function assertJSXAttribute(node: object | null | undefined, opts?: object | null): void; +export function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement; +export function assertJSXClosingElement(node: object | null | undefined, opts?: object | null): void; +export function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment; +export function assertJSXClosingFragment(node: object | null | undefined, opts?: object | null): void; +export function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement; +export function assertJSXElement(node: object | null | undefined, opts?: object | null): void; +export function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression; +export function assertJSXEmptyExpression(node: object | null | undefined, opts?: object | null): void; +export function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer; +export function assertJSXExpressionContainer(node: object | null | undefined, opts?: object | null): void; +export function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment; +export function assertJSXFragment(node: object | null | undefined, opts?: object | null): void; +export function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier; +export function assertJSXIdentifier(node: object | null | undefined, opts?: object | null): void; +export function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression; +export function assertJSXMemberExpression(node: object | null | undefined, opts?: object | null): void; +export function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName; +export function assertJSXNamespacedName(node: object | null | undefined, opts?: object | null): void; +export function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement; +export function assertJSXOpeningElement(node: object | null | undefined, opts?: object | null): void; +export function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment; +export function assertJSXOpeningFragment(node: object | null | undefined, opts?: object | null): void; +export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute; +export function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): void; +export function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild; +export function assertJSXSpreadChild(node: object | null | undefined, opts?: object | null): void; +export function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText; +export function assertJSXText(node: object | null | undefined, opts?: object | null): void; +export function isLVal(node: object | null | undefined, opts?: object | null): node is LVal; +export function assertLVal(node: object | null | undefined, opts?: object | null): void; +export function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement; +export function assertLabeledStatement(node: object | null | undefined, opts?: object | null): void; +export function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal; +export function assertLiteral(node: object | null | undefined, opts?: object | null): void; +export function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression; +export function assertLogicalExpression(node: object | null | undefined, opts?: object | null): void; +export function isLoop(node: object | null | undefined, opts?: object | null): node is Loop; +export function assertLoop(node: object | null | undefined, opts?: object | null): void; +export function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression; +export function assertMemberExpression(node: object | null | undefined, opts?: object | null): void; +export function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty; +export function assertMetaProperty(node: object | null | undefined, opts?: object | null): void; +export function isMethod(node: object | null | undefined, opts?: object | null): node is Method; +export function assertMethod(node: object | null | undefined, opts?: object | null): void; +export function isMiscellaneous(node: object | null | undefined, opts?: object | null): node is Miscellaneous; +export function assertMiscellaneous(node: object | null | undefined, opts?: object | null): void; +export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation; +export function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration; +export function assertModuleDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isModuleExpression(node: object | null | undefined, opts?: object | null): node is ModuleExpression; +export function assertModuleExpression(node: object | null | undefined, opts?: object | null): void; +export function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier; +export function assertModuleSpecifier(node: object | null | undefined, opts?: object | null): void; +export function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression; +export function assertNewExpression(node: object | null | undefined, opts?: object | null): void; +export function isNoop(node: object | null | undefined, opts?: object | null): node is Noop; +export function assertNoop(node: object | null | undefined, opts?: object | null): void; +export function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral; +export function assertNullLiteral(node: object | null | undefined, opts?: object | null): void; +export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation; +export function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation; +export function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +/** @deprecated Use `isNumericLiteral` */ +export function isNumberLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral; +/** @deprecated Use `assertNumericLiteral` */ +export function assertNumberLiteral(node: object | null | undefined, opts?: object | null): void; +export function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation; +export function assertNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation; +export function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral; +export function assertNumericLiteral(node: object | null | undefined, opts?: object | null): void; +export function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression; +export function assertObjectExpression(node: object | null | undefined, opts?: object | null): void; +export function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember; +export function assertObjectMember(node: object | null | undefined, opts?: object | null): void; +export function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod; +export function assertObjectMethod(node: object | null | undefined, opts?: object | null): void; +export function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern; +export function assertObjectPattern(node: object | null | undefined, opts?: object | null): void; +export function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty; +export function assertObjectProperty(node: object | null | undefined, opts?: object | null): void; +export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation; +export function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty; +export function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): void; +export function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer; +export function assertObjectTypeIndexer(node: object | null | undefined, opts?: object | null): void; +export function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot; +export function assertObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): void; +export function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty; +export function assertObjectTypeProperty(node: object | null | undefined, opts?: object | null): void; +export function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty; +export function assertObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): void; +export function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType; +export function assertOpaqueType(node: object | null | undefined, opts?: object | null): void; +export function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression; +export function assertOptionalCallExpression(node: object | null | undefined, opts?: object | null): void; +export function isOptionalIndexedAccessType(node: object | null | undefined, opts?: object | null): node is OptionalIndexedAccessType; +export function assertOptionalIndexedAccessType(node: object | null | undefined, opts?: object | null): void; +export function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression; +export function assertOptionalMemberExpression(node: object | null | undefined, opts?: object | null): void; +export function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression; +export function assertParenthesizedExpression(node: object | null | undefined, opts?: object | null): void; +export function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern; +export function assertPattern(node: object | null | undefined, opts?: object | null): void; +export function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike; +export function assertPatternLike(node: object | null | undefined, opts?: object | null): void; +export function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction; +export function assertPipelineBareFunction(node: object | null | undefined, opts?: object | null): void; +export function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference; +export function assertPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): void; +export function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression; +export function assertPipelineTopicExpression(node: object | null | undefined, opts?: object | null): void; +export function isPlaceholder(node: object | null | undefined, opts?: object | null): node is Placeholder; +export function assertPlaceholder(node: object | null | undefined, opts?: object | null): void; +export function isPrivate(node: object | null | undefined, opts?: object | null): node is Private; +export function assertPrivate(node: object | null | undefined, opts?: object | null): void; +export function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName; +export function assertPrivateName(node: object | null | undefined, opts?: object | null): void; +export function isProgram(node: object | null | undefined, opts?: object | null): node is Program; +export function assertProgram(node: object | null | undefined, opts?: object | null): void; +export function isProperty(node: object | null | undefined, opts?: object | null): node is Property; +export function assertProperty(node: object | null | undefined, opts?: object | null): void; +export function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish; +export function assertPureish(node: object | null | undefined, opts?: object | null): void; +export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier; +export function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): void; +export function isRecordExpression(node: object | null | undefined, opts?: object | null): node is RecordExpression; +export function assertRecordExpression(node: object | null | undefined, opts?: object | null): void; +export function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral; +export function assertRegExpLiteral(node: object | null | undefined, opts?: object | null): void; +/** @deprecated Use `isRegExpLiteral` */ +export function isRegexLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral; +/** @deprecated Use `assertRegExpLiteral` */ +export function assertRegexLiteral(node: object | null | undefined, opts?: object | null): void; +export function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement; +export function assertRestElement(node: object | null | undefined, opts?: object | null): void; +/** @deprecated Use `isRestElement` */ +export function isRestProperty(node: object | null | undefined, opts?: object | null): node is RestElement; +/** @deprecated Use `assertRestElement` */ +export function assertRestProperty(node: object | null | undefined, opts?: object | null): void; +export function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement; +export function assertReturnStatement(node: object | null | undefined, opts?: object | null): void; +export function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable; +export function assertScopable(node: object | null | undefined, opts?: object | null): void; +export function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression; +export function assertSequenceExpression(node: object | null | undefined, opts?: object | null): void; +export function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement; +export function assertSpreadElement(node: object | null | undefined, opts?: object | null): void; +/** @deprecated Use `isSpreadElement` */ +export function isSpreadProperty(node: object | null | undefined, opts?: object | null): node is SpreadElement; +/** @deprecated Use `assertSpreadElement` */ +export function assertSpreadProperty(node: object | null | undefined, opts?: object | null): void; +export function isStandardized(node: object | null | undefined, opts?: object | null): node is Standardized; +export function assertStandardized(node: object | null | undefined, opts?: object | null): void; +export function isStatement(node: object | null | undefined, opts?: object | null): node is Statement; +export function assertStatement(node: object | null | undefined, opts?: object | null): void; +export function isStaticBlock(node: object | null | undefined, opts?: object | null): node is StaticBlock; +export function assertStaticBlock(node: object | null | undefined, opts?: object | null): void; +export function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral; +export function assertStringLiteral(node: object | null | undefined, opts?: object | null): void; +export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation; +export function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation; +export function assertStringTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isSuper(node: object | null | undefined, opts?: object | null): node is Super; +export function assertSuper(node: object | null | undefined, opts?: object | null): void; +export function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase; +export function assertSwitchCase(node: object | null | undefined, opts?: object | null): void; +export function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement; +export function assertSwitchStatement(node: object | null | undefined, opts?: object | null): void; +export function isSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): node is SymbolTypeAnnotation; +export function assertSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword; +export function assertTSAnyKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType; +export function assertTSArrayType(node: object | null | undefined, opts?: object | null): void; +export function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression; +export function assertTSAsExpression(node: object | null | undefined, opts?: object | null): void; +export function isTSBaseType(node: object | null | undefined, opts?: object | null): node is TSBaseType; +export function assertTSBaseType(node: object | null | undefined, opts?: object | null): void; +export function isTSBigIntKeyword(node: object | null | undefined, opts?: object | null): node is TSBigIntKeyword; +export function assertTSBigIntKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword; +export function assertTSBooleanKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration; +export function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType; +export function assertTSConditionalType(node: object | null | undefined, opts?: object | null): void; +export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration; +export function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType; +export function assertTSConstructorType(node: object | null | undefined, opts?: object | null): void; +export function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction; +export function assertTSDeclareFunction(node: object | null | undefined, opts?: object | null): void; +export function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod; +export function assertTSDeclareMethod(node: object | null | undefined, opts?: object | null): void; +export function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName; +export function assertTSEntityName(node: object | null | undefined, opts?: object | null): void; +export function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration; +export function assertTSEnumDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember; +export function assertTSEnumMember(node: object | null | undefined, opts?: object | null): void; +export function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment; +export function assertTSExportAssignment(node: object | null | undefined, opts?: object | null): void; +export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments; +export function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): void; +export function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference; +export function assertTSExternalModuleReference(node: object | null | undefined, opts?: object | null): void; +export function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType; +export function assertTSFunctionType(node: object | null | undefined, opts?: object | null): void; +export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration; +export function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType; +export function assertTSImportType(node: object | null | undefined, opts?: object | null): void; +export function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature; +export function assertTSIndexSignature(node: object | null | undefined, opts?: object | null): void; +export function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType; +export function assertTSIndexedAccessType(node: object | null | undefined, opts?: object | null): void; +export function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType; +export function assertTSInferType(node: object | null | undefined, opts?: object | null): void; +export function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody; +export function assertTSInterfaceBody(node: object | null | undefined, opts?: object | null): void; +export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration; +export function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType; +export function assertTSIntersectionType(node: object | null | undefined, opts?: object | null): void; +export function isTSIntrinsicKeyword(node: object | null | undefined, opts?: object | null): node is TSIntrinsicKeyword; +export function assertTSIntrinsicKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType; +export function assertTSLiteralType(node: object | null | undefined, opts?: object | null): void; +export function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType; +export function assertTSMappedType(node: object | null | undefined, opts?: object | null): void; +export function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature; +export function assertTSMethodSignature(node: object | null | undefined, opts?: object | null): void; +export function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock; +export function assertTSModuleBlock(node: object | null | undefined, opts?: object | null): void; +export function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration; +export function assertTSModuleDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSNamedTupleMember(node: object | null | undefined, opts?: object | null): node is TSNamedTupleMember; +export function assertTSNamedTupleMember(node: object | null | undefined, opts?: object | null): void; +export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration; +export function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword; +export function assertTSNeverKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression; +export function assertTSNonNullExpression(node: object | null | undefined, opts?: object | null): void; +export function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword; +export function assertTSNullKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword; +export function assertTSNumberKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword; +export function assertTSObjectKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType; +export function assertTSOptionalType(node: object | null | undefined, opts?: object | null): void; +export function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty; +export function assertTSParameterProperty(node: object | null | undefined, opts?: object | null): void; +export function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType; +export function assertTSParenthesizedType(node: object | null | undefined, opts?: object | null): void; +export function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature; +export function assertTSPropertySignature(node: object | null | undefined, opts?: object | null): void; +export function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName; +export function assertTSQualifiedName(node: object | null | undefined, opts?: object | null): void; +export function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType; +export function assertTSRestType(node: object | null | undefined, opts?: object | null): void; +export function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword; +export function assertTSStringKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword; +export function assertTSSymbolKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType; +export function assertTSThisType(node: object | null | undefined, opts?: object | null): void; +export function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType; +export function assertTSTupleType(node: object | null | undefined, opts?: object | null): void; +export function isTSType(node: object | null | undefined, opts?: object | null): node is TSType; +export function assertTSType(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration; +export function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation; +export function assertTSTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion; +export function assertTSTypeAssertion(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement; +export function assertTSTypeElement(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral; +export function assertTSTypeLiteral(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator; +export function assertTSTypeOperator(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter; +export function assertTSTypeParameter(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration; +export function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation; +export function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): void; +export function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate; +export function assertTSTypePredicate(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery; +export function assertTSTypeQuery(node: object | null | undefined, opts?: object | null): void; +export function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference; +export function assertTSTypeReference(node: object | null | undefined, opts?: object | null): void; +export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword; +export function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType; +export function assertTSUnionType(node: object | null | undefined, opts?: object | null): void; +export function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword; +export function assertTSUnknownKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword; +export function assertTSVoidKeyword(node: object | null | undefined, opts?: object | null): void; +export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression; +export function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): void; +export function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement; +export function assertTemplateElement(node: object | null | undefined, opts?: object | null): void; +export function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral; +export function assertTemplateLiteral(node: object | null | undefined, opts?: object | null): void; +export function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless; +export function assertTerminatorless(node: object | null | undefined, opts?: object | null): void; +export function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression; +export function assertThisExpression(node: object | null | undefined, opts?: object | null): void; +export function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation; +export function assertThisTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement; +export function assertThrowStatement(node: object | null | undefined, opts?: object | null): void; +export function isTopicReference(node: object | null | undefined, opts?: object | null): node is TopicReference; +export function assertTopicReference(node: object | null | undefined, opts?: object | null): void; +export function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement; +export function assertTryStatement(node: object | null | undefined, opts?: object | null): void; +export function isTupleExpression(node: object | null | undefined, opts?: object | null): node is TupleExpression; +export function assertTupleExpression(node: object | null | undefined, opts?: object | null): void; +export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation; +export function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias; +export function assertTypeAlias(node: object | null | undefined, opts?: object | null): void; +export function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation; +export function assertTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression; +export function assertTypeCastExpression(node: object | null | undefined, opts?: object | null): void; +export function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter; +export function assertTypeParameter(node: object | null | undefined, opts?: object | null): void; +export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration; +export function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation; +export function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): void; +export function isTypeScript(node: object | null | undefined, opts?: object | null): node is TypeScript; +export function assertTypeScript(node: object | null | undefined, opts?: object | null): void; +export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation; +export function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression; +export function assertUnaryExpression(node: object | null | undefined, opts?: object | null): void; +export function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike; +export function assertUnaryLike(node: object | null | undefined, opts?: object | null): void; +export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation; +export function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression; +export function assertUpdateExpression(node: object | null | undefined, opts?: object | null): void; +export function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable; +export function assertUserWhitespacable(node: object | null | undefined, opts?: object | null): void; +export function isV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): node is V8IntrinsicIdentifier; +export function assertV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): void; +export function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration; +export function assertVariableDeclaration(node: object | null | undefined, opts?: object | null): void; +export function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator; +export function assertVariableDeclarator(node: object | null | undefined, opts?: object | null): void; +export function isVariance(node: object | null | undefined, opts?: object | null): node is Variance; +export function assertVariance(node: object | null | undefined, opts?: object | null): void; +export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation; +export function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): void; +export function isWhile(node: object | null | undefined, opts?: object | null): node is While; +export function assertWhile(node: object | null | undefined, opts?: object | null): void; +export function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement; +export function assertWhileStatement(node: object | null | undefined, opts?: object | null): void; +export function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement; +export function assertWithStatement(node: object | null | undefined, opts?: object | null): void; +export function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression; +export function assertYieldExpression(node: object | null | undefined, opts?: object | null): void; +export function assertNode(obj: any): void +export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation +export function createUnionTypeAnnotation<T extends FlowType>(types: [T]): T +export function createFlowUnionType<T extends FlowType>(types: [T]): T +export function createUnionTypeAnnotation(types: ReadonlyArray<FlowType>): UnionTypeAnnotation +export function createFlowUnionType(types: ReadonlyArray<FlowType>): UnionTypeAnnotation +export function buildChildren(node: { children: ReadonlyArray<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment | JSXEmptyExpression> }): JSXElement['children'] +export function clone<T extends Node>(n: T): T; +export function cloneDeep<T extends Node>(n: T): T; +export function cloneDeepWithoutLoc<T extends Node>(n: T): T; +export function cloneNode<T extends Node>(n: T, deep?: boolean, withoutLoc?: boolean): T; +export function cloneWithoutLoc<T extends Node>(n: T): T; +export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing' +export function addComment<T extends Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T +export function addComments<T extends Node>(node: T, type: CommentTypeShorthand, comments: ReadonlyArray<Comment>): T +export function inheritInnerComments(node: Node, parent: Node): void +export function inheritLeadingComments(node: Node, parent: Node): void +export function inheritsComments<T extends Node>(node: T, parent: Node): void +export function inheritTrailingComments(node: Node, parent: Node): void +export function removeComments<T extends Node>(node: T): T +export function ensureBlock(node: Extract<Node, { body: BlockStatement | Statement | Expression }>): BlockStatement +export function ensureBlock<K extends keyof Extract<Node, { body: BlockStatement | Statement | Expression }> = 'body'>(node: Extract<Node, Record<K, BlockStatement | Statement | Expression>>, key: K): BlockStatement +export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string +export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement +export function toComputedKey<T extends Extract<Node, { computed: boolean | null }>>(node: T, key?: Expression | Identifier): Expression +export function toExpression(node: Function): FunctionExpression +export function toExpression(node: Class): ClassExpression +export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression +export function toIdentifier(name: { toString(): string } | null | undefined): string +export function toKeyAlias(node: Method | Property, key?: Node): string +export function toSequenceExpression(nodes: ReadonlyArray<Node>, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined +export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement +export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement +export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined +export function toStatement(node: Class, ignore?: boolean): ClassDeclaration +export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined +export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration +export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined +export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement +export function valueToNode(value: undefined): Identifier +export function valueToNode(value: boolean): BooleanLiteral +export function valueToNode(value: null): NullLiteral +export function valueToNode(value: string): StringLiteral +export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression +export function valueToNode(value: RegExp): RegExpLiteral +export function valueToNode(value: ReadonlyArray<undefined | boolean | null | string | number | RegExp | object>): ArrayExpression +export function valueToNode(value: object): ObjectExpression +export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression +export function removeTypeDuplicates(types: ReadonlyArray<FlowType | false | null | undefined>): FlowType[] +export function appendToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, append: MemberExpression['property'], computed?: boolean): T +export function inherits<T extends Node | null | undefined>(child: T, parent: Node | null | undefined): T +export function prependToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, prepend: MemberExpression['object']): T +export function removeProperties( + n: Node, + opts?: { preserveComments: boolean } | null +): void; +export function removePropertiesDeep<T extends Node>( + n: T, + opts?: { preserveComments: boolean } | null +): T; +export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record<string, Array<Identifier>> +export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record<string, Identifier> +export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record<string, Identifier | Array<Identifier>> +export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record<string, Array<Identifier>> +export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record<string, Identifier> +export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record<string, Identifier | Array<Identifier>> +export type TraversalAncestors = ReadonlyArray<{ + node: Node, + key: string, + index?: number, +}>; +export type TraversalHandler<T> = ( + this: undefined, node: Node, parent: TraversalAncestors, type: T +) => void; +export type TraversalHandlers<T> = { + enter?: TraversalHandler<T>, + exit?: TraversalHandler<T>, +}; +export function traverse<T>(n: Node, h: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void; +export function traverseFast<T>(n: Node, h: TraversalHandler<T>, state?: T): void; +export function shallowEqual<T extends object>(actual: object, expected: T): actual is T +export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression +export function is<T extends Node['type']>(type: T, n: Node | null | undefined, required?: undefined): n is Extract<Node, { type: T }> +export function is<T extends Node['type'], P extends Extract<Node, { type: T }>>(type: T, n: Node | null | undefined, required: Partial<P>): n is P +export function is<P extends Node>(type: string, n: Node | null | undefined, required: Partial<P>): n is P +export function is(type: string, n: Node | null | undefined, required?: Partial<Node>): n is Node +export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean +export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration +export function isImmutable(node: Node): node is Immutable +export function isLet(node: Node): node is VariableDeclaration +export function isNode(node: object | null | undefined): node is Node +export function isNodesEquivalent<T extends Partial<Node>>(a: T, b: any): b is T +export function isNodesEquivalent(a: any, b: any): boolean +export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean +export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean +export function isScope(node: Node, parent: Node): node is Scopable +export function isSpecifierDefault(specifier: ModuleSpecifier): boolean +export function isType<T extends Node['type']>(nodetype: string, targetType: T): nodetype is T +export function isType(nodetype: string | null | undefined, targetType: string): boolean +export function isValidES3Identifier(name: string): boolean +export function isValidIdentifier(name: string): boolean +export function isVar(node: Node): node is VariableDeclaration +export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray<string>, allowPartial?: boolean): node is MemberExpression +export function validate<T extends Node, K extends keyof T>(n: Node | null | undefined, key: K, value: T[K]): void; +export function validate(n: Node, key: string, value: any): void; diff --git a/node_modules/@babel/types/lib/index.d.ts b/node_modules/@babel/types/lib/index.d.ts new file mode 100644 index 0000000..791ddba --- /dev/null +++ b/node_modules/@babel/types/lib/index.d.ts @@ -0,0 +1,2927 @@ +interface BaseComment { + value: string; + start: number; + end: number; + loc: SourceLocation; + type: "CommentBlock" | "CommentLine"; +} +interface CommentBlock extends BaseComment { + type: "CommentBlock"; +} +interface CommentLine extends BaseComment { + type: "CommentLine"; +} +declare type Comment = CommentBlock | CommentLine; +interface SourceLocation { + start: { + line: number; + column: number; + }; + end: { + line: number; + column: number; + }; +} +interface BaseNode { + leadingComments: ReadonlyArray<Comment> | null; + innerComments: ReadonlyArray<Comment> | null; + trailingComments: ReadonlyArray<Comment> | null; + start: number | null; + end: number | null; + loc: SourceLocation | null; + type: Node["type"]; + range?: [number, number]; + extra?: Record<string, unknown>; +} +declare type CommentTypeShorthand = "leading" | "inner" | "trailing"; +declare type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | BinaryExpression | BindExpression | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | ClassAccessorProperty | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | ContinueStatement | DebuggerStatement | DecimalLiteral | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | ExpressionStatement | File | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | LogicalExpression | MemberExpression | MetaProperty | MixedTypeAnnotation | ModuleExpression | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral$1 | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | PrivateName | Program | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral$1 | RestElement | RestProperty$1 | ReturnStatement | SequenceExpression | SpreadElement | SpreadProperty$1 | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnionTypeAnnotation | UpdateExpression | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | WhileStatement | WithStatement | YieldExpression; +interface ArrayExpression extends BaseNode { + type: "ArrayExpression"; + elements: Array<null | Expression | SpreadElement>; +} +interface AssignmentExpression extends BaseNode { + type: "AssignmentExpression"; + operator: string; + left: LVal; + right: Expression; +} +interface BinaryExpression extends BaseNode { + type: "BinaryExpression"; + operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; + left: Expression | PrivateName; + right: Expression; +} +interface InterpreterDirective extends BaseNode { + type: "InterpreterDirective"; + value: string; +} +interface Directive extends BaseNode { + type: "Directive"; + value: DirectiveLiteral; +} +interface DirectiveLiteral extends BaseNode { + type: "DirectiveLiteral"; + value: string; +} +interface BlockStatement extends BaseNode { + type: "BlockStatement"; + body: Array<Statement>; + directives: Array<Directive>; +} +interface BreakStatement extends BaseNode { + type: "BreakStatement"; + label?: Identifier | null; +} +interface CallExpression extends BaseNode { + type: "CallExpression"; + callee: Expression | V8IntrinsicIdentifier; + arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>; + optional?: true | false | null; + typeArguments?: TypeParameterInstantiation | null; + typeParameters?: TSTypeParameterInstantiation | null; +} +interface CatchClause extends BaseNode { + type: "CatchClause"; + param?: Identifier | ArrayPattern | ObjectPattern | null; + body: BlockStatement; +} +interface ConditionalExpression extends BaseNode { + type: "ConditionalExpression"; + test: Expression; + consequent: Expression; + alternate: Expression; +} +interface ContinueStatement extends BaseNode { + type: "ContinueStatement"; + label?: Identifier | null; +} +interface DebuggerStatement extends BaseNode { + type: "DebuggerStatement"; +} +interface DoWhileStatement extends BaseNode { + type: "DoWhileStatement"; + test: Expression; + body: Statement; +} +interface EmptyStatement extends BaseNode { + type: "EmptyStatement"; +} +interface ExpressionStatement extends BaseNode { + type: "ExpressionStatement"; + expression: Expression; +} +interface File extends BaseNode { + type: "File"; + program: Program; + comments?: Array<CommentBlock | CommentLine> | null; + tokens?: Array<any> | null; +} +interface ForInStatement extends BaseNode { + type: "ForInStatement"; + left: VariableDeclaration | LVal; + right: Expression; + body: Statement; +} +interface ForStatement extends BaseNode { + type: "ForStatement"; + init?: VariableDeclaration | Expression | null; + test?: Expression | null; + update?: Expression | null; + body: Statement; +} +interface FunctionDeclaration extends BaseNode { + type: "FunctionDeclaration"; + id?: Identifier | null; + params: Array<Identifier | Pattern | RestElement>; + body: BlockStatement; + generator?: boolean; + async?: boolean; + declare?: boolean | null; + returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} +interface FunctionExpression extends BaseNode { + type: "FunctionExpression"; + id?: Identifier | null; + params: Array<Identifier | Pattern | RestElement>; + body: BlockStatement; + generator?: boolean; + async?: boolean; + returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} +interface Identifier extends BaseNode { + type: "Identifier"; + name: string; + decorators?: Array<Decorator> | null; + optional?: boolean | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; +} +interface IfStatement extends BaseNode { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate?: Statement | null; +} +interface LabeledStatement extends BaseNode { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} +interface StringLiteral extends BaseNode { + type: "StringLiteral"; + value: string; +} +interface NumericLiteral extends BaseNode { + type: "NumericLiteral"; + value: number; +} +/** + * @deprecated Use `NumericLiteral` + */ +interface NumberLiteral$1 extends BaseNode { + type: "NumberLiteral"; + value: number; +} +interface NullLiteral extends BaseNode { + type: "NullLiteral"; +} +interface BooleanLiteral extends BaseNode { + type: "BooleanLiteral"; + value: boolean; +} +interface RegExpLiteral extends BaseNode { + type: "RegExpLiteral"; + pattern: string; + flags: string; +} +/** + * @deprecated Use `RegExpLiteral` + */ +interface RegexLiteral$1 extends BaseNode { + type: "RegexLiteral"; + pattern: string; + flags: string; +} +interface LogicalExpression extends BaseNode { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: Expression; + right: Expression; +} +interface MemberExpression extends BaseNode { + type: "MemberExpression"; + object: Expression; + property: Expression | Identifier | PrivateName; + computed: boolean; + optional?: true | false | null; +} +interface NewExpression extends BaseNode { + type: "NewExpression"; + callee: Expression | V8IntrinsicIdentifier; + arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>; + optional?: true | false | null; + typeArguments?: TypeParameterInstantiation | null; + typeParameters?: TSTypeParameterInstantiation | null; +} +interface Program extends BaseNode { + type: "Program"; + body: Array<Statement>; + directives: Array<Directive>; + sourceType: "script" | "module"; + interpreter?: InterpreterDirective | null; + sourceFile: string; +} +interface ObjectExpression extends BaseNode { + type: "ObjectExpression"; + properties: Array<ObjectMethod | ObjectProperty | SpreadElement>; +} +interface ObjectMethod extends BaseNode { + type: "ObjectMethod"; + kind: "method" | "get" | "set"; + key: Expression | Identifier | StringLiteral | NumericLiteral; + params: Array<Identifier | Pattern | RestElement>; + body: BlockStatement; + computed: boolean; + generator?: boolean; + async?: boolean; + decorators?: Array<Decorator> | null; + returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} +interface ObjectProperty extends BaseNode { + type: "ObjectProperty"; + key: Expression | Identifier | StringLiteral | NumericLiteral; + value: Expression | PatternLike; + computed: boolean; + shorthand: boolean; + decorators?: Array<Decorator> | null; +} +interface RestElement extends BaseNode { + type: "RestElement"; + argument: LVal; + decorators?: Array<Decorator> | null; + optional?: boolean | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; +} +/** + * @deprecated Use `RestElement` + */ +interface RestProperty$1 extends BaseNode { + type: "RestProperty"; + argument: LVal; + decorators?: Array<Decorator> | null; + optional?: boolean | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; +} +interface ReturnStatement extends BaseNode { + type: "ReturnStatement"; + argument?: Expression | null; +} +interface SequenceExpression extends BaseNode { + type: "SequenceExpression"; + expressions: Array<Expression>; +} +interface ParenthesizedExpression extends BaseNode { + type: "ParenthesizedExpression"; + expression: Expression; +} +interface SwitchCase extends BaseNode { + type: "SwitchCase"; + test?: Expression | null; + consequent: Array<Statement>; +} +interface SwitchStatement extends BaseNode { + type: "SwitchStatement"; + discriminant: Expression; + cases: Array<SwitchCase>; +} +interface ThisExpression extends BaseNode { + type: "ThisExpression"; +} +interface ThrowStatement extends BaseNode { + type: "ThrowStatement"; + argument: Expression; +} +interface TryStatement extends BaseNode { + type: "TryStatement"; + block: BlockStatement; + handler?: CatchClause | null; + finalizer?: BlockStatement | null; +} +interface UnaryExpression extends BaseNode { + type: "UnaryExpression"; + operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; + argument: Expression; + prefix: boolean; +} +interface UpdateExpression extends BaseNode { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: Expression; + prefix: boolean; +} +interface VariableDeclaration extends BaseNode { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: Array<VariableDeclarator>; + declare?: boolean | null; +} +interface VariableDeclarator extends BaseNode { + type: "VariableDeclarator"; + id: LVal; + init?: Expression | null; + definite?: boolean | null; +} +interface WhileStatement extends BaseNode { + type: "WhileStatement"; + test: Expression; + body: Statement; +} +interface WithStatement extends BaseNode { + type: "WithStatement"; + object: Expression; + body: Statement; +} +interface AssignmentPattern extends BaseNode { + type: "AssignmentPattern"; + left: Identifier | ObjectPattern | ArrayPattern | MemberExpression; + right: Expression; + decorators?: Array<Decorator> | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; +} +interface ArrayPattern extends BaseNode { + type: "ArrayPattern"; + elements: Array<null | PatternLike>; + decorators?: Array<Decorator> | null; + optional?: boolean | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; +} +interface ArrowFunctionExpression extends BaseNode { + type: "ArrowFunctionExpression"; + params: Array<Identifier | Pattern | RestElement>; + body: BlockStatement | Expression; + async?: boolean; + expression: boolean; + generator?: boolean; + returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} +interface ClassBody extends BaseNode { + type: "ClassBody"; + body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>; +} +interface ClassExpression extends BaseNode { + type: "ClassExpression"; + id?: Identifier | null; + superClass?: Expression | null; + body: ClassBody; + decorators?: Array<Decorator> | null; + implements?: Array<TSExpressionWithTypeArguments | ClassImplements> | null; + mixins?: InterfaceExtends | null; + superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null; + typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} +interface ClassDeclaration extends BaseNode { + type: "ClassDeclaration"; + id: Identifier; + superClass?: Expression | null; + body: ClassBody; + decorators?: Array<Decorator> | null; + abstract?: boolean | null; + declare?: boolean | null; + implements?: Array<TSExpressionWithTypeArguments | ClassImplements> | null; + mixins?: InterfaceExtends | null; + superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null; + typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} +interface ExportAllDeclaration extends BaseNode { + type: "ExportAllDeclaration"; + source: StringLiteral; + assertions?: Array<ImportAttribute> | null; + exportKind?: "type" | "value" | null; +} +interface ExportDefaultDeclaration extends BaseNode { + type: "ExportDefaultDeclaration"; + declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression; + exportKind?: "value" | null; +} +interface ExportNamedDeclaration extends BaseNode { + type: "ExportNamedDeclaration"; + declaration?: Declaration | null; + specifiers: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>; + source?: StringLiteral | null; + assertions?: Array<ImportAttribute> | null; + exportKind?: "type" | "value" | null; +} +interface ExportSpecifier extends BaseNode { + type: "ExportSpecifier"; + local: Identifier; + exported: Identifier | StringLiteral; + exportKind?: "type" | "value" | null; +} +interface ForOfStatement extends BaseNode { + type: "ForOfStatement"; + left: VariableDeclaration | LVal; + right: Expression; + body: Statement; + await: boolean; +} +interface ImportDeclaration extends BaseNode { + type: "ImportDeclaration"; + specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>; + source: StringLiteral; + assertions?: Array<ImportAttribute> | null; + importKind?: "type" | "typeof" | "value" | null; +} +interface ImportDefaultSpecifier extends BaseNode { + type: "ImportDefaultSpecifier"; + local: Identifier; +} +interface ImportNamespaceSpecifier extends BaseNode { + type: "ImportNamespaceSpecifier"; + local: Identifier; +} +interface ImportSpecifier extends BaseNode { + type: "ImportSpecifier"; + local: Identifier; + imported: Identifier | StringLiteral; + importKind?: "type" | "typeof" | "value" | null; +} +interface MetaProperty extends BaseNode { + type: "MetaProperty"; + meta: Identifier; + property: Identifier; +} +interface ClassMethod extends BaseNode { + type: "ClassMethod"; + kind?: "get" | "set" | "method" | "constructor"; + key: Identifier | StringLiteral | NumericLiteral | Expression; + params: Array<Identifier | Pattern | RestElement | TSParameterProperty>; + body: BlockStatement; + computed?: boolean; + static?: boolean; + generator?: boolean; + async?: boolean; + abstract?: boolean | null; + access?: "public" | "private" | "protected" | null; + accessibility?: "public" | "private" | "protected" | null; + decorators?: Array<Decorator> | null; + optional?: boolean | null; + override?: boolean; + returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} +interface ObjectPattern extends BaseNode { + type: "ObjectPattern"; + properties: Array<RestElement | ObjectProperty>; + decorators?: Array<Decorator> | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; +} +interface SpreadElement extends BaseNode { + type: "SpreadElement"; + argument: Expression; +} +/** + * @deprecated Use `SpreadElement` + */ +interface SpreadProperty$1 extends BaseNode { + type: "SpreadProperty"; + argument: Expression; +} +interface Super extends BaseNode { + type: "Super"; +} +interface TaggedTemplateExpression extends BaseNode { + type: "TaggedTemplateExpression"; + tag: Expression; + quasi: TemplateLiteral; + typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null; +} +interface TemplateElement extends BaseNode { + type: "TemplateElement"; + value: { + raw: string; + cooked?: string; + }; + tail: boolean; +} +interface TemplateLiteral extends BaseNode { + type: "TemplateLiteral"; + quasis: Array<TemplateElement>; + expressions: Array<Expression | TSType>; +} +interface YieldExpression extends BaseNode { + type: "YieldExpression"; + argument?: Expression | null; + delegate: boolean; +} +interface AwaitExpression extends BaseNode { + type: "AwaitExpression"; + argument: Expression; +} +interface Import extends BaseNode { + type: "Import"; +} +interface BigIntLiteral extends BaseNode { + type: "BigIntLiteral"; + value: string; +} +interface ExportNamespaceSpecifier extends BaseNode { + type: "ExportNamespaceSpecifier"; + exported: Identifier; +} +interface OptionalMemberExpression extends BaseNode { + type: "OptionalMemberExpression"; + object: Expression; + property: Expression | Identifier; + computed: boolean; + optional: boolean; +} +interface OptionalCallExpression extends BaseNode { + type: "OptionalCallExpression"; + callee: Expression; + arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>; + optional: boolean; + typeArguments?: TypeParameterInstantiation | null; + typeParameters?: TSTypeParameterInstantiation | null; +} +interface ClassProperty extends BaseNode { + type: "ClassProperty"; + key: Identifier | StringLiteral | NumericLiteral | Expression; + value?: Expression | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; + decorators?: Array<Decorator> | null; + computed?: boolean; + static?: boolean; + abstract?: boolean | null; + accessibility?: "public" | "private" | "protected" | null; + declare?: boolean | null; + definite?: boolean | null; + optional?: boolean | null; + override?: boolean; + readonly?: boolean | null; + variance?: Variance | null; +} +interface ClassAccessorProperty extends BaseNode { + type: "ClassAccessorProperty"; + key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName; + value?: Expression | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; + decorators?: Array<Decorator> | null; + computed?: boolean; + static?: boolean; + abstract?: boolean | null; + accessibility?: "public" | "private" | "protected" | null; + declare?: boolean | null; + definite?: boolean | null; + optional?: boolean | null; + override?: boolean; + readonly?: boolean | null; + variance?: Variance | null; +} +interface ClassPrivateProperty extends BaseNode { + type: "ClassPrivateProperty"; + key: PrivateName; + value?: Expression | null; + decorators?: Array<Decorator> | null; + static: any; + definite?: boolean | null; + readonly?: boolean | null; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; + variance?: Variance | null; +} +interface ClassPrivateMethod extends BaseNode { + type: "ClassPrivateMethod"; + kind?: "get" | "set" | "method" | "constructor"; + key: PrivateName; + params: Array<Identifier | Pattern | RestElement | TSParameterProperty>; + body: BlockStatement; + static?: boolean; + abstract?: boolean | null; + access?: "public" | "private" | "protected" | null; + accessibility?: "public" | "private" | "protected" | null; + async?: boolean; + computed?: boolean; + decorators?: Array<Decorator> | null; + generator?: boolean; + optional?: boolean | null; + override?: boolean; + returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} +interface PrivateName extends BaseNode { + type: "PrivateName"; + id: Identifier; +} +interface StaticBlock extends BaseNode { + type: "StaticBlock"; + body: Array<Statement>; +} +interface AnyTypeAnnotation extends BaseNode { + type: "AnyTypeAnnotation"; +} +interface ArrayTypeAnnotation extends BaseNode { + type: "ArrayTypeAnnotation"; + elementType: FlowType; +} +interface BooleanTypeAnnotation extends BaseNode { + type: "BooleanTypeAnnotation"; +} +interface BooleanLiteralTypeAnnotation extends BaseNode { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; +} +interface NullLiteralTypeAnnotation extends BaseNode { + type: "NullLiteralTypeAnnotation"; +} +interface ClassImplements extends BaseNode { + type: "ClassImplements"; + id: Identifier; + typeParameters?: TypeParameterInstantiation | null; +} +interface DeclareClass extends BaseNode { + type: "DeclareClass"; + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + extends?: Array<InterfaceExtends> | null; + body: ObjectTypeAnnotation; + implements?: Array<ClassImplements> | null; + mixins?: Array<InterfaceExtends> | null; +} +interface DeclareFunction extends BaseNode { + type: "DeclareFunction"; + id: Identifier; + predicate?: DeclaredPredicate | null; +} +interface DeclareInterface extends BaseNode { + type: "DeclareInterface"; + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + extends?: Array<InterfaceExtends> | null; + body: ObjectTypeAnnotation; + implements?: Array<ClassImplements> | null; + mixins?: Array<InterfaceExtends> | null; +} +interface DeclareModule extends BaseNode { + type: "DeclareModule"; + id: Identifier | StringLiteral; + body: BlockStatement; + kind?: "CommonJS" | "ES" | null; +} +interface DeclareModuleExports extends BaseNode { + type: "DeclareModuleExports"; + typeAnnotation: TypeAnnotation; +} +interface DeclareTypeAlias extends BaseNode { + type: "DeclareTypeAlias"; + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + right: FlowType; +} +interface DeclareOpaqueType extends BaseNode { + type: "DeclareOpaqueType"; + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + supertype?: FlowType | null; + impltype?: FlowType | null; +} +interface DeclareVariable extends BaseNode { + type: "DeclareVariable"; + id: Identifier; +} +interface DeclareExportDeclaration extends BaseNode { + type: "DeclareExportDeclaration"; + declaration?: Flow | null; + specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null; + source?: StringLiteral | null; + default?: boolean | null; +} +interface DeclareExportAllDeclaration extends BaseNode { + type: "DeclareExportAllDeclaration"; + source: StringLiteral; + exportKind?: "type" | "value" | null; +} +interface DeclaredPredicate extends BaseNode { + type: "DeclaredPredicate"; + value: Flow; +} +interface ExistsTypeAnnotation extends BaseNode { + type: "ExistsTypeAnnotation"; +} +interface FunctionTypeAnnotation extends BaseNode { + type: "FunctionTypeAnnotation"; + typeParameters?: TypeParameterDeclaration | null; + params: Array<FunctionTypeParam>; + rest?: FunctionTypeParam | null; + returnType: FlowType; + this?: FunctionTypeParam | null; +} +interface FunctionTypeParam extends BaseNode { + type: "FunctionTypeParam"; + name?: Identifier | null; + typeAnnotation: FlowType; + optional?: boolean | null; +} +interface GenericTypeAnnotation extends BaseNode { + type: "GenericTypeAnnotation"; + id: Identifier | QualifiedTypeIdentifier; + typeParameters?: TypeParameterInstantiation | null; +} +interface InferredPredicate extends BaseNode { + type: "InferredPredicate"; +} +interface InterfaceExtends extends BaseNode { + type: "InterfaceExtends"; + id: Identifier | QualifiedTypeIdentifier; + typeParameters?: TypeParameterInstantiation | null; +} +interface InterfaceDeclaration extends BaseNode { + type: "InterfaceDeclaration"; + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + extends?: Array<InterfaceExtends> | null; + body: ObjectTypeAnnotation; + implements?: Array<ClassImplements> | null; + mixins?: Array<InterfaceExtends> | null; +} +interface InterfaceTypeAnnotation extends BaseNode { + type: "InterfaceTypeAnnotation"; + extends?: Array<InterfaceExtends> | null; + body: ObjectTypeAnnotation; +} +interface IntersectionTypeAnnotation extends BaseNode { + type: "IntersectionTypeAnnotation"; + types: Array<FlowType>; +} +interface MixedTypeAnnotation extends BaseNode { + type: "MixedTypeAnnotation"; +} +interface EmptyTypeAnnotation extends BaseNode { + type: "EmptyTypeAnnotation"; +} +interface NullableTypeAnnotation extends BaseNode { + type: "NullableTypeAnnotation"; + typeAnnotation: FlowType; +} +interface NumberLiteralTypeAnnotation extends BaseNode { + type: "NumberLiteralTypeAnnotation"; + value: number; +} +interface NumberTypeAnnotation extends BaseNode { + type: "NumberTypeAnnotation"; +} +interface ObjectTypeAnnotation extends BaseNode { + type: "ObjectTypeAnnotation"; + properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>; + indexers?: Array<ObjectTypeIndexer> | null; + callProperties?: Array<ObjectTypeCallProperty> | null; + internalSlots?: Array<ObjectTypeInternalSlot> | null; + exact: boolean; + inexact?: boolean | null; +} +interface ObjectTypeInternalSlot extends BaseNode { + type: "ObjectTypeInternalSlot"; + id: Identifier; + value: FlowType; + optional: boolean; + static: boolean; + method: boolean; +} +interface ObjectTypeCallProperty extends BaseNode { + type: "ObjectTypeCallProperty"; + value: FlowType; + static: boolean; +} +interface ObjectTypeIndexer extends BaseNode { + type: "ObjectTypeIndexer"; + id?: Identifier | null; + key: FlowType; + value: FlowType; + variance?: Variance | null; + static: boolean; +} +interface ObjectTypeProperty extends BaseNode { + type: "ObjectTypeProperty"; + key: Identifier | StringLiteral; + value: FlowType; + variance?: Variance | null; + kind: "init" | "get" | "set"; + method: boolean; + optional: boolean; + proto: boolean; + static: boolean; +} +interface ObjectTypeSpreadProperty extends BaseNode { + type: "ObjectTypeSpreadProperty"; + argument: FlowType; +} +interface OpaqueType extends BaseNode { + type: "OpaqueType"; + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + supertype?: FlowType | null; + impltype: FlowType; +} +interface QualifiedTypeIdentifier extends BaseNode { + type: "QualifiedTypeIdentifier"; + id: Identifier; + qualification: Identifier | QualifiedTypeIdentifier; +} +interface StringLiteralTypeAnnotation extends BaseNode { + type: "StringLiteralTypeAnnotation"; + value: string; +} +interface StringTypeAnnotation extends BaseNode { + type: "StringTypeAnnotation"; +} +interface SymbolTypeAnnotation extends BaseNode { + type: "SymbolTypeAnnotation"; +} +interface ThisTypeAnnotation extends BaseNode { + type: "ThisTypeAnnotation"; +} +interface TupleTypeAnnotation extends BaseNode { + type: "TupleTypeAnnotation"; + types: Array<FlowType>; +} +interface TypeofTypeAnnotation extends BaseNode { + type: "TypeofTypeAnnotation"; + argument: FlowType; +} +interface TypeAlias extends BaseNode { + type: "TypeAlias"; + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + right: FlowType; +} +interface TypeAnnotation extends BaseNode { + type: "TypeAnnotation"; + typeAnnotation: FlowType; +} +interface TypeCastExpression extends BaseNode { + type: "TypeCastExpression"; + expression: Expression; + typeAnnotation: TypeAnnotation; +} +interface TypeParameter extends BaseNode { + type: "TypeParameter"; + bound?: TypeAnnotation | null; + default?: FlowType | null; + variance?: Variance | null; + name: string; +} +interface TypeParameterDeclaration extends BaseNode { + type: "TypeParameterDeclaration"; + params: Array<TypeParameter>; +} +interface TypeParameterInstantiation extends BaseNode { + type: "TypeParameterInstantiation"; + params: Array<FlowType>; +} +interface UnionTypeAnnotation extends BaseNode { + type: "UnionTypeAnnotation"; + types: Array<FlowType>; +} +interface Variance extends BaseNode { + type: "Variance"; + kind: "minus" | "plus"; +} +interface VoidTypeAnnotation extends BaseNode { + type: "VoidTypeAnnotation"; +} +interface EnumDeclaration extends BaseNode { + type: "EnumDeclaration"; + id: Identifier; + body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody; +} +interface EnumBooleanBody extends BaseNode { + type: "EnumBooleanBody"; + members: Array<EnumBooleanMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} +interface EnumNumberBody extends BaseNode { + type: "EnumNumberBody"; + members: Array<EnumNumberMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} +interface EnumStringBody extends BaseNode { + type: "EnumStringBody"; + members: Array<EnumStringMember | EnumDefaultedMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} +interface EnumSymbolBody extends BaseNode { + type: "EnumSymbolBody"; + members: Array<EnumDefaultedMember>; + hasUnknownMembers: boolean; +} +interface EnumBooleanMember extends BaseNode { + type: "EnumBooleanMember"; + id: Identifier; + init: BooleanLiteral; +} +interface EnumNumberMember extends BaseNode { + type: "EnumNumberMember"; + id: Identifier; + init: NumericLiteral; +} +interface EnumStringMember extends BaseNode { + type: "EnumStringMember"; + id: Identifier; + init: StringLiteral; +} +interface EnumDefaultedMember extends BaseNode { + type: "EnumDefaultedMember"; + id: Identifier; +} +interface IndexedAccessType extends BaseNode { + type: "IndexedAccessType"; + objectType: FlowType; + indexType: FlowType; +} +interface OptionalIndexedAccessType extends BaseNode { + type: "OptionalIndexedAccessType"; + objectType: FlowType; + indexType: FlowType; + optional: boolean; +} +interface JSXAttribute extends BaseNode { + type: "JSXAttribute"; + name: JSXIdentifier | JSXNamespacedName; + value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null; +} +interface JSXClosingElement extends BaseNode { + type: "JSXClosingElement"; + name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName; +} +interface JSXElement extends BaseNode { + type: "JSXElement"; + openingElement: JSXOpeningElement; + closingElement?: JSXClosingElement | null; + children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>; + selfClosing?: boolean | null; +} +interface JSXEmptyExpression extends BaseNode { + type: "JSXEmptyExpression"; +} +interface JSXExpressionContainer extends BaseNode { + type: "JSXExpressionContainer"; + expression: Expression | JSXEmptyExpression; +} +interface JSXSpreadChild extends BaseNode { + type: "JSXSpreadChild"; + expression: Expression; +} +interface JSXIdentifier extends BaseNode { + type: "JSXIdentifier"; + name: string; +} +interface JSXMemberExpression extends BaseNode { + type: "JSXMemberExpression"; + object: JSXMemberExpression | JSXIdentifier; + property: JSXIdentifier; +} +interface JSXNamespacedName extends BaseNode { + type: "JSXNamespacedName"; + namespace: JSXIdentifier; + name: JSXIdentifier; +} +interface JSXOpeningElement extends BaseNode { + type: "JSXOpeningElement"; + name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName; + attributes: Array<JSXAttribute | JSXSpreadAttribute>; + selfClosing: boolean; + typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null; +} +interface JSXSpreadAttribute extends BaseNode { + type: "JSXSpreadAttribute"; + argument: Expression; +} +interface JSXText extends BaseNode { + type: "JSXText"; + value: string; +} +interface JSXFragment extends BaseNode { + type: "JSXFragment"; + openingFragment: JSXOpeningFragment; + closingFragment: JSXClosingFragment; + children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>; +} +interface JSXOpeningFragment extends BaseNode { + type: "JSXOpeningFragment"; +} +interface JSXClosingFragment extends BaseNode { + type: "JSXClosingFragment"; +} +interface Noop extends BaseNode { + type: "Noop"; +} +interface Placeholder extends BaseNode { + type: "Placeholder"; + expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; + name: Identifier; +} +interface V8IntrinsicIdentifier extends BaseNode { + type: "V8IntrinsicIdentifier"; + name: string; +} +interface ArgumentPlaceholder extends BaseNode { + type: "ArgumentPlaceholder"; +} +interface BindExpression extends BaseNode { + type: "BindExpression"; + object: Expression; + callee: Expression; +} +interface ImportAttribute extends BaseNode { + type: "ImportAttribute"; + key: Identifier | StringLiteral; + value: StringLiteral; +} +interface Decorator extends BaseNode { + type: "Decorator"; + expression: Expression; +} +interface DoExpression extends BaseNode { + type: "DoExpression"; + body: BlockStatement; + async: boolean; +} +interface ExportDefaultSpecifier extends BaseNode { + type: "ExportDefaultSpecifier"; + exported: Identifier; +} +interface RecordExpression extends BaseNode { + type: "RecordExpression"; + properties: Array<ObjectProperty | SpreadElement>; +} +interface TupleExpression extends BaseNode { + type: "TupleExpression"; + elements: Array<Expression | SpreadElement>; +} +interface DecimalLiteral extends BaseNode { + type: "DecimalLiteral"; + value: string; +} +interface ModuleExpression extends BaseNode { + type: "ModuleExpression"; + body: Program; +} +interface TopicReference extends BaseNode { + type: "TopicReference"; +} +interface PipelineTopicExpression extends BaseNode { + type: "PipelineTopicExpression"; + expression: Expression; +} +interface PipelineBareFunction extends BaseNode { + type: "PipelineBareFunction"; + callee: Expression; +} +interface PipelinePrimaryTopicReference extends BaseNode { + type: "PipelinePrimaryTopicReference"; +} +interface TSParameterProperty extends BaseNode { + type: "TSParameterProperty"; + parameter: Identifier | AssignmentPattern; + accessibility?: "public" | "private" | "protected" | null; + decorators?: Array<Decorator> | null; + override?: boolean | null; + readonly?: boolean | null; +} +interface TSDeclareFunction extends BaseNode { + type: "TSDeclareFunction"; + id?: Identifier | null; + typeParameters?: TSTypeParameterDeclaration | Noop | null; + params: Array<Identifier | Pattern | RestElement>; + returnType?: TSTypeAnnotation | Noop | null; + async?: boolean; + declare?: boolean | null; + generator?: boolean; +} +interface TSDeclareMethod extends BaseNode { + type: "TSDeclareMethod"; + decorators?: Array<Decorator> | null; + key: Identifier | StringLiteral | NumericLiteral | Expression; + typeParameters?: TSTypeParameterDeclaration | Noop | null; + params: Array<Identifier | Pattern | RestElement | TSParameterProperty>; + returnType?: TSTypeAnnotation | Noop | null; + abstract?: boolean | null; + access?: "public" | "private" | "protected" | null; + accessibility?: "public" | "private" | "protected" | null; + async?: boolean; + computed?: boolean; + generator?: boolean; + kind?: "get" | "set" | "method" | "constructor"; + optional?: boolean | null; + override?: boolean; + static?: boolean; +} +interface TSQualifiedName extends BaseNode { + type: "TSQualifiedName"; + left: TSEntityName; + right: Identifier; +} +interface TSCallSignatureDeclaration extends BaseNode { + type: "TSCallSignatureDeclaration"; + typeParameters?: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation?: TSTypeAnnotation | null; +} +interface TSConstructSignatureDeclaration extends BaseNode { + type: "TSConstructSignatureDeclaration"; + typeParameters?: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation?: TSTypeAnnotation | null; +} +interface TSPropertySignature extends BaseNode { + type: "TSPropertySignature"; + key: Expression; + typeAnnotation?: TSTypeAnnotation | null; + initializer?: Expression | null; + computed?: boolean | null; + kind: "get" | "set"; + optional?: boolean | null; + readonly?: boolean | null; +} +interface TSMethodSignature extends BaseNode { + type: "TSMethodSignature"; + key: Expression; + typeParameters?: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation?: TSTypeAnnotation | null; + computed?: boolean | null; + kind: "method" | "get" | "set"; + optional?: boolean | null; +} +interface TSIndexSignature extends BaseNode { + type: "TSIndexSignature"; + parameters: Array<Identifier>; + typeAnnotation?: TSTypeAnnotation | null; + readonly?: boolean | null; + static?: boolean | null; +} +interface TSAnyKeyword extends BaseNode { + type: "TSAnyKeyword"; +} +interface TSBooleanKeyword extends BaseNode { + type: "TSBooleanKeyword"; +} +interface TSBigIntKeyword extends BaseNode { + type: "TSBigIntKeyword"; +} +interface TSIntrinsicKeyword extends BaseNode { + type: "TSIntrinsicKeyword"; +} +interface TSNeverKeyword extends BaseNode { + type: "TSNeverKeyword"; +} +interface TSNullKeyword extends BaseNode { + type: "TSNullKeyword"; +} +interface TSNumberKeyword extends BaseNode { + type: "TSNumberKeyword"; +} +interface TSObjectKeyword extends BaseNode { + type: "TSObjectKeyword"; +} +interface TSStringKeyword extends BaseNode { + type: "TSStringKeyword"; +} +interface TSSymbolKeyword extends BaseNode { + type: "TSSymbolKeyword"; +} +interface TSUndefinedKeyword extends BaseNode { + type: "TSUndefinedKeyword"; +} +interface TSUnknownKeyword extends BaseNode { + type: "TSUnknownKeyword"; +} +interface TSVoidKeyword extends BaseNode { + type: "TSVoidKeyword"; +} +interface TSThisType extends BaseNode { + type: "TSThisType"; +} +interface TSFunctionType extends BaseNode { + type: "TSFunctionType"; + typeParameters?: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation?: TSTypeAnnotation | null; +} +interface TSConstructorType extends BaseNode { + type: "TSConstructorType"; + typeParameters?: TSTypeParameterDeclaration | null; + parameters: Array<Identifier | RestElement>; + typeAnnotation?: TSTypeAnnotation | null; + abstract?: boolean | null; +} +interface TSTypeReference extends BaseNode { + type: "TSTypeReference"; + typeName: TSEntityName; + typeParameters?: TSTypeParameterInstantiation | null; +} +interface TSTypePredicate extends BaseNode { + type: "TSTypePredicate"; + parameterName: Identifier | TSThisType; + typeAnnotation?: TSTypeAnnotation | null; + asserts?: boolean | null; +} +interface TSTypeQuery extends BaseNode { + type: "TSTypeQuery"; + exprName: TSEntityName | TSImportType; +} +interface TSTypeLiteral extends BaseNode { + type: "TSTypeLiteral"; + members: Array<TSTypeElement>; +} +interface TSArrayType extends BaseNode { + type: "TSArrayType"; + elementType: TSType; +} +interface TSTupleType extends BaseNode { + type: "TSTupleType"; + elementTypes: Array<TSType | TSNamedTupleMember>; +} +interface TSOptionalType extends BaseNode { + type: "TSOptionalType"; + typeAnnotation: TSType; +} +interface TSRestType extends BaseNode { + type: "TSRestType"; + typeAnnotation: TSType; +} +interface TSNamedTupleMember extends BaseNode { + type: "TSNamedTupleMember"; + label: Identifier; + elementType: TSType; + optional: boolean; +} +interface TSUnionType extends BaseNode { + type: "TSUnionType"; + types: Array<TSType>; +} +interface TSIntersectionType extends BaseNode { + type: "TSIntersectionType"; + types: Array<TSType>; +} +interface TSConditionalType extends BaseNode { + type: "TSConditionalType"; + checkType: TSType; + extendsType: TSType; + trueType: TSType; + falseType: TSType; +} +interface TSInferType extends BaseNode { + type: "TSInferType"; + typeParameter: TSTypeParameter; +} +interface TSParenthesizedType extends BaseNode { + type: "TSParenthesizedType"; + typeAnnotation: TSType; +} +interface TSTypeOperator extends BaseNode { + type: "TSTypeOperator"; + typeAnnotation: TSType; + operator: string; +} +interface TSIndexedAccessType extends BaseNode { + type: "TSIndexedAccessType"; + objectType: TSType; + indexType: TSType; +} +interface TSMappedType extends BaseNode { + type: "TSMappedType"; + typeParameter: TSTypeParameter; + typeAnnotation?: TSType | null; + nameType?: TSType | null; + optional?: boolean | null; + readonly?: boolean | null; +} +interface TSLiteralType extends BaseNode { + type: "TSLiteralType"; + literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression; +} +interface TSExpressionWithTypeArguments extends BaseNode { + type: "TSExpressionWithTypeArguments"; + expression: TSEntityName; + typeParameters?: TSTypeParameterInstantiation | null; +} +interface TSInterfaceDeclaration extends BaseNode { + type: "TSInterfaceDeclaration"; + id: Identifier; + typeParameters?: TSTypeParameterDeclaration | null; + extends?: Array<TSExpressionWithTypeArguments> | null; + body: TSInterfaceBody; + declare?: boolean | null; +} +interface TSInterfaceBody extends BaseNode { + type: "TSInterfaceBody"; + body: Array<TSTypeElement>; +} +interface TSTypeAliasDeclaration extends BaseNode { + type: "TSTypeAliasDeclaration"; + id: Identifier; + typeParameters?: TSTypeParameterDeclaration | null; + typeAnnotation: TSType; + declare?: boolean | null; +} +interface TSAsExpression extends BaseNode { + type: "TSAsExpression"; + expression: Expression; + typeAnnotation: TSType; +} +interface TSTypeAssertion extends BaseNode { + type: "TSTypeAssertion"; + typeAnnotation: TSType; + expression: Expression; +} +interface TSEnumDeclaration extends BaseNode { + type: "TSEnumDeclaration"; + id: Identifier; + members: Array<TSEnumMember>; + const?: boolean | null; + declare?: boolean | null; + initializer?: Expression | null; +} +interface TSEnumMember extends BaseNode { + type: "TSEnumMember"; + id: Identifier | StringLiteral; + initializer?: Expression | null; +} +interface TSModuleDeclaration extends BaseNode { + type: "TSModuleDeclaration"; + id: Identifier | StringLiteral; + body: TSModuleBlock | TSModuleDeclaration; + declare?: boolean | null; + global?: boolean | null; +} +interface TSModuleBlock extends BaseNode { + type: "TSModuleBlock"; + body: Array<Statement>; +} +interface TSImportType extends BaseNode { + type: "TSImportType"; + argument: StringLiteral; + qualifier?: TSEntityName | null; + typeParameters?: TSTypeParameterInstantiation | null; +} +interface TSImportEqualsDeclaration extends BaseNode { + type: "TSImportEqualsDeclaration"; + id: Identifier; + moduleReference: TSEntityName | TSExternalModuleReference; + importKind?: "type" | "value" | null; + isExport: boolean; +} +interface TSExternalModuleReference extends BaseNode { + type: "TSExternalModuleReference"; + expression: StringLiteral; +} +interface TSNonNullExpression extends BaseNode { + type: "TSNonNullExpression"; + expression: Expression; +} +interface TSExportAssignment extends BaseNode { + type: "TSExportAssignment"; + expression: Expression; +} +interface TSNamespaceExportDeclaration extends BaseNode { + type: "TSNamespaceExportDeclaration"; + id: Identifier; +} +interface TSTypeAnnotation extends BaseNode { + type: "TSTypeAnnotation"; + typeAnnotation: TSType; +} +interface TSTypeParameterInstantiation extends BaseNode { + type: "TSTypeParameterInstantiation"; + params: Array<TSType>; +} +interface TSTypeParameterDeclaration extends BaseNode { + type: "TSTypeParameterDeclaration"; + params: Array<TSTypeParameter>; +} +interface TSTypeParameter extends BaseNode { + type: "TSTypeParameter"; + constraint?: TSType | null; + default?: TSType | null; + name: string; +} +declare type Standardized = ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassAccessorProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock; +declare type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | RecordExpression | TupleExpression | DecimalLiteral | ModuleExpression | TopicReference | PipelineTopicExpression | PipelineBareFunction | PipelinePrimaryTopicReference | TSAsExpression | TSTypeAssertion | TSNonNullExpression; +declare type Binary = BinaryExpression | LogicalExpression; +declare type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock; +declare type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock; +declare type Block = BlockStatement | Program | TSModuleBlock; +declare type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration; +declare type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression; +declare type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement; +declare type Conditional = ConditionalExpression | IfStatement; +declare type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement; +declare type While = DoWhileStatement | WhileStatement; +declare type ExpressionWrapper = ExpressionStatement | ParenthesizedExpression | TypeCastExpression; +declare type For = ForInStatement | ForStatement | ForOfStatement; +declare type ForXStatement = ForInStatement | ForOfStatement; +declare type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; +declare type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod | StaticBlock; +declare type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral | DecimalLiteral; +declare type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; +declare type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern; +declare type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty; +declare type TSEntityName = Identifier | TSQualifiedName; +declare type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral | DecimalLiteral; +declare type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | BigIntLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | DecimalLiteral; +declare type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty; +declare type Method = ObjectMethod | ClassMethod | ClassPrivateMethod; +declare type ObjectMember = ObjectMethod | ObjectProperty; +declare type Property = ObjectProperty | ClassProperty | ClassAccessorProperty | ClassPrivateProperty; +declare type UnaryLike = UnaryExpression | SpreadElement; +declare type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern; +declare type Class = ClassExpression | ClassDeclaration; +declare type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration; +declare type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; +declare type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportNamespaceSpecifier | ExportDefaultSpecifier; +declare type Accessor = ClassAccessorProperty; +declare type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName; +declare type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | IndexedAccessType | OptionalIndexedAccessType; +declare type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType; +declare type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation; +declare type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias; +declare type FlowPredicate = DeclaredPredicate | InferredPredicate; +declare type EnumBody = EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody; +declare type EnumMember = EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember; +declare type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment; +declare type Miscellaneous = Noop | Placeholder | V8IntrinsicIdentifier; +declare type TypeScript = TSParameterProperty | TSDeclareFunction | TSDeclareMethod | TSQualifiedName | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature | TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSNamedTupleMember | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSInterfaceDeclaration | TSInterfaceBody | TSTypeAliasDeclaration | TSAsExpression | TSTypeAssertion | TSEnumDeclaration | TSEnumMember | TSModuleDeclaration | TSModuleBlock | TSImportType | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | TSExportAssignment | TSNamespaceExportDeclaration | TSTypeAnnotation | TSTypeParameterInstantiation | TSTypeParameterDeclaration | TSTypeParameter; +declare type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature; +declare type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType; +declare type TSBaseType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSLiteralType; +interface Aliases { + Standardized: Standardized; + Expression: Expression; + Binary: Binary; + Scopable: Scopable; + BlockParent: BlockParent; + Block: Block; + Statement: Statement; + Terminatorless: Terminatorless; + CompletionStatement: CompletionStatement; + Conditional: Conditional; + Loop: Loop; + While: While; + ExpressionWrapper: ExpressionWrapper; + For: For; + ForXStatement: ForXStatement; + Function: Function; + FunctionParent: FunctionParent; + Pureish: Pureish; + Declaration: Declaration; + PatternLike: PatternLike; + LVal: LVal; + TSEntityName: TSEntityName; + Literal: Literal; + Immutable: Immutable; + UserWhitespacable: UserWhitespacable; + Method: Method; + ObjectMember: ObjectMember; + Property: Property; + UnaryLike: UnaryLike; + Pattern: Pattern; + Class: Class; + ModuleDeclaration: ModuleDeclaration; + ExportDeclaration: ExportDeclaration; + ModuleSpecifier: ModuleSpecifier; + Accessor: Accessor; + Private: Private; + Flow: Flow; + FlowType: FlowType; + FlowBaseAnnotation: FlowBaseAnnotation; + FlowDeclaration: FlowDeclaration; + FlowPredicate: FlowPredicate; + EnumBody: EnumBody; + EnumMember: EnumMember; + JSX: JSX; + Miscellaneous: Miscellaneous; + TypeScript: TypeScript; + TSTypeElement: TSTypeElement; + TSType: TSType; + TSBaseType: TSBaseType; +} +declare type DeprecatedAliases = NumberLiteral$1 | RegexLiteral$1 | RestProperty$1 | SpreadProperty$1; + +declare function isCompatTag(tagName?: string): boolean; + +declare type ReturnedChild = JSXSpreadChild | JSXElement | JSXFragment | Expression; +declare function buildChildren(node: JSXElement | JSXFragment): ReturnedChild[]; + +declare function assertNode(node?: any): asserts node is Node; + +declare function assertArrayExpression(node: object | null | undefined, opts?: object | null): asserts node is ArrayExpression; +declare function assertAssignmentExpression(node: object | null | undefined, opts?: object | null): asserts node is AssignmentExpression; +declare function assertBinaryExpression(node: object | null | undefined, opts?: object | null): asserts node is BinaryExpression; +declare function assertInterpreterDirective(node: object | null | undefined, opts?: object | null): asserts node is InterpreterDirective; +declare function assertDirective(node: object | null | undefined, opts?: object | null): asserts node is Directive; +declare function assertDirectiveLiteral(node: object | null | undefined, opts?: object | null): asserts node is DirectiveLiteral; +declare function assertBlockStatement(node: object | null | undefined, opts?: object | null): asserts node is BlockStatement; +declare function assertBreakStatement(node: object | null | undefined, opts?: object | null): asserts node is BreakStatement; +declare function assertCallExpression(node: object | null | undefined, opts?: object | null): asserts node is CallExpression; +declare function assertCatchClause(node: object | null | undefined, opts?: object | null): asserts node is CatchClause; +declare function assertConditionalExpression(node: object | null | undefined, opts?: object | null): asserts node is ConditionalExpression; +declare function assertContinueStatement(node: object | null | undefined, opts?: object | null): asserts node is ContinueStatement; +declare function assertDebuggerStatement(node: object | null | undefined, opts?: object | null): asserts node is DebuggerStatement; +declare function assertDoWhileStatement(node: object | null | undefined, opts?: object | null): asserts node is DoWhileStatement; +declare function assertEmptyStatement(node: object | null | undefined, opts?: object | null): asserts node is EmptyStatement; +declare function assertExpressionStatement(node: object | null | undefined, opts?: object | null): asserts node is ExpressionStatement; +declare function assertFile(node: object | null | undefined, opts?: object | null): asserts node is File; +declare function assertForInStatement(node: object | null | undefined, opts?: object | null): asserts node is ForInStatement; +declare function assertForStatement(node: object | null | undefined, opts?: object | null): asserts node is ForStatement; +declare function assertFunctionDeclaration(node: object | null | undefined, opts?: object | null): asserts node is FunctionDeclaration; +declare function assertFunctionExpression(node: object | null | undefined, opts?: object | null): asserts node is FunctionExpression; +declare function assertIdentifier(node: object | null | undefined, opts?: object | null): asserts node is Identifier; +declare function assertIfStatement(node: object | null | undefined, opts?: object | null): asserts node is IfStatement; +declare function assertLabeledStatement(node: object | null | undefined, opts?: object | null): asserts node is LabeledStatement; +declare function assertStringLiteral(node: object | null | undefined, opts?: object | null): asserts node is StringLiteral; +declare function assertNumericLiteral(node: object | null | undefined, opts?: object | null): asserts node is NumericLiteral; +declare function assertNullLiteral(node: object | null | undefined, opts?: object | null): asserts node is NullLiteral; +declare function assertBooleanLiteral(node: object | null | undefined, opts?: object | null): asserts node is BooleanLiteral; +declare function assertRegExpLiteral(node: object | null | undefined, opts?: object | null): asserts node is RegExpLiteral; +declare function assertLogicalExpression(node: object | null | undefined, opts?: object | null): asserts node is LogicalExpression; +declare function assertMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is MemberExpression; +declare function assertNewExpression(node: object | null | undefined, opts?: object | null): asserts node is NewExpression; +declare function assertProgram(node: object | null | undefined, opts?: object | null): asserts node is Program; +declare function assertObjectExpression(node: object | null | undefined, opts?: object | null): asserts node is ObjectExpression; +declare function assertObjectMethod(node: object | null | undefined, opts?: object | null): asserts node is ObjectMethod; +declare function assertObjectProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectProperty; +declare function assertRestElement(node: object | null | undefined, opts?: object | null): asserts node is RestElement; +declare function assertReturnStatement(node: object | null | undefined, opts?: object | null): asserts node is ReturnStatement; +declare function assertSequenceExpression(node: object | null | undefined, opts?: object | null): asserts node is SequenceExpression; +declare function assertParenthesizedExpression(node: object | null | undefined, opts?: object | null): asserts node is ParenthesizedExpression; +declare function assertSwitchCase(node: object | null | undefined, opts?: object | null): asserts node is SwitchCase; +declare function assertSwitchStatement(node: object | null | undefined, opts?: object | null): asserts node is SwitchStatement; +declare function assertThisExpression(node: object | null | undefined, opts?: object | null): asserts node is ThisExpression; +declare function assertThrowStatement(node: object | null | undefined, opts?: object | null): asserts node is ThrowStatement; +declare function assertTryStatement(node: object | null | undefined, opts?: object | null): asserts node is TryStatement; +declare function assertUnaryExpression(node: object | null | undefined, opts?: object | null): asserts node is UnaryExpression; +declare function assertUpdateExpression(node: object | null | undefined, opts?: object | null): asserts node is UpdateExpression; +declare function assertVariableDeclaration(node: object | null | undefined, opts?: object | null): asserts node is VariableDeclaration; +declare function assertVariableDeclarator(node: object | null | undefined, opts?: object | null): asserts node is VariableDeclarator; +declare function assertWhileStatement(node: object | null | undefined, opts?: object | null): asserts node is WhileStatement; +declare function assertWithStatement(node: object | null | undefined, opts?: object | null): asserts node is WithStatement; +declare function assertAssignmentPattern(node: object | null | undefined, opts?: object | null): asserts node is AssignmentPattern; +declare function assertArrayPattern(node: object | null | undefined, opts?: object | null): asserts node is ArrayPattern; +declare function assertArrowFunctionExpression(node: object | null | undefined, opts?: object | null): asserts node is ArrowFunctionExpression; +declare function assertClassBody(node: object | null | undefined, opts?: object | null): asserts node is ClassBody; +declare function assertClassExpression(node: object | null | undefined, opts?: object | null): asserts node is ClassExpression; +declare function assertClassDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ClassDeclaration; +declare function assertExportAllDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportAllDeclaration; +declare function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportDefaultDeclaration; +declare function assertExportNamedDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportNamedDeclaration; +declare function assertExportSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportSpecifier; +declare function assertForOfStatement(node: object | null | undefined, opts?: object | null): asserts node is ForOfStatement; +declare function assertImportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ImportDeclaration; +declare function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportDefaultSpecifier; +declare function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportNamespaceSpecifier; +declare function assertImportSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportSpecifier; +declare function assertMetaProperty(node: object | null | undefined, opts?: object | null): asserts node is MetaProperty; +declare function assertClassMethod(node: object | null | undefined, opts?: object | null): asserts node is ClassMethod; +declare function assertObjectPattern(node: object | null | undefined, opts?: object | null): asserts node is ObjectPattern; +declare function assertSpreadElement(node: object | null | undefined, opts?: object | null): asserts node is SpreadElement; +declare function assertSuper(node: object | null | undefined, opts?: object | null): asserts node is Super; +declare function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): asserts node is TaggedTemplateExpression; +declare function assertTemplateElement(node: object | null | undefined, opts?: object | null): asserts node is TemplateElement; +declare function assertTemplateLiteral(node: object | null | undefined, opts?: object | null): asserts node is TemplateLiteral; +declare function assertYieldExpression(node: object | null | undefined, opts?: object | null): asserts node is YieldExpression; +declare function assertAwaitExpression(node: object | null | undefined, opts?: object | null): asserts node is AwaitExpression; +declare function assertImport(node: object | null | undefined, opts?: object | null): asserts node is Import; +declare function assertBigIntLiteral(node: object | null | undefined, opts?: object | null): asserts node is BigIntLiteral; +declare function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportNamespaceSpecifier; +declare function assertOptionalMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is OptionalMemberExpression; +declare function assertOptionalCallExpression(node: object | null | undefined, opts?: object | null): asserts node is OptionalCallExpression; +declare function assertClassProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassProperty; +declare function assertClassAccessorProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassAccessorProperty; +declare function assertClassPrivateProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassPrivateProperty; +declare function assertClassPrivateMethod(node: object | null | undefined, opts?: object | null): asserts node is ClassPrivateMethod; +declare function assertPrivateName(node: object | null | undefined, opts?: object | null): asserts node is PrivateName; +declare function assertStaticBlock(node: object | null | undefined, opts?: object | null): asserts node is StaticBlock; +declare function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is AnyTypeAnnotation; +declare function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ArrayTypeAnnotation; +declare function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is BooleanTypeAnnotation; +declare function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is BooleanLiteralTypeAnnotation; +declare function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NullLiteralTypeAnnotation; +declare function assertClassImplements(node: object | null | undefined, opts?: object | null): asserts node is ClassImplements; +declare function assertDeclareClass(node: object | null | undefined, opts?: object | null): asserts node is DeclareClass; +declare function assertDeclareFunction(node: object | null | undefined, opts?: object | null): asserts node is DeclareFunction; +declare function assertDeclareInterface(node: object | null | undefined, opts?: object | null): asserts node is DeclareInterface; +declare function assertDeclareModule(node: object | null | undefined, opts?: object | null): asserts node is DeclareModule; +declare function assertDeclareModuleExports(node: object | null | undefined, opts?: object | null): asserts node is DeclareModuleExports; +declare function assertDeclareTypeAlias(node: object | null | undefined, opts?: object | null): asserts node is DeclareTypeAlias; +declare function assertDeclareOpaqueType(node: object | null | undefined, opts?: object | null): asserts node is DeclareOpaqueType; +declare function assertDeclareVariable(node: object | null | undefined, opts?: object | null): asserts node is DeclareVariable; +declare function assertDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is DeclareExportDeclaration; +declare function assertDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): asserts node is DeclareExportAllDeclaration; +declare function assertDeclaredPredicate(node: object | null | undefined, opts?: object | null): asserts node is DeclaredPredicate; +declare function assertExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ExistsTypeAnnotation; +declare function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is FunctionTypeAnnotation; +declare function assertFunctionTypeParam(node: object | null | undefined, opts?: object | null): asserts node is FunctionTypeParam; +declare function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is GenericTypeAnnotation; +declare function assertInferredPredicate(node: object | null | undefined, opts?: object | null): asserts node is InferredPredicate; +declare function assertInterfaceExtends(node: object | null | undefined, opts?: object | null): asserts node is InterfaceExtends; +declare function assertInterfaceDeclaration(node: object | null | undefined, opts?: object | null): asserts node is InterfaceDeclaration; +declare function assertInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is InterfaceTypeAnnotation; +declare function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is IntersectionTypeAnnotation; +declare function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is MixedTypeAnnotation; +declare function assertEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is EmptyTypeAnnotation; +declare function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NullableTypeAnnotation; +declare function assertNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NumberLiteralTypeAnnotation; +declare function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NumberTypeAnnotation; +declare function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeAnnotation; +declare function assertObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeInternalSlot; +declare function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeCallProperty; +declare function assertObjectTypeIndexer(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeIndexer; +declare function assertObjectTypeProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeProperty; +declare function assertObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeSpreadProperty; +declare function assertOpaqueType(node: object | null | undefined, opts?: object | null): asserts node is OpaqueType; +declare function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): asserts node is QualifiedTypeIdentifier; +declare function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is StringLiteralTypeAnnotation; +declare function assertStringTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is StringTypeAnnotation; +declare function assertSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is SymbolTypeAnnotation; +declare function assertThisTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ThisTypeAnnotation; +declare function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TupleTypeAnnotation; +declare function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TypeofTypeAnnotation; +declare function assertTypeAlias(node: object | null | undefined, opts?: object | null): asserts node is TypeAlias; +declare function assertTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TypeAnnotation; +declare function assertTypeCastExpression(node: object | null | undefined, opts?: object | null): asserts node is TypeCastExpression; +declare function assertTypeParameter(node: object | null | undefined, opts?: object | null): asserts node is TypeParameter; +declare function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TypeParameterDeclaration; +declare function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): asserts node is TypeParameterInstantiation; +declare function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is UnionTypeAnnotation; +declare function assertVariance(node: object | null | undefined, opts?: object | null): asserts node is Variance; +declare function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is VoidTypeAnnotation; +declare function assertEnumDeclaration(node: object | null | undefined, opts?: object | null): asserts node is EnumDeclaration; +declare function assertEnumBooleanBody(node: object | null | undefined, opts?: object | null): asserts node is EnumBooleanBody; +declare function assertEnumNumberBody(node: object | null | undefined, opts?: object | null): asserts node is EnumNumberBody; +declare function assertEnumStringBody(node: object | null | undefined, opts?: object | null): asserts node is EnumStringBody; +declare function assertEnumSymbolBody(node: object | null | undefined, opts?: object | null): asserts node is EnumSymbolBody; +declare function assertEnumBooleanMember(node: object | null | undefined, opts?: object | null): asserts node is EnumBooleanMember; +declare function assertEnumNumberMember(node: object | null | undefined, opts?: object | null): asserts node is EnumNumberMember; +declare function assertEnumStringMember(node: object | null | undefined, opts?: object | null): asserts node is EnumStringMember; +declare function assertEnumDefaultedMember(node: object | null | undefined, opts?: object | null): asserts node is EnumDefaultedMember; +declare function assertIndexedAccessType(node: object | null | undefined, opts?: object | null): asserts node is IndexedAccessType; +declare function assertOptionalIndexedAccessType(node: object | null | undefined, opts?: object | null): asserts node is OptionalIndexedAccessType; +declare function assertJSXAttribute(node: object | null | undefined, opts?: object | null): asserts node is JSXAttribute; +declare function assertJSXClosingElement(node: object | null | undefined, opts?: object | null): asserts node is JSXClosingElement; +declare function assertJSXElement(node: object | null | undefined, opts?: object | null): asserts node is JSXElement; +declare function assertJSXEmptyExpression(node: object | null | undefined, opts?: object | null): asserts node is JSXEmptyExpression; +declare function assertJSXExpressionContainer(node: object | null | undefined, opts?: object | null): asserts node is JSXExpressionContainer; +declare function assertJSXSpreadChild(node: object | null | undefined, opts?: object | null): asserts node is JSXSpreadChild; +declare function assertJSXIdentifier(node: object | null | undefined, opts?: object | null): asserts node is JSXIdentifier; +declare function assertJSXMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is JSXMemberExpression; +declare function assertJSXNamespacedName(node: object | null | undefined, opts?: object | null): asserts node is JSXNamespacedName; +declare function assertJSXOpeningElement(node: object | null | undefined, opts?: object | null): asserts node is JSXOpeningElement; +declare function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): asserts node is JSXSpreadAttribute; +declare function assertJSXText(node: object | null | undefined, opts?: object | null): asserts node is JSXText; +declare function assertJSXFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXFragment; +declare function assertJSXOpeningFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXOpeningFragment; +declare function assertJSXClosingFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXClosingFragment; +declare function assertNoop(node: object | null | undefined, opts?: object | null): asserts node is Noop; +declare function assertPlaceholder(node: object | null | undefined, opts?: object | null): asserts node is Placeholder; +declare function assertV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): asserts node is V8IntrinsicIdentifier; +declare function assertArgumentPlaceholder(node: object | null | undefined, opts?: object | null): asserts node is ArgumentPlaceholder; +declare function assertBindExpression(node: object | null | undefined, opts?: object | null): asserts node is BindExpression; +declare function assertImportAttribute(node: object | null | undefined, opts?: object | null): asserts node is ImportAttribute; +declare function assertDecorator(node: object | null | undefined, opts?: object | null): asserts node is Decorator; +declare function assertDoExpression(node: object | null | undefined, opts?: object | null): asserts node is DoExpression; +declare function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportDefaultSpecifier; +declare function assertRecordExpression(node: object | null | undefined, opts?: object | null): asserts node is RecordExpression; +declare function assertTupleExpression(node: object | null | undefined, opts?: object | null): asserts node is TupleExpression; +declare function assertDecimalLiteral(node: object | null | undefined, opts?: object | null): asserts node is DecimalLiteral; +declare function assertModuleExpression(node: object | null | undefined, opts?: object | null): asserts node is ModuleExpression; +declare function assertTopicReference(node: object | null | undefined, opts?: object | null): asserts node is TopicReference; +declare function assertPipelineTopicExpression(node: object | null | undefined, opts?: object | null): asserts node is PipelineTopicExpression; +declare function assertPipelineBareFunction(node: object | null | undefined, opts?: object | null): asserts node is PipelineBareFunction; +declare function assertPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): asserts node is PipelinePrimaryTopicReference; +declare function assertTSParameterProperty(node: object | null | undefined, opts?: object | null): asserts node is TSParameterProperty; +declare function assertTSDeclareFunction(node: object | null | undefined, opts?: object | null): asserts node is TSDeclareFunction; +declare function assertTSDeclareMethod(node: object | null | undefined, opts?: object | null): asserts node is TSDeclareMethod; +declare function assertTSQualifiedName(node: object | null | undefined, opts?: object | null): asserts node is TSQualifiedName; +declare function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSCallSignatureDeclaration; +declare function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSConstructSignatureDeclaration; +declare function assertTSPropertySignature(node: object | null | undefined, opts?: object | null): asserts node is TSPropertySignature; +declare function assertTSMethodSignature(node: object | null | undefined, opts?: object | null): asserts node is TSMethodSignature; +declare function assertTSIndexSignature(node: object | null | undefined, opts?: object | null): asserts node is TSIndexSignature; +declare function assertTSAnyKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSAnyKeyword; +declare function assertTSBooleanKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSBooleanKeyword; +declare function assertTSBigIntKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSBigIntKeyword; +declare function assertTSIntrinsicKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSIntrinsicKeyword; +declare function assertTSNeverKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNeverKeyword; +declare function assertTSNullKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNullKeyword; +declare function assertTSNumberKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNumberKeyword; +declare function assertTSObjectKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSObjectKeyword; +declare function assertTSStringKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSStringKeyword; +declare function assertTSSymbolKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSSymbolKeyword; +declare function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSUndefinedKeyword; +declare function assertTSUnknownKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSUnknownKeyword; +declare function assertTSVoidKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSVoidKeyword; +declare function assertTSThisType(node: object | null | undefined, opts?: object | null): asserts node is TSThisType; +declare function assertTSFunctionType(node: object | null | undefined, opts?: object | null): asserts node is TSFunctionType; +declare function assertTSConstructorType(node: object | null | undefined, opts?: object | null): asserts node is TSConstructorType; +declare function assertTSTypeReference(node: object | null | undefined, opts?: object | null): asserts node is TSTypeReference; +declare function assertTSTypePredicate(node: object | null | undefined, opts?: object | null): asserts node is TSTypePredicate; +declare function assertTSTypeQuery(node: object | null | undefined, opts?: object | null): asserts node is TSTypeQuery; +declare function assertTSTypeLiteral(node: object | null | undefined, opts?: object | null): asserts node is TSTypeLiteral; +declare function assertTSArrayType(node: object | null | undefined, opts?: object | null): asserts node is TSArrayType; +declare function assertTSTupleType(node: object | null | undefined, opts?: object | null): asserts node is TSTupleType; +declare function assertTSOptionalType(node: object | null | undefined, opts?: object | null): asserts node is TSOptionalType; +declare function assertTSRestType(node: object | null | undefined, opts?: object | null): asserts node is TSRestType; +declare function assertTSNamedTupleMember(node: object | null | undefined, opts?: object | null): asserts node is TSNamedTupleMember; +declare function assertTSUnionType(node: object | null | undefined, opts?: object | null): asserts node is TSUnionType; +declare function assertTSIntersectionType(node: object | null | undefined, opts?: object | null): asserts node is TSIntersectionType; +declare function assertTSConditionalType(node: object | null | undefined, opts?: object | null): asserts node is TSConditionalType; +declare function assertTSInferType(node: object | null | undefined, opts?: object | null): asserts node is TSInferType; +declare function assertTSParenthesizedType(node: object | null | undefined, opts?: object | null): asserts node is TSParenthesizedType; +declare function assertTSTypeOperator(node: object | null | undefined, opts?: object | null): asserts node is TSTypeOperator; +declare function assertTSIndexedAccessType(node: object | null | undefined, opts?: object | null): asserts node is TSIndexedAccessType; +declare function assertTSMappedType(node: object | null | undefined, opts?: object | null): asserts node is TSMappedType; +declare function assertTSLiteralType(node: object | null | undefined, opts?: object | null): asserts node is TSLiteralType; +declare function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): asserts node is TSExpressionWithTypeArguments; +declare function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSInterfaceDeclaration; +declare function assertTSInterfaceBody(node: object | null | undefined, opts?: object | null): asserts node is TSInterfaceBody; +declare function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAliasDeclaration; +declare function assertTSAsExpression(node: object | null | undefined, opts?: object | null): asserts node is TSAsExpression; +declare function assertTSTypeAssertion(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAssertion; +declare function assertTSEnumDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSEnumDeclaration; +declare function assertTSEnumMember(node: object | null | undefined, opts?: object | null): asserts node is TSEnumMember; +declare function assertTSModuleDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSModuleDeclaration; +declare function assertTSModuleBlock(node: object | null | undefined, opts?: object | null): asserts node is TSModuleBlock; +declare function assertTSImportType(node: object | null | undefined, opts?: object | null): asserts node is TSImportType; +declare function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSImportEqualsDeclaration; +declare function assertTSExternalModuleReference(node: object | null | undefined, opts?: object | null): asserts node is TSExternalModuleReference; +declare function assertTSNonNullExpression(node: object | null | undefined, opts?: object | null): asserts node is TSNonNullExpression; +declare function assertTSExportAssignment(node: object | null | undefined, opts?: object | null): asserts node is TSExportAssignment; +declare function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSNamespaceExportDeclaration; +declare function assertTSTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAnnotation; +declare function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameterInstantiation; +declare function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameterDeclaration; +declare function assertTSTypeParameter(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameter; +declare function assertStandardized(node: object | null | undefined, opts?: object | null): asserts node is Standardized; +declare function assertExpression(node: object | null | undefined, opts?: object | null): asserts node is Expression; +declare function assertBinary(node: object | null | undefined, opts?: object | null): asserts node is Binary; +declare function assertScopable(node: object | null | undefined, opts?: object | null): asserts node is Scopable; +declare function assertBlockParent(node: object | null | undefined, opts?: object | null): asserts node is BlockParent; +declare function assertBlock(node: object | null | undefined, opts?: object | null): asserts node is Block; +declare function assertStatement(node: object | null | undefined, opts?: object | null): asserts node is Statement; +declare function assertTerminatorless(node: object | null | undefined, opts?: object | null): asserts node is Terminatorless; +declare function assertCompletionStatement(node: object | null | undefined, opts?: object | null): asserts node is CompletionStatement; +declare function assertConditional(node: object | null | undefined, opts?: object | null): asserts node is Conditional; +declare function assertLoop(node: object | null | undefined, opts?: object | null): asserts node is Loop; +declare function assertWhile(node: object | null | undefined, opts?: object | null): asserts node is While; +declare function assertExpressionWrapper(node: object | null | undefined, opts?: object | null): asserts node is ExpressionWrapper; +declare function assertFor(node: object | null | undefined, opts?: object | null): asserts node is For; +declare function assertForXStatement(node: object | null | undefined, opts?: object | null): asserts node is ForXStatement; +declare function assertFunction(node: object | null | undefined, opts?: object | null): asserts node is Function; +declare function assertFunctionParent(node: object | null | undefined, opts?: object | null): asserts node is FunctionParent; +declare function assertPureish(node: object | null | undefined, opts?: object | null): asserts node is Pureish; +declare function assertDeclaration(node: object | null | undefined, opts?: object | null): asserts node is Declaration; +declare function assertPatternLike(node: object | null | undefined, opts?: object | null): asserts node is PatternLike; +declare function assertLVal(node: object | null | undefined, opts?: object | null): asserts node is LVal; +declare function assertTSEntityName(node: object | null | undefined, opts?: object | null): asserts node is TSEntityName; +declare function assertLiteral(node: object | null | undefined, opts?: object | null): asserts node is Literal; +declare function assertImmutable(node: object | null | undefined, opts?: object | null): asserts node is Immutable; +declare function assertUserWhitespacable(node: object | null | undefined, opts?: object | null): asserts node is UserWhitespacable; +declare function assertMethod(node: object | null | undefined, opts?: object | null): asserts node is Method; +declare function assertObjectMember(node: object | null | undefined, opts?: object | null): asserts node is ObjectMember; +declare function assertProperty(node: object | null | undefined, opts?: object | null): asserts node is Property; +declare function assertUnaryLike(node: object | null | undefined, opts?: object | null): asserts node is UnaryLike; +declare function assertPattern(node: object | null | undefined, opts?: object | null): asserts node is Pattern; +declare function assertClass(node: object | null | undefined, opts?: object | null): asserts node is Class; +declare function assertModuleDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ModuleDeclaration; +declare function assertExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportDeclaration; +declare function assertModuleSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ModuleSpecifier; +declare function assertAccessor(node: object | null | undefined, opts?: object | null): asserts node is Accessor; +declare function assertPrivate(node: object | null | undefined, opts?: object | null): asserts node is Private; +declare function assertFlow(node: object | null | undefined, opts?: object | null): asserts node is Flow; +declare function assertFlowType(node: object | null | undefined, opts?: object | null): asserts node is FlowType; +declare function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): asserts node is FlowBaseAnnotation; +declare function assertFlowDeclaration(node: object | null | undefined, opts?: object | null): asserts node is FlowDeclaration; +declare function assertFlowPredicate(node: object | null | undefined, opts?: object | null): asserts node is FlowPredicate; +declare function assertEnumBody(node: object | null | undefined, opts?: object | null): asserts node is EnumBody; +declare function assertEnumMember(node: object | null | undefined, opts?: object | null): asserts node is EnumMember; +declare function assertJSX(node: object | null | undefined, opts?: object | null): asserts node is JSX; +declare function assertMiscellaneous(node: object | null | undefined, opts?: object | null): asserts node is Miscellaneous; +declare function assertTypeScript(node: object | null | undefined, opts?: object | null): asserts node is TypeScript; +declare function assertTSTypeElement(node: object | null | undefined, opts?: object | null): asserts node is TSTypeElement; +declare function assertTSType(node: object | null | undefined, opts?: object | null): asserts node is TSType; +declare function assertTSBaseType(node: object | null | undefined, opts?: object | null): asserts node is TSBaseType; +declare function assertNumberLiteral(node: any, opts: any): void; +declare function assertRegexLiteral(node: any, opts: any): void; +declare function assertRestProperty(node: any, opts: any): void; +declare function assertSpreadProperty(node: any, opts: any): void; + +declare const _default$4: { + (type: "string"): StringTypeAnnotation; + (type: "number"): NumberTypeAnnotation; + (type: "undefined"): VoidTypeAnnotation; + (type: "boolean"): BooleanTypeAnnotation; + (type: "function"): GenericTypeAnnotation; + (type: "object"): GenericTypeAnnotation; + (type: "symbol"): GenericTypeAnnotation; + (type: "bigint"): AnyTypeAnnotation; +}; +//# sourceMappingURL=createTypeAnnotationBasedOnTypeof.d.ts.map + +/** + * Takes an array of `types` and flattens them, removing duplicates and + * returns a `UnionTypeAnnotation` node containing them. + */ +declare function createFlowUnionType<T extends FlowType>(types: [T] | Array<T>): T | UnionTypeAnnotation; + +/** + * Takes an array of `types` and flattens them, removing duplicates and + * returns a `UnionTypeAnnotation` node containing them. + */ +declare function createTSUnionType(typeAnnotations: Array<TSTypeAnnotation>): TSType; + +declare function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression; +declare function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression; +declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression | PrivateName, right: Expression): BinaryExpression; +declare function interpreterDirective(value: string): InterpreterDirective; +declare function directive(value: DirectiveLiteral): Directive; +declare function directiveLiteral(value: string): DirectiveLiteral; +declare function blockStatement(body: Array<Statement>, directives?: Array<Directive>): BlockStatement; +declare function breakStatement(label?: Identifier | null): BreakStatement; +declare function callExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): CallExpression; +declare function catchClause(param: Identifier | ArrayPattern | ObjectPattern | null | undefined, body: BlockStatement): CatchClause; +declare function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression; +declare function continueStatement(label?: Identifier | null): ContinueStatement; +declare function debuggerStatement(): DebuggerStatement; +declare function doWhileStatement(test: Expression, body: Statement): DoWhileStatement; +declare function emptyStatement(): EmptyStatement; +declare function expressionStatement(expression: Expression): ExpressionStatement; +declare function file(program: Program, comments?: Array<CommentBlock | CommentLine> | null, tokens?: Array<any> | null): File; +declare function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement; +declare function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement; +declare function functionDeclaration(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, generator?: boolean, async?: boolean): FunctionDeclaration; +declare function functionExpression(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, generator?: boolean, async?: boolean): FunctionExpression; +declare function identifier(name: string): Identifier; +declare function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement; +declare function labeledStatement(label: Identifier, body: Statement): LabeledStatement; +declare function stringLiteral(value: string): StringLiteral; +declare function numericLiteral(value: number): NumericLiteral; +declare function nullLiteral(): NullLiteral; +declare function booleanLiteral(value: boolean): BooleanLiteral; +declare function regExpLiteral(pattern: string, flags?: string): RegExpLiteral; +declare function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; +declare function memberExpression(object: Expression, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: true | false | null): MemberExpression; +declare function newExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): NewExpression; +declare function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program; +declare function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression; +declare function objectMethod(kind: "method" | "get" | "set" | undefined, key: Expression | Identifier | StringLiteral | NumericLiteral, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod; +declare function objectProperty(key: Expression | Identifier | StringLiteral | NumericLiteral, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<Decorator> | null): ObjectProperty; +declare function restElement(argument: LVal): RestElement; +declare function returnStatement(argument?: Expression | null): ReturnStatement; +declare function sequenceExpression(expressions: Array<Expression>): SequenceExpression; +declare function parenthesizedExpression(expression: Expression): ParenthesizedExpression; +declare function switchCase(test: Expression | null | undefined, consequent: Array<Statement>): SwitchCase; +declare function switchStatement(discriminant: Expression, cases: Array<SwitchCase>): SwitchStatement; +declare function thisExpression(): ThisExpression; +declare function throwStatement(argument: Expression): ThrowStatement; +declare function tryStatement(block: BlockStatement, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement; +declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression; +declare function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression; +declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<VariableDeclarator>): VariableDeclaration; +declare function variableDeclarator(id: LVal, init?: Expression | null): VariableDeclarator; +declare function whileStatement(test: Expression, body: Statement): WhileStatement; +declare function withStatement(object: Expression, body: Statement): WithStatement; +declare function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression): AssignmentPattern; +declare function arrayPattern(elements: Array<null | PatternLike>): ArrayPattern; +declare function arrowFunctionExpression(params: Array<Identifier | Pattern | RestElement>, body: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression; +declare function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>): ClassBody; +declare function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassExpression; +declare function classDeclaration(id: Identifier, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassDeclaration; +declare function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration; +declare function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration; +declare function exportNamedDeclaration(declaration?: Declaration | null, specifiers?: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>, source?: StringLiteral | null): ExportNamedDeclaration; +declare function exportSpecifier(local: Identifier, exported: Identifier | StringLiteral): ExportSpecifier; +declare function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement; +declare function importDeclaration(specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source: StringLiteral): ImportDeclaration; +declare function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier; +declare function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier; +declare function importSpecifier(local: Identifier, imported: Identifier | StringLiteral): ImportSpecifier; +declare function metaProperty(meta: Identifier, property: Identifier): MetaProperty; +declare function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod; +declare function objectPattern(properties: Array<RestElement | ObjectProperty>): ObjectPattern; +declare function spreadElement(argument: Expression): SpreadElement; +declare function _super(): Super; + +declare function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral): TaggedTemplateExpression; +declare function templateElement(value: { + raw: string; + cooked?: string; +}, tail?: boolean): TemplateElement; +declare function templateLiteral(quasis: Array<TemplateElement>, expressions: Array<Expression | TSType>): TemplateLiteral; +declare function yieldExpression(argument?: Expression | null, delegate?: boolean): YieldExpression; +declare function awaitExpression(argument: Expression): AwaitExpression; +declare function _import(): Import; + +declare function bigIntLiteral(value: string): BigIntLiteral; +declare function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier; +declare function optionalMemberExpression(object: Expression, property: Expression | Identifier, computed: boolean | undefined, optional: boolean): OptionalMemberExpression; +declare function optionalCallExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>, optional: boolean): OptionalCallExpression; +declare function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty; +declare function classAccessorProperty(key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassAccessorProperty; +declare function classPrivateProperty(key: PrivateName, value: Expression | null | undefined, decorators: Array<Decorator> | null | undefined, _static: any): ClassPrivateProperty; +declare function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean): ClassPrivateMethod; +declare function privateName(id: Identifier): PrivateName; +declare function staticBlock(body: Array<Statement>): StaticBlock; +declare function anyTypeAnnotation(): AnyTypeAnnotation; +declare function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation; +declare function booleanTypeAnnotation(): BooleanTypeAnnotation; +declare function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation; +declare function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation; +declare function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements; +declare function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): DeclareClass; +declare function declareFunction(id: Identifier): DeclareFunction; +declare function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): DeclareInterface; +declare function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule; +declare function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports; +declare function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; +declare function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; +declare function declareVariable(id: Identifier): DeclareVariable; +declare function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null): DeclareExportDeclaration; +declare function declareExportAllDeclaration(source: StringLiteral): DeclareExportAllDeclaration; +declare function declaredPredicate(value: Flow): DeclaredPredicate; +declare function existsTypeAnnotation(): ExistsTypeAnnotation; +declare function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; +declare function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType): FunctionTypeParam; +declare function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation; +declare function inferredPredicate(): InferredPredicate; +declare function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends; +declare function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceDeclaration; +declare function interfaceTypeAnnotation(_extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation; +declare function intersectionTypeAnnotation(types: Array<FlowType>): IntersectionTypeAnnotation; +declare function mixedTypeAnnotation(): MixedTypeAnnotation; +declare function emptyTypeAnnotation(): EmptyTypeAnnotation; +declare function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation; +declare function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation; +declare function numberTypeAnnotation(): NumberTypeAnnotation; +declare function objectTypeAnnotation(properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>, indexers?: Array<ObjectTypeIndexer> | null, callProperties?: Array<ObjectTypeCallProperty> | null, internalSlots?: Array<ObjectTypeInternalSlot> | null, exact?: boolean): ObjectTypeAnnotation; +declare function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot; +declare function objectTypeCallProperty(value: FlowType): ObjectTypeCallProperty; +declare function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null): ObjectTypeIndexer; +declare function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null): ObjectTypeProperty; +declare function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty; +declare function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType; +declare function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier; +declare function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation; +declare function stringTypeAnnotation(): StringTypeAnnotation; +declare function symbolTypeAnnotation(): SymbolTypeAnnotation; +declare function thisTypeAnnotation(): ThisTypeAnnotation; +declare function tupleTypeAnnotation(types: Array<FlowType>): TupleTypeAnnotation; +declare function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation; +declare function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias; +declare function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation; +declare function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression; +declare function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null): TypeParameter; +declare function typeParameterDeclaration(params: Array<TypeParameter>): TypeParameterDeclaration; +declare function typeParameterInstantiation(params: Array<FlowType>): TypeParameterInstantiation; +declare function unionTypeAnnotation(types: Array<FlowType>): UnionTypeAnnotation; +declare function variance(kind: "minus" | "plus"): Variance; +declare function voidTypeAnnotation(): VoidTypeAnnotation; +declare function enumDeclaration(id: Identifier, body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody): EnumDeclaration; +declare function enumBooleanBody(members: Array<EnumBooleanMember>): EnumBooleanBody; +declare function enumNumberBody(members: Array<EnumNumberMember>): EnumNumberBody; +declare function enumStringBody(members: Array<EnumStringMember | EnumDefaultedMember>): EnumStringBody; +declare function enumSymbolBody(members: Array<EnumDefaultedMember>): EnumSymbolBody; +declare function enumBooleanMember(id: Identifier): EnumBooleanMember; +declare function enumNumberMember(id: Identifier, init: NumericLiteral): EnumNumberMember; +declare function enumStringMember(id: Identifier, init: StringLiteral): EnumStringMember; +declare function enumDefaultedMember(id: Identifier): EnumDefaultedMember; +declare function indexedAccessType(objectType: FlowType, indexType: FlowType): IndexedAccessType; +declare function optionalIndexedAccessType(objectType: FlowType, indexType: FlowType): OptionalIndexedAccessType; +declare function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute; + +declare function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName): JSXClosingElement; + +declare function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>, selfClosing?: boolean | null): JSXElement; + +declare function jsxEmptyExpression(): JSXEmptyExpression; + +declare function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer; + +declare function jsxSpreadChild(expression: Expression): JSXSpreadChild; + +declare function jsxIdentifier(name: string): JSXIdentifier; + +declare function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression; + +declare function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName; + +declare function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName, attributes: Array<JSXAttribute | JSXSpreadAttribute>, selfClosing?: boolean): JSXOpeningElement; + +declare function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute; + +declare function jsxText(value: string): JSXText; + +declare function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>): JSXFragment; + +declare function jsxOpeningFragment(): JSXOpeningFragment; + +declare function jsxClosingFragment(): JSXClosingFragment; + +declare function noop(): Noop; +declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: Identifier): Placeholder; +declare function v8IntrinsicIdentifier(name: string): V8IntrinsicIdentifier; +declare function argumentPlaceholder(): ArgumentPlaceholder; +declare function bindExpression(object: Expression, callee: Expression): BindExpression; +declare function importAttribute(key: Identifier | StringLiteral, value: StringLiteral): ImportAttribute; +declare function decorator(expression: Expression): Decorator; +declare function doExpression(body: BlockStatement, async?: boolean): DoExpression; +declare function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier; +declare function recordExpression(properties: Array<ObjectProperty | SpreadElement>): RecordExpression; +declare function tupleExpression(elements?: Array<Expression | SpreadElement>): TupleExpression; +declare function decimalLiteral(value: string): DecimalLiteral; +declare function moduleExpression(body: Program): ModuleExpression; +declare function topicReference(): TopicReference; +declare function pipelineTopicExpression(expression: Expression): PipelineTopicExpression; +declare function pipelineBareFunction(callee: Expression): PipelineBareFunction; +declare function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference; +declare function tsParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty; + +declare function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareFunction; + +declare function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod; + +declare function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName; + +declare function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration; + +declare function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration; + +declare function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null): TSPropertySignature; + +declare function tsMethodSignature(key: Expression, typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSMethodSignature; + +declare function tsIndexSignature(parameters: Array<Identifier>, typeAnnotation?: TSTypeAnnotation | null): TSIndexSignature; + +declare function tsAnyKeyword(): TSAnyKeyword; + +declare function tsBooleanKeyword(): TSBooleanKeyword; + +declare function tsBigIntKeyword(): TSBigIntKeyword; + +declare function tsIntrinsicKeyword(): TSIntrinsicKeyword; + +declare function tsNeverKeyword(): TSNeverKeyword; + +declare function tsNullKeyword(): TSNullKeyword; + +declare function tsNumberKeyword(): TSNumberKeyword; + +declare function tsObjectKeyword(): TSObjectKeyword; + +declare function tsStringKeyword(): TSStringKeyword; + +declare function tsSymbolKeyword(): TSSymbolKeyword; + +declare function tsUndefinedKeyword(): TSUndefinedKeyword; + +declare function tsUnknownKeyword(): TSUnknownKeyword; + +declare function tsVoidKeyword(): TSVoidKeyword; + +declare function tsThisType(): TSThisType; + +declare function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSFunctionType; + +declare function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType; + +declare function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference; + +declare function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation?: TSTypeAnnotation | null, asserts?: boolean | null): TSTypePredicate; + +declare function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery; + +declare function tsTypeLiteral(members: Array<TSTypeElement>): TSTypeLiteral; + +declare function tsArrayType(elementType: TSType): TSArrayType; + +declare function tsTupleType(elementTypes: Array<TSType | TSNamedTupleMember>): TSTupleType; + +declare function tsOptionalType(typeAnnotation: TSType): TSOptionalType; + +declare function tsRestType(typeAnnotation: TSType): TSRestType; + +declare function tsNamedTupleMember(label: Identifier, elementType: TSType, optional?: boolean): TSNamedTupleMember; + +declare function tsUnionType(types: Array<TSType>): TSUnionType; + +declare function tsIntersectionType(types: Array<TSType>): TSIntersectionType; + +declare function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType; + +declare function tsInferType(typeParameter: TSTypeParameter): TSInferType; + +declare function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType; + +declare function tsTypeOperator(typeAnnotation: TSType): TSTypeOperator; + +declare function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType; + +declare function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, nameType?: TSType | null): TSMappedType; + +declare function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression): TSLiteralType; + +declare function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments; + +declare function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array<TSExpressionWithTypeArguments> | null | undefined, body: TSInterfaceBody): TSInterfaceDeclaration; + +declare function tsInterfaceBody(body: Array<TSTypeElement>): TSInterfaceBody; + +declare function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType): TSTypeAliasDeclaration; + +declare function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression; + +declare function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion; + +declare function tsEnumDeclaration(id: Identifier, members: Array<TSEnumMember>): TSEnumDeclaration; + +declare function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember; + +declare function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration): TSModuleDeclaration; + +declare function tsModuleBlock(body: Array<Statement>): TSModuleBlock; + +declare function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType; + +declare function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference): TSImportEqualsDeclaration; + +declare function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference; + +declare function tsNonNullExpression(expression: Expression): TSNonNullExpression; + +declare function tsExportAssignment(expression: Expression): TSExportAssignment; + +declare function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration; + +declare function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation; + +declare function tsTypeParameterInstantiation(params: Array<TSType>): TSTypeParameterInstantiation; + +declare function tsTypeParameterDeclaration(params: Array<TSTypeParameter>): TSTypeParameterDeclaration; + +declare function tsTypeParameter(constraint: TSType | null | undefined, _default: TSType | null | undefined, name: string): TSTypeParameter; + +/** @deprecated */ +declare function NumberLiteral(value: number): NumberLiteral$1; + +/** @deprecated */ +declare function RegexLiteral(pattern: string, flags?: string): RegexLiteral$1; + +/** @deprecated */ +declare function RestProperty(argument: LVal): RestProperty$1; + +/** @deprecated */ +declare function SpreadProperty(argument: Expression): SpreadProperty$1; + +/** + * Create a clone of a `node` including only properties belonging to the node. + * If the second parameter is `false`, cloneNode performs a shallow clone. + * If the third parameter is true, the cloned nodes exclude location properties. + */ +declare function cloneNode<T extends Node>(node: T, deep?: boolean, withoutLoc?: boolean): T; + +/** + * Create a shallow clone of a `node`, including only + * properties belonging to the node. + * @deprecated Use t.cloneNode instead. + */ +declare function clone<T extends Node>(node: T): T; + +/** + * Create a deep clone of a `node` and all of it's child nodes + * including only properties belonging to the node. + * @deprecated Use t.cloneNode instead. + */ +declare function cloneDeep<T extends Node>(node: T): T; + +/** + * Create a deep clone of a `node` and all of it's child nodes + * including only properties belonging to the node. + * excluding `_private` and location properties. + */ +declare function cloneDeepWithoutLoc<T extends Node>(node: T): T; + +/** + * Create a shallow clone of a `node` excluding `_private` and location properties. + */ +declare function cloneWithoutLoc<T extends Node>(node: T): T; + +/** + * Add comment of certain type to a node. + */ +declare function addComment<T extends Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T; + +/** + * Add comments of certain type to a node. + */ +declare function addComments<T extends Node>(node: T, type: CommentTypeShorthand, comments: ReadonlyArray<Comment>): T; + +declare function inheritInnerComments(child: Node, parent: Node): void; + +declare function inheritLeadingComments(child: Node, parent: Node): void; + +/** + * Inherit all unique comments from `parent` node to `child` node. + */ +declare function inheritsComments<T extends Node>(child: T, parent: Node): T; + +declare function inheritTrailingComments(child: Node, parent: Node): void; + +/** + * Remove comment properties from a node. + */ +declare function removeComments<T extends Node>(node: T): T; + +declare const STANDARDIZED_TYPES: string[]; +declare const EXPRESSION_TYPES: string[]; +declare const BINARY_TYPES: string[]; +declare const SCOPABLE_TYPES: string[]; +declare const BLOCKPARENT_TYPES: string[]; +declare const BLOCK_TYPES: string[]; +declare const STATEMENT_TYPES: string[]; +declare const TERMINATORLESS_TYPES: string[]; +declare const COMPLETIONSTATEMENT_TYPES: string[]; +declare const CONDITIONAL_TYPES: string[]; +declare const LOOP_TYPES: string[]; +declare const WHILE_TYPES: string[]; +declare const EXPRESSIONWRAPPER_TYPES: string[]; +declare const FOR_TYPES: string[]; +declare const FORXSTATEMENT_TYPES: string[]; +declare const FUNCTION_TYPES: string[]; +declare const FUNCTIONPARENT_TYPES: string[]; +declare const PUREISH_TYPES: string[]; +declare const DECLARATION_TYPES: string[]; +declare const PATTERNLIKE_TYPES: string[]; +declare const LVAL_TYPES: string[]; +declare const TSENTITYNAME_TYPES: string[]; +declare const LITERAL_TYPES: string[]; +declare const IMMUTABLE_TYPES: string[]; +declare const USERWHITESPACABLE_TYPES: string[]; +declare const METHOD_TYPES: string[]; +declare const OBJECTMEMBER_TYPES: string[]; +declare const PROPERTY_TYPES: string[]; +declare const UNARYLIKE_TYPES: string[]; +declare const PATTERN_TYPES: string[]; +declare const CLASS_TYPES: string[]; +declare const MODULEDECLARATION_TYPES: string[]; +declare const EXPORTDECLARATION_TYPES: string[]; +declare const MODULESPECIFIER_TYPES: string[]; +declare const ACCESSOR_TYPES: string[]; +declare const PRIVATE_TYPES: string[]; +declare const FLOW_TYPES: string[]; +declare const FLOWTYPE_TYPES: string[]; +declare const FLOWBASEANNOTATION_TYPES: string[]; +declare const FLOWDECLARATION_TYPES: string[]; +declare const FLOWPREDICATE_TYPES: string[]; +declare const ENUMBODY_TYPES: string[]; +declare const ENUMMEMBER_TYPES: string[]; +declare const JSX_TYPES: string[]; +declare const MISCELLANEOUS_TYPES: string[]; +declare const TYPESCRIPT_TYPES: string[]; +declare const TSTYPEELEMENT_TYPES: string[]; +declare const TSTYPE_TYPES: string[]; +declare const TSBASETYPE_TYPES: string[]; + +declare const STATEMENT_OR_BLOCK_KEYS: string[]; +declare const FLATTENABLE_KEYS: string[]; +declare const FOR_INIT_KEYS: string[]; +declare const COMMENT_KEYS: string[]; +declare const LOGICAL_OPERATORS: string[]; +declare const UPDATE_OPERATORS: string[]; +declare const BOOLEAN_NUMBER_BINARY_OPERATORS: string[]; +declare const EQUALITY_BINARY_OPERATORS: string[]; +declare const COMPARISON_BINARY_OPERATORS: string[]; +declare const BOOLEAN_BINARY_OPERATORS: string[]; +declare const NUMBER_BINARY_OPERATORS: string[]; +declare const BINARY_OPERATORS: string[]; +declare const ASSIGNMENT_OPERATORS: string[]; +declare const BOOLEAN_UNARY_OPERATORS: string[]; +declare const NUMBER_UNARY_OPERATORS: string[]; +declare const STRING_UNARY_OPERATORS: string[]; +declare const UNARY_OPERATORS: string[]; +declare const INHERIT_KEYS: { + optional: string[]; + force: string[]; +}; +declare const BLOCK_SCOPED_SYMBOL: unique symbol; +declare const NOT_LOCAL_BINDING: unique symbol; + +/** + * Ensure the `key` (defaults to "body") of a `node` is a block. + * Casting it to a block if it is not. + * + * Returns the BlockStatement + */ +declare function ensureBlock(node: Node, key?: string): BlockStatement; + +declare function toBindingIdentifierName(name: string): string; + +declare function toBlock(node: Statement | Expression, parent?: Node): BlockStatement; + +declare function toComputedKey(node: ObjectMember | ObjectProperty | ClassMethod | ClassProperty | ClassAccessorProperty | MemberExpression | OptionalMemberExpression, key?: Expression): Expression; + +declare const _default$3: { + (node: Function): FunctionExpression; + (node: Class): ClassExpression; + (node: ExpressionStatement | Expression | Class | Function): Expression; +}; +//# sourceMappingURL=toExpression.d.ts.map + +declare function toIdentifier(input: string): string; + +declare function toKeyAlias(node: Method | Property, key?: Node): string; +declare namespace toKeyAlias { + var uid: number; + var increment: () => number; +} +//# sourceMappingURL=toKeyAlias.d.ts.map + +declare type Scope = { + push(value: { + id: LVal; + kind: "var"; + init?: Expression; + }): void; + buildUndefinedNode(): Node; +}; + +/** + * Turn an array of statement `nodes` into a `SequenceExpression`. + * + * Variable declarations are turned into simple assignments and their + * declarations hoisted to the top of the current scope. + * + * Expression statements are just resolved to their expression. + */ +declare function toSequenceExpression(nodes: ReadonlyArray<Node>, scope: Scope): SequenceExpression | undefined; + +declare const _default$2: { + (node: AssignmentExpression, ignore?: boolean): ExpressionStatement; + <T extends Statement>(node: T, ignore: false): T; + <T_1 extends Statement>(node: T_1, ignore?: boolean): false | T_1; + (node: Class, ignore: false): ClassDeclaration; + (node: Class, ignore?: boolean): ClassDeclaration | false; + (node: Function, ignore: false): FunctionDeclaration; + (node: Function, ignore?: boolean): FunctionDeclaration | false; + (node: Node, ignore: false): Statement; + (node: Node, ignore?: boolean): Statement | false; +}; +//# sourceMappingURL=toStatement.d.ts.map + +declare const _default$1: { + (value: undefined): Identifier; + (value: boolean): BooleanLiteral; + (value: null): NullLiteral; + (value: string): StringLiteral; + (value: number): NumericLiteral | BinaryExpression | UnaryExpression; + (value: RegExp): RegExpLiteral; + (value: ReadonlyArray<unknown>): ArrayExpression; + (value: object): ObjectExpression; + (value: unknown): Expression; +}; +//# sourceMappingURL=valueToNode.d.ts.map + +declare const VISITOR_KEYS: Record<string, string[]>; +declare const ALIAS_KEYS: Record<string, string[]>; +declare const FLIPPED_ALIAS_KEYS: Record<string, string[]>; +declare const NODE_FIELDS: Record<string, {}>; +declare const BUILDER_KEYS: Record<string, string[]>; +declare const DEPRECATED_KEYS: Record<string, string>; +declare const NODE_PARENT_VALIDATIONS: {}; + +declare const PLACEHOLDERS: string[]; +declare const PLACEHOLDERS_ALIAS: Record<string, string[]>; +declare const PLACEHOLDERS_FLIPPED_ALIAS: Record<string, string[]>; + +declare const TYPES: Array<string>; +//# sourceMappingURL=index.d.ts.map + +/** + * Append a node to a member expression. + */ +declare function appendToMemberExpression(member: MemberExpression, append: MemberExpression["property"], computed?: boolean): MemberExpression; + +/** + * Inherit all contextual properties from `parent` node to `child` node. + */ +declare function inherits<T extends Node | null | undefined>(child: T, parent: Node | null | undefined): T; + +/** + * Prepend a node to a member expression. + */ +declare function prependToMemberExpression<T extends Pick<MemberExpression, "object" | "property">>(member: T, prepend: MemberExpression["object"]): T; + +/** + * Remove all of the _* properties from a node along with the additional metadata + * properties like location data and raw token data. + */ +declare function removeProperties(node: Node, opts?: { + preserveComments?: boolean; +}): void; + +declare function removePropertiesDeep<T extends Node>(tree: T, opts?: { + preserveComments: boolean; +} | null): T; + +/** + * Dedupe type annotations. + */ +declare function removeTypeDuplicates(nodes: ReadonlyArray<FlowType | false | null | undefined>): FlowType[]; + +declare function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record<string, Array<Identifier>>; +declare function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record<string, Identifier>; +declare function getBindingIdentifiers(node: Node, duplicates?: boolean, outerOnly?: boolean): Record<string, Identifier> | Record<string, Array<Identifier>>; +declare namespace getBindingIdentifiers { + var keys: { + DeclareClass: string[]; + DeclareFunction: string[]; + DeclareModule: string[]; + DeclareVariable: string[]; + DeclareInterface: string[]; + DeclareTypeAlias: string[]; + DeclareOpaqueType: string[]; + InterfaceDeclaration: string[]; + TypeAlias: string[]; + OpaqueType: string[]; + CatchClause: string[]; + LabeledStatement: string[]; + UnaryExpression: string[]; + AssignmentExpression: string[]; + ImportSpecifier: string[]; + ImportNamespaceSpecifier: string[]; + ImportDefaultSpecifier: string[]; + ImportDeclaration: string[]; + ExportSpecifier: string[]; + ExportNamespaceSpecifier: string[]; + ExportDefaultSpecifier: string[]; + FunctionDeclaration: string[]; + FunctionExpression: string[]; + ArrowFunctionExpression: string[]; + ObjectMethod: string[]; + ClassMethod: string[]; + ClassPrivateMethod: string[]; + ForInStatement: string[]; + ForOfStatement: string[]; + ClassDeclaration: string[]; + ClassExpression: string[]; + RestElement: string[]; + UpdateExpression: string[]; + ObjectProperty: string[]; + AssignmentPattern: string[]; + ArrayPattern: string[]; + ObjectPattern: string[]; + VariableDeclaration: string[]; + VariableDeclarator: string[]; + }; +} +//# sourceMappingURL=getBindingIdentifiers.d.ts.map + +declare const _default: { + (node: Node, duplicates: true): Record<string, Array<Identifier>>; + (node: Node, duplicates?: false): Record<string, Identifier>; + (node: Node, duplicates?: boolean): Record<string, Identifier> | Record<string, Array<Identifier>>; +}; +//# sourceMappingURL=getOuterBindingIdentifiers.d.ts.map + +declare type TraversalAncestors = Array<{ + node: Node; + key: string; + index?: number; +}>; +declare type TraversalHandler<T> = (this: undefined, node: Node, parent: TraversalAncestors, state: T) => void; +declare type TraversalHandlers<T> = { + enter?: TraversalHandler<T>; + exit?: TraversalHandler<T>; +}; +/** + * A general AST traversal with both prefix and postfix handlers, and a + * state object. Exposes ancestry data to each handler so that more complex + * AST data can be taken into account. + */ +declare function traverse<T>(node: Node, handlers: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void; + +/** + * A prefix AST traversal implementation meant for simple searching + * and processing. + */ +declare function traverseFast(node: Node | null | undefined, enter: (node: Node, opts?: any) => void, opts?: any): void; + +declare function shallowEqual<T extends object>(actual: object, expected: T): actual is T; + +declare function is<T extends Node["type"]>(type: T, node: Node | null | undefined, opts?: undefined): node is Extract<Node, { + type: T; +}>; +declare function is<T extends Node["type"], P extends Extract<Node, { + type: T; +}>>(type: T, n: Node | null | undefined, required: Partial<P>): n is P; +declare function is<P extends Node>(type: string, node: Node | null | undefined, opts: Partial<P>): node is P; +declare function is(type: string, node: Node | null | undefined, opts?: Partial<Node>): node is Node; + +/** + * Check if the input `node` is a binding identifier. + */ +declare function isBinding(node: Node, parent: Node, grandparent?: Node): boolean; + +/** + * Check if the input `node` is block scoped. + */ +declare function isBlockScoped(node: Node): boolean; + +/** + * Check if the input `node` is definitely immutable. + */ +declare function isImmutable(node: Node): boolean; + +/** + * Check if the input `node` is a `let` variable declaration. + */ +declare function isLet(node: Node): boolean; + +declare function isNode(node: any): node is Node; + +/** + * Check if two nodes are equivalent + */ +declare function isNodesEquivalent<T extends Partial<Node>>(a: T, b: any): b is T; + +/** + * Test if a `placeholderType` is a `targetType` or if `targetType` is an alias of `placeholderType`. + */ +declare function isPlaceholderType(placeholderType: string, targetType: string): boolean; + +/** + * Check if the input `node` is a reference to a bound variable. + */ +declare function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean; + +/** + * Check if the input `node` is a scope. + */ +declare function isScope(node: Node, parent: Node): boolean; + +/** + * Check if the input `specifier` is a `default` import or export. + */ +declare function isSpecifierDefault(specifier: ModuleSpecifier): boolean; + +declare function isType<T extends Node["type"]>(nodeType: string, targetType: T): nodeType is T; +declare function isType(nodeType: string | null | undefined, targetType: string): boolean; + +/** + * Check if the input `name` is a valid identifier name according to the ES3 specification. + * + * Additional ES3 reserved words are + */ +declare function isValidES3Identifier(name: string): boolean; + +/** + * Check if the input `name` is a valid identifier name + * and isn't a reserved word. + */ +declare function isValidIdentifier(name: string, reserved?: boolean): boolean; + +/** + * Check if the input `node` is a variable declaration. + */ +declare function isVar(node: Node): boolean; + +/** + * Determines whether or not the input node `member` matches the + * input `match`. + * + * For example, given the match `React.createClass` it would match the + * parsed nodes of `React.createClass` and `React["createClass"]`. + */ +declare function matchesPattern(member: Node | null | undefined, match: string | string[], allowPartial?: boolean): boolean; + +declare function validate(node: Node | undefined | null, key: string, val: any): void; + +/** + * Build a function that when called will return whether or not the + * input `node` `MemberExpression` matches the input `match`. + * + * For example, given the match `React.createClass` it would match the + * parsed nodes of `React.createClass` and `React["createClass"]`. + */ +declare function buildMatchMemberExpression(match: string, allowPartial?: boolean): (member: Node) => boolean; + +declare function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression; +declare function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression; +declare function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression; +declare function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective; +declare function isDirective(node: object | null | undefined, opts?: object | null): node is Directive; +declare function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral; +declare function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement; +declare function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement; +declare function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression; +declare function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause; +declare function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression; +declare function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement; +declare function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement; +declare function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement; +declare function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement; +declare function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement; +declare function isFile(node: object | null | undefined, opts?: object | null): node is File; +declare function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement; +declare function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement; +declare function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration; +declare function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression; +declare function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier; +declare function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement; +declare function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement; +declare function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral; +declare function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral; +declare function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral; +declare function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral; +declare function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral; +declare function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression; +declare function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression; +declare function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression; +declare function isProgram(node: object | null | undefined, opts?: object | null): node is Program; +declare function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression; +declare function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod; +declare function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty; +declare function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement; +declare function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement; +declare function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression; +declare function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression; +declare function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase; +declare function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement; +declare function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression; +declare function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement; +declare function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement; +declare function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression; +declare function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression; +declare function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration; +declare function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator; +declare function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement; +declare function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement; +declare function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern; +declare function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern; +declare function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression; +declare function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody; +declare function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression; +declare function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration; +declare function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration; +declare function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration; +declare function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration; +declare function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier; +declare function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement; +declare function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration; +declare function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier; +declare function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier; +declare function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier; +declare function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty; +declare function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod; +declare function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern; +declare function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement; +declare function isSuper(node: object | null | undefined, opts?: object | null): node is Super; +declare function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression; +declare function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement; +declare function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral; +declare function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression; +declare function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression; +declare function isImport(node: object | null | undefined, opts?: object | null): node is Import; +declare function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral; +declare function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier; +declare function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression; +declare function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression; +declare function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty; +declare function isClassAccessorProperty(node: object | null | undefined, opts?: object | null): node is ClassAccessorProperty; +declare function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty; +declare function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod; +declare function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName; +declare function isStaticBlock(node: object | null | undefined, opts?: object | null): node is StaticBlock; +declare function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation; +declare function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation; +declare function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation; +declare function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation; +declare function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation; +declare function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements; +declare function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass; +declare function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction; +declare function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface; +declare function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule; +declare function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports; +declare function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias; +declare function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType; +declare function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable; +declare function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration; +declare function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration; +declare function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate; +declare function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation; +declare function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation; +declare function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam; +declare function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation; +declare function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate; +declare function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends; +declare function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration; +declare function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation; +declare function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation; +declare function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation; +declare function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation; +declare function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation; +declare function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation; +declare function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation; +declare function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation; +declare function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot; +declare function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty; +declare function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer; +declare function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty; +declare function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty; +declare function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType; +declare function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier; +declare function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation; +declare function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation; +declare function isSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): node is SymbolTypeAnnotation; +declare function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation; +declare function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation; +declare function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation; +declare function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias; +declare function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation; +declare function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression; +declare function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter; +declare function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration; +declare function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation; +declare function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation; +declare function isVariance(node: object | null | undefined, opts?: object | null): node is Variance; +declare function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation; +declare function isEnumDeclaration(node: object | null | undefined, opts?: object | null): node is EnumDeclaration; +declare function isEnumBooleanBody(node: object | null | undefined, opts?: object | null): node is EnumBooleanBody; +declare function isEnumNumberBody(node: object | null | undefined, opts?: object | null): node is EnumNumberBody; +declare function isEnumStringBody(node: object | null | undefined, opts?: object | null): node is EnumStringBody; +declare function isEnumSymbolBody(node: object | null | undefined, opts?: object | null): node is EnumSymbolBody; +declare function isEnumBooleanMember(node: object | null | undefined, opts?: object | null): node is EnumBooleanMember; +declare function isEnumNumberMember(node: object | null | undefined, opts?: object | null): node is EnumNumberMember; +declare function isEnumStringMember(node: object | null | undefined, opts?: object | null): node is EnumStringMember; +declare function isEnumDefaultedMember(node: object | null | undefined, opts?: object | null): node is EnumDefaultedMember; +declare function isIndexedAccessType(node: object | null | undefined, opts?: object | null): node is IndexedAccessType; +declare function isOptionalIndexedAccessType(node: object | null | undefined, opts?: object | null): node is OptionalIndexedAccessType; +declare function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute; +declare function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement; +declare function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement; +declare function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression; +declare function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer; +declare function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild; +declare function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier; +declare function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression; +declare function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName; +declare function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement; +declare function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute; +declare function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText; +declare function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment; +declare function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment; +declare function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment; +declare function isNoop(node: object | null | undefined, opts?: object | null): node is Noop; +declare function isPlaceholder(node: object | null | undefined, opts?: object | null): node is Placeholder; +declare function isV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): node is V8IntrinsicIdentifier; +declare function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder; +declare function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression; +declare function isImportAttribute(node: object | null | undefined, opts?: object | null): node is ImportAttribute; +declare function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator; +declare function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression; +declare function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier; +declare function isRecordExpression(node: object | null | undefined, opts?: object | null): node is RecordExpression; +declare function isTupleExpression(node: object | null | undefined, opts?: object | null): node is TupleExpression; +declare function isDecimalLiteral(node: object | null | undefined, opts?: object | null): node is DecimalLiteral; +declare function isModuleExpression(node: object | null | undefined, opts?: object | null): node is ModuleExpression; +declare function isTopicReference(node: object | null | undefined, opts?: object | null): node is TopicReference; +declare function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression; +declare function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction; +declare function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference; +declare function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty; +declare function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction; +declare function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod; +declare function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName; +declare function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration; +declare function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration; +declare function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature; +declare function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature; +declare function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature; +declare function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword; +declare function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword; +declare function isTSBigIntKeyword(node: object | null | undefined, opts?: object | null): node is TSBigIntKeyword; +declare function isTSIntrinsicKeyword(node: object | null | undefined, opts?: object | null): node is TSIntrinsicKeyword; +declare function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword; +declare function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword; +declare function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword; +declare function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword; +declare function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword; +declare function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword; +declare function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword; +declare function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword; +declare function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword; +declare function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType; +declare function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType; +declare function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType; +declare function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference; +declare function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate; +declare function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery; +declare function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral; +declare function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType; +declare function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType; +declare function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType; +declare function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType; +declare function isTSNamedTupleMember(node: object | null | undefined, opts?: object | null): node is TSNamedTupleMember; +declare function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType; +declare function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType; +declare function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType; +declare function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType; +declare function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType; +declare function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator; +declare function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType; +declare function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType; +declare function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType; +declare function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments; +declare function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration; +declare function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody; +declare function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration; +declare function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression; +declare function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion; +declare function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration; +declare function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember; +declare function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration; +declare function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock; +declare function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType; +declare function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration; +declare function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference; +declare function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression; +declare function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment; +declare function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration; +declare function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation; +declare function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation; +declare function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration; +declare function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter; +declare function isStandardized(node: object | null | undefined, opts?: object | null): node is Standardized; +declare function isExpression(node: object | null | undefined, opts?: object | null): node is Expression; +declare function isBinary(node: object | null | undefined, opts?: object | null): node is Binary; +declare function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable; +declare function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent; +declare function isBlock(node: object | null | undefined, opts?: object | null): node is Block; +declare function isStatement(node: object | null | undefined, opts?: object | null): node is Statement; +declare function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless; +declare function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement; +declare function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional; +declare function isLoop(node: object | null | undefined, opts?: object | null): node is Loop; +declare function isWhile(node: object | null | undefined, opts?: object | null): node is While; +declare function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper; +declare function isFor(node: object | null | undefined, opts?: object | null): node is For; +declare function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement; +declare function isFunction(node: object | null | undefined, opts?: object | null): node is Function; +declare function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent; +declare function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish; +declare function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration; +declare function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike; +declare function isLVal(node: object | null | undefined, opts?: object | null): node is LVal; +declare function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName; +declare function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal; +declare function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable; +declare function isMethod(node: object | null | undefined, opts?: object | null): node is Method; +declare function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember; +declare function isProperty(node: object | null | undefined, opts?: object | null): node is Property; +declare function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike; +declare function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern; +declare function isClass(node: object | null | undefined, opts?: object | null): node is Class; +declare function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration; +declare function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration; +declare function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier; +declare function isAccessor(node: object | null | undefined, opts?: object | null): node is Accessor; +declare function isPrivate(node: object | null | undefined, opts?: object | null): node is Private; +declare function isFlow(node: object | null | undefined, opts?: object | null): node is Flow; +declare function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType; +declare function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation; +declare function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration; +declare function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate; +declare function isEnumBody(node: object | null | undefined, opts?: object | null): node is EnumBody; +declare function isEnumMember(node: object | null | undefined, opts?: object | null): node is EnumMember; +declare function isJSX(node: object | null | undefined, opts?: object | null): node is JSX; +declare function isMiscellaneous(node: object | null | undefined, opts?: object | null): node is Miscellaneous; +declare function isTypeScript(node: object | null | undefined, opts?: object | null): node is TypeScript; +declare function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement; +declare function isTSType(node: object | null | undefined, opts?: object | null): node is TSType; +declare function isTSBaseType(node: object | null | undefined, opts?: object | null): node is TSBaseType; +declare function isNumberLiteral(node: object | null | undefined, opts?: object | null): boolean; +declare function isRegexLiteral(node: object | null | undefined, opts?: object | null): boolean; +declare function isRestProperty(node: object | null | undefined, opts?: object | null): boolean; +declare function isSpreadProperty(node: object | null | undefined, opts?: object | null): boolean; + +declare const react: { + isReactComponent: (member: Node) => boolean; + isCompatTag: typeof isCompatTag; + buildChildren: typeof buildChildren; +}; + +export { ACCESSOR_TYPES, ALIAS_KEYS, ASSIGNMENT_OPERATORS, Accessor, Aliases, AnyTypeAnnotation, ArgumentPlaceholder, ArrayExpression, ArrayPattern, ArrayTypeAnnotation, ArrowFunctionExpression, AssignmentExpression, AssignmentPattern, AwaitExpression, BINARY_OPERATORS, BINARY_TYPES, BLOCKPARENT_TYPES, BLOCK_SCOPED_SYMBOL, BLOCK_TYPES, BOOLEAN_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS, BOOLEAN_UNARY_OPERATORS, BUILDER_KEYS, BigIntLiteral, Binary, BinaryExpression, BindExpression, Block, BlockParent, BlockStatement, BooleanLiteral, BooleanLiteralTypeAnnotation, BooleanTypeAnnotation, BreakStatement, CLASS_TYPES, COMMENT_KEYS, COMPARISON_BINARY_OPERATORS, COMPLETIONSTATEMENT_TYPES, CONDITIONAL_TYPES, CallExpression, CatchClause, Class, ClassAccessorProperty, ClassBody, ClassDeclaration, ClassExpression, ClassImplements, ClassMethod, ClassPrivateMethod, ClassPrivateProperty, ClassProperty, Comment, CommentBlock, CommentLine, CommentTypeShorthand, CompletionStatement, Conditional, ConditionalExpression, ContinueStatement, DECLARATION_TYPES, DEPRECATED_KEYS, DebuggerStatement, DecimalLiteral, Declaration, DeclareClass, DeclareExportAllDeclaration, DeclareExportDeclaration, DeclareFunction, DeclareInterface, DeclareModule, DeclareModuleExports, DeclareOpaqueType, DeclareTypeAlias, DeclareVariable, DeclaredPredicate, Decorator, DeprecatedAliases, Directive, DirectiveLiteral, DoExpression, DoWhileStatement, ENUMBODY_TYPES, ENUMMEMBER_TYPES, EQUALITY_BINARY_OPERATORS, EXPORTDECLARATION_TYPES, EXPRESSIONWRAPPER_TYPES, EXPRESSION_TYPES, EmptyStatement, EmptyTypeAnnotation, EnumBody, EnumBooleanBody, EnumBooleanMember, EnumDeclaration, EnumDefaultedMember, EnumMember, EnumNumberBody, EnumNumberMember, EnumStringBody, EnumStringMember, EnumSymbolBody, ExistsTypeAnnotation, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportDefaultSpecifier, ExportNamedDeclaration, ExportNamespaceSpecifier, ExportSpecifier, Expression, ExpressionStatement, ExpressionWrapper, FLATTENABLE_KEYS, FLIPPED_ALIAS_KEYS, FLOWBASEANNOTATION_TYPES, FLOWDECLARATION_TYPES, FLOWPREDICATE_TYPES, FLOWTYPE_TYPES, FLOW_TYPES, FORXSTATEMENT_TYPES, FOR_INIT_KEYS, FOR_TYPES, FUNCTIONPARENT_TYPES, FUNCTION_TYPES, File, Flow, FlowBaseAnnotation, FlowDeclaration, FlowPredicate, FlowType, For, ForInStatement, ForOfStatement, ForStatement, ForXStatement, Function, FunctionDeclaration, FunctionExpression, FunctionParent, FunctionTypeAnnotation, FunctionTypeParam, GenericTypeAnnotation, IMMUTABLE_TYPES, INHERIT_KEYS, Identifier, IfStatement, Immutable, Import, ImportAttribute, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, IndexedAccessType, InferredPredicate, InterfaceDeclaration, InterfaceExtends, InterfaceTypeAnnotation, InterpreterDirective, IntersectionTypeAnnotation, JSX, JSXAttribute, JSXClosingElement, JSXClosingFragment, JSXElement, JSXEmptyExpression, JSXExpressionContainer, JSXFragment, JSXIdentifier, JSXMemberExpression, JSXNamespacedName, JSXOpeningElement, JSXOpeningFragment, JSXSpreadAttribute, JSXSpreadChild, JSXText, JSX_TYPES, LITERAL_TYPES, LOGICAL_OPERATORS, LOOP_TYPES, LVAL_TYPES, LVal, LabeledStatement, Literal, LogicalExpression, Loop, METHOD_TYPES, MISCELLANEOUS_TYPES, MODULEDECLARATION_TYPES, MODULESPECIFIER_TYPES, MemberExpression, MetaProperty, Method, Miscellaneous, MixedTypeAnnotation, ModuleDeclaration, ModuleExpression, ModuleSpecifier, NODE_FIELDS, NODE_PARENT_VALIDATIONS, NOT_LOCAL_BINDING, NUMBER_BINARY_OPERATORS, NUMBER_UNARY_OPERATORS, NewExpression, Node, Noop, NullLiteral, NullLiteralTypeAnnotation, NullableTypeAnnotation, NumberLiteral$1 as NumberLiteral, NumberLiteralTypeAnnotation, NumberTypeAnnotation, NumericLiteral, OBJECTMEMBER_TYPES, ObjectExpression, ObjectMember, ObjectMethod, ObjectPattern, ObjectProperty, ObjectTypeAnnotation, ObjectTypeCallProperty, ObjectTypeIndexer, ObjectTypeInternalSlot, ObjectTypeProperty, ObjectTypeSpreadProperty, OpaqueType, OptionalCallExpression, OptionalIndexedAccessType, OptionalMemberExpression, PATTERNLIKE_TYPES, PATTERN_TYPES, PLACEHOLDERS, PLACEHOLDERS_ALIAS, PLACEHOLDERS_FLIPPED_ALIAS, PRIVATE_TYPES, PROPERTY_TYPES, PUREISH_TYPES, ParenthesizedExpression, Pattern, PatternLike, PipelineBareFunction, PipelinePrimaryTopicReference, PipelineTopicExpression, Placeholder, Private, PrivateName, Program, Property, Pureish, QualifiedTypeIdentifier, RecordExpression, RegExpLiteral, RegexLiteral$1 as RegexLiteral, RestElement, RestProperty$1 as RestProperty, ReturnStatement, SCOPABLE_TYPES, STANDARDIZED_TYPES, STATEMENT_OR_BLOCK_KEYS, STATEMENT_TYPES, STRING_UNARY_OPERATORS, Scopable, SequenceExpression, SourceLocation, SpreadElement, SpreadProperty$1 as SpreadProperty, Standardized, Statement, StaticBlock, StringLiteral, StringLiteralTypeAnnotation, StringTypeAnnotation, Super, SwitchCase, SwitchStatement, SymbolTypeAnnotation, TERMINATORLESS_TYPES, TSAnyKeyword, TSArrayType, TSAsExpression, TSBASETYPE_TYPES, TSBaseType, TSBigIntKeyword, TSBooleanKeyword, TSCallSignatureDeclaration, TSConditionalType, TSConstructSignatureDeclaration, TSConstructorType, TSDeclareFunction, TSDeclareMethod, TSENTITYNAME_TYPES, TSEntityName, TSEnumDeclaration, TSEnumMember, TSExportAssignment, TSExpressionWithTypeArguments, TSExternalModuleReference, TSFunctionType, TSImportEqualsDeclaration, TSImportType, TSIndexSignature, TSIndexedAccessType, TSInferType, TSInterfaceBody, TSInterfaceDeclaration, TSIntersectionType, TSIntrinsicKeyword, TSLiteralType, TSMappedType, TSMethodSignature, TSModuleBlock, TSModuleDeclaration, TSNamedTupleMember, TSNamespaceExportDeclaration, TSNeverKeyword, TSNonNullExpression, TSNullKeyword, TSNumberKeyword, TSObjectKeyword, TSOptionalType, TSParameterProperty, TSParenthesizedType, TSPropertySignature, TSQualifiedName, TSRestType, TSStringKeyword, TSSymbolKeyword, TSTYPEELEMENT_TYPES, TSTYPE_TYPES, TSThisType, TSTupleType, TSType, TSTypeAliasDeclaration, TSTypeAnnotation, TSTypeAssertion, TSTypeElement, TSTypeLiteral, TSTypeOperator, TSTypeParameter, TSTypeParameterDeclaration, TSTypeParameterInstantiation, TSTypePredicate, TSTypeQuery, TSTypeReference, TSUndefinedKeyword, TSUnionType, TSUnknownKeyword, TSVoidKeyword, TYPES, TYPESCRIPT_TYPES, TaggedTemplateExpression, TemplateElement, TemplateLiteral, Terminatorless, ThisExpression, ThisTypeAnnotation, ThrowStatement, TopicReference, TraversalAncestors, TraversalHandler, TraversalHandlers, TryStatement, TupleExpression, TupleTypeAnnotation, TypeAlias, TypeAnnotation, TypeCastExpression, TypeParameter, TypeParameterDeclaration, TypeParameterInstantiation, TypeScript, TypeofTypeAnnotation, UNARYLIKE_TYPES, UNARY_OPERATORS, UPDATE_OPERATORS, USERWHITESPACABLE_TYPES, UnaryExpression, UnaryLike, UnionTypeAnnotation, UpdateExpression, UserWhitespacable, V8IntrinsicIdentifier, VISITOR_KEYS, VariableDeclaration, VariableDeclarator, Variance, VoidTypeAnnotation, WHILE_TYPES, While, WhileStatement, WithStatement, YieldExpression, addComment, addComments, anyTypeAnnotation, appendToMemberExpression, argumentPlaceholder, arrayExpression, arrayPattern, arrayTypeAnnotation, arrowFunctionExpression, assertAccessor, assertAnyTypeAnnotation, assertArgumentPlaceholder, assertArrayExpression, assertArrayPattern, assertArrayTypeAnnotation, assertArrowFunctionExpression, assertAssignmentExpression, assertAssignmentPattern, assertAwaitExpression, assertBigIntLiteral, assertBinary, assertBinaryExpression, assertBindExpression, assertBlock, assertBlockParent, assertBlockStatement, assertBooleanLiteral, assertBooleanLiteralTypeAnnotation, assertBooleanTypeAnnotation, assertBreakStatement, assertCallExpression, assertCatchClause, assertClass, assertClassAccessorProperty, assertClassBody, assertClassDeclaration, assertClassExpression, assertClassImplements, assertClassMethod, assertClassPrivateMethod, assertClassPrivateProperty, assertClassProperty, assertCompletionStatement, assertConditional, assertConditionalExpression, assertContinueStatement, assertDebuggerStatement, assertDecimalLiteral, assertDeclaration, assertDeclareClass, assertDeclareExportAllDeclaration, assertDeclareExportDeclaration, assertDeclareFunction, assertDeclareInterface, assertDeclareModule, assertDeclareModuleExports, assertDeclareOpaqueType, assertDeclareTypeAlias, assertDeclareVariable, assertDeclaredPredicate, assertDecorator, assertDirective, assertDirectiveLiteral, assertDoExpression, assertDoWhileStatement, assertEmptyStatement, assertEmptyTypeAnnotation, assertEnumBody, assertEnumBooleanBody, assertEnumBooleanMember, assertEnumDeclaration, assertEnumDefaultedMember, assertEnumMember, assertEnumNumberBody, assertEnumNumberMember, assertEnumStringBody, assertEnumStringMember, assertEnumSymbolBody, assertExistsTypeAnnotation, assertExportAllDeclaration, assertExportDeclaration, assertExportDefaultDeclaration, assertExportDefaultSpecifier, assertExportNamedDeclaration, assertExportNamespaceSpecifier, assertExportSpecifier, assertExpression, assertExpressionStatement, assertExpressionWrapper, assertFile, assertFlow, assertFlowBaseAnnotation, assertFlowDeclaration, assertFlowPredicate, assertFlowType, assertFor, assertForInStatement, assertForOfStatement, assertForStatement, assertForXStatement, assertFunction, assertFunctionDeclaration, assertFunctionExpression, assertFunctionParent, assertFunctionTypeAnnotation, assertFunctionTypeParam, assertGenericTypeAnnotation, assertIdentifier, assertIfStatement, assertImmutable, assertImport, assertImportAttribute, assertImportDeclaration, assertImportDefaultSpecifier, assertImportNamespaceSpecifier, assertImportSpecifier, assertIndexedAccessType, assertInferredPredicate, assertInterfaceDeclaration, assertInterfaceExtends, assertInterfaceTypeAnnotation, assertInterpreterDirective, assertIntersectionTypeAnnotation, assertJSX, assertJSXAttribute, assertJSXClosingElement, assertJSXClosingFragment, assertJSXElement, assertJSXEmptyExpression, assertJSXExpressionContainer, assertJSXFragment, assertJSXIdentifier, assertJSXMemberExpression, assertJSXNamespacedName, assertJSXOpeningElement, assertJSXOpeningFragment, assertJSXSpreadAttribute, assertJSXSpreadChild, assertJSXText, assertLVal, assertLabeledStatement, assertLiteral, assertLogicalExpression, assertLoop, assertMemberExpression, assertMetaProperty, assertMethod, assertMiscellaneous, assertMixedTypeAnnotation, assertModuleDeclaration, assertModuleExpression, assertModuleSpecifier, assertNewExpression, assertNode, assertNoop, assertNullLiteral, assertNullLiteralTypeAnnotation, assertNullableTypeAnnotation, assertNumberLiteral, assertNumberLiteralTypeAnnotation, assertNumberTypeAnnotation, assertNumericLiteral, assertObjectExpression, assertObjectMember, assertObjectMethod, assertObjectPattern, assertObjectProperty, assertObjectTypeAnnotation, assertObjectTypeCallProperty, assertObjectTypeIndexer, assertObjectTypeInternalSlot, assertObjectTypeProperty, assertObjectTypeSpreadProperty, assertOpaqueType, assertOptionalCallExpression, assertOptionalIndexedAccessType, assertOptionalMemberExpression, assertParenthesizedExpression, assertPattern, assertPatternLike, assertPipelineBareFunction, assertPipelinePrimaryTopicReference, assertPipelineTopicExpression, assertPlaceholder, assertPrivate, assertPrivateName, assertProgram, assertProperty, assertPureish, assertQualifiedTypeIdentifier, assertRecordExpression, assertRegExpLiteral, assertRegexLiteral, assertRestElement, assertRestProperty, assertReturnStatement, assertScopable, assertSequenceExpression, assertSpreadElement, assertSpreadProperty, assertStandardized, assertStatement, assertStaticBlock, assertStringLiteral, assertStringLiteralTypeAnnotation, assertStringTypeAnnotation, assertSuper, assertSwitchCase, assertSwitchStatement, assertSymbolTypeAnnotation, assertTSAnyKeyword, assertTSArrayType, assertTSAsExpression, assertTSBaseType, assertTSBigIntKeyword, assertTSBooleanKeyword, assertTSCallSignatureDeclaration, assertTSConditionalType, assertTSConstructSignatureDeclaration, assertTSConstructorType, assertTSDeclareFunction, assertTSDeclareMethod, assertTSEntityName, assertTSEnumDeclaration, assertTSEnumMember, assertTSExportAssignment, assertTSExpressionWithTypeArguments, assertTSExternalModuleReference, assertTSFunctionType, assertTSImportEqualsDeclaration, assertTSImportType, assertTSIndexSignature, assertTSIndexedAccessType, assertTSInferType, assertTSInterfaceBody, assertTSInterfaceDeclaration, assertTSIntersectionType, assertTSIntrinsicKeyword, assertTSLiteralType, assertTSMappedType, assertTSMethodSignature, assertTSModuleBlock, assertTSModuleDeclaration, assertTSNamedTupleMember, assertTSNamespaceExportDeclaration, assertTSNeverKeyword, assertTSNonNullExpression, assertTSNullKeyword, assertTSNumberKeyword, assertTSObjectKeyword, assertTSOptionalType, assertTSParameterProperty, assertTSParenthesizedType, assertTSPropertySignature, assertTSQualifiedName, assertTSRestType, assertTSStringKeyword, assertTSSymbolKeyword, assertTSThisType, assertTSTupleType, assertTSType, assertTSTypeAliasDeclaration, assertTSTypeAnnotation, assertTSTypeAssertion, assertTSTypeElement, assertTSTypeLiteral, assertTSTypeOperator, assertTSTypeParameter, assertTSTypeParameterDeclaration, assertTSTypeParameterInstantiation, assertTSTypePredicate, assertTSTypeQuery, assertTSTypeReference, assertTSUndefinedKeyword, assertTSUnionType, assertTSUnknownKeyword, assertTSVoidKeyword, assertTaggedTemplateExpression, assertTemplateElement, assertTemplateLiteral, assertTerminatorless, assertThisExpression, assertThisTypeAnnotation, assertThrowStatement, assertTopicReference, assertTryStatement, assertTupleExpression, assertTupleTypeAnnotation, assertTypeAlias, assertTypeAnnotation, assertTypeCastExpression, assertTypeParameter, assertTypeParameterDeclaration, assertTypeParameterInstantiation, assertTypeScript, assertTypeofTypeAnnotation, assertUnaryExpression, assertUnaryLike, assertUnionTypeAnnotation, assertUpdateExpression, assertUserWhitespacable, assertV8IntrinsicIdentifier, assertVariableDeclaration, assertVariableDeclarator, assertVariance, assertVoidTypeAnnotation, assertWhile, assertWhileStatement, assertWithStatement, assertYieldExpression, assignmentExpression, assignmentPattern, awaitExpression, bigIntLiteral, binaryExpression, bindExpression, blockStatement, booleanLiteral, booleanLiteralTypeAnnotation, booleanTypeAnnotation, breakStatement, buildMatchMemberExpression, callExpression, catchClause, classAccessorProperty, classBody, classDeclaration, classExpression, classImplements, classMethod, classPrivateMethod, classPrivateProperty, classProperty, clone, cloneDeep, cloneDeepWithoutLoc, cloneNode, cloneWithoutLoc, conditionalExpression, continueStatement, createFlowUnionType, createTSUnionType, _default$4 as createTypeAnnotationBasedOnTypeof, createFlowUnionType as createUnionTypeAnnotation, debuggerStatement, decimalLiteral, declareClass, declareExportAllDeclaration, declareExportDeclaration, declareFunction, declareInterface, declareModule, declareModuleExports, declareOpaqueType, declareTypeAlias, declareVariable, declaredPredicate, decorator, directive, directiveLiteral, doExpression, doWhileStatement, emptyStatement, emptyTypeAnnotation, ensureBlock, enumBooleanBody, enumBooleanMember, enumDeclaration, enumDefaultedMember, enumNumberBody, enumNumberMember, enumStringBody, enumStringMember, enumSymbolBody, existsTypeAnnotation, exportAllDeclaration, exportDefaultDeclaration, exportDefaultSpecifier, exportNamedDeclaration, exportNamespaceSpecifier, exportSpecifier, expressionStatement, file, forInStatement, forOfStatement, forStatement, functionDeclaration, functionExpression, functionTypeAnnotation, functionTypeParam, genericTypeAnnotation, getBindingIdentifiers, _default as getOuterBindingIdentifiers, identifier, ifStatement, _import as import, importAttribute, importDeclaration, importDefaultSpecifier, importNamespaceSpecifier, importSpecifier, indexedAccessType, inferredPredicate, inheritInnerComments, inheritLeadingComments, inheritTrailingComments, inherits, inheritsComments, interfaceDeclaration, interfaceExtends, interfaceTypeAnnotation, interpreterDirective, intersectionTypeAnnotation, is, isAccessor, isAnyTypeAnnotation, isArgumentPlaceholder, isArrayExpression, isArrayPattern, isArrayTypeAnnotation, isArrowFunctionExpression, isAssignmentExpression, isAssignmentPattern, isAwaitExpression, isBigIntLiteral, isBinary, isBinaryExpression, isBindExpression, isBinding, isBlock, isBlockParent, isBlockScoped, isBlockStatement, isBooleanLiteral, isBooleanLiteralTypeAnnotation, isBooleanTypeAnnotation, isBreakStatement, isCallExpression, isCatchClause, isClass, isClassAccessorProperty, isClassBody, isClassDeclaration, isClassExpression, isClassImplements, isClassMethod, isClassPrivateMethod, isClassPrivateProperty, isClassProperty, isCompletionStatement, isConditional, isConditionalExpression, isContinueStatement, isDebuggerStatement, isDecimalLiteral, isDeclaration, isDeclareClass, isDeclareExportAllDeclaration, isDeclareExportDeclaration, isDeclareFunction, isDeclareInterface, isDeclareModule, isDeclareModuleExports, isDeclareOpaqueType, isDeclareTypeAlias, isDeclareVariable, isDeclaredPredicate, isDecorator, isDirective, isDirectiveLiteral, isDoExpression, isDoWhileStatement, isEmptyStatement, isEmptyTypeAnnotation, isEnumBody, isEnumBooleanBody, isEnumBooleanMember, isEnumDeclaration, isEnumDefaultedMember, isEnumMember, isEnumNumberBody, isEnumNumberMember, isEnumStringBody, isEnumStringMember, isEnumSymbolBody, isExistsTypeAnnotation, isExportAllDeclaration, isExportDeclaration, isExportDefaultDeclaration, isExportDefaultSpecifier, isExportNamedDeclaration, isExportNamespaceSpecifier, isExportSpecifier, isExpression, isExpressionStatement, isExpressionWrapper, isFile, isFlow, isFlowBaseAnnotation, isFlowDeclaration, isFlowPredicate, isFlowType, isFor, isForInStatement, isForOfStatement, isForStatement, isForXStatement, isFunction, isFunctionDeclaration, isFunctionExpression, isFunctionParent, isFunctionTypeAnnotation, isFunctionTypeParam, isGenericTypeAnnotation, isIdentifier, isIfStatement, isImmutable, isImport, isImportAttribute, isImportDeclaration, isImportDefaultSpecifier, isImportNamespaceSpecifier, isImportSpecifier, isIndexedAccessType, isInferredPredicate, isInterfaceDeclaration, isInterfaceExtends, isInterfaceTypeAnnotation, isInterpreterDirective, isIntersectionTypeAnnotation, isJSX, isJSXAttribute, isJSXClosingElement, isJSXClosingFragment, isJSXElement, isJSXEmptyExpression, isJSXExpressionContainer, isJSXFragment, isJSXIdentifier, isJSXMemberExpression, isJSXNamespacedName, isJSXOpeningElement, isJSXOpeningFragment, isJSXSpreadAttribute, isJSXSpreadChild, isJSXText, isLVal, isLabeledStatement, isLet, isLiteral, isLogicalExpression, isLoop, isMemberExpression, isMetaProperty, isMethod, isMiscellaneous, isMixedTypeAnnotation, isModuleDeclaration, isModuleExpression, isModuleSpecifier, isNewExpression, isNode, isNodesEquivalent, isNoop, isNullLiteral, isNullLiteralTypeAnnotation, isNullableTypeAnnotation, isNumberLiteral, isNumberLiteralTypeAnnotation, isNumberTypeAnnotation, isNumericLiteral, isObjectExpression, isObjectMember, isObjectMethod, isObjectPattern, isObjectProperty, isObjectTypeAnnotation, isObjectTypeCallProperty, isObjectTypeIndexer, isObjectTypeInternalSlot, isObjectTypeProperty, isObjectTypeSpreadProperty, isOpaqueType, isOptionalCallExpression, isOptionalIndexedAccessType, isOptionalMemberExpression, isParenthesizedExpression, isPattern, isPatternLike, isPipelineBareFunction, isPipelinePrimaryTopicReference, isPipelineTopicExpression, isPlaceholder, isPlaceholderType, isPrivate, isPrivateName, isProgram, isProperty, isPureish, isQualifiedTypeIdentifier, isRecordExpression, isReferenced, isRegExpLiteral, isRegexLiteral, isRestElement, isRestProperty, isReturnStatement, isScopable, isScope, isSequenceExpression, isSpecifierDefault, isSpreadElement, isSpreadProperty, isStandardized, isStatement, isStaticBlock, isStringLiteral, isStringLiteralTypeAnnotation, isStringTypeAnnotation, isSuper, isSwitchCase, isSwitchStatement, isSymbolTypeAnnotation, isTSAnyKeyword, isTSArrayType, isTSAsExpression, isTSBaseType, isTSBigIntKeyword, isTSBooleanKeyword, isTSCallSignatureDeclaration, isTSConditionalType, isTSConstructSignatureDeclaration, isTSConstructorType, isTSDeclareFunction, isTSDeclareMethod, isTSEntityName, isTSEnumDeclaration, isTSEnumMember, isTSExportAssignment, isTSExpressionWithTypeArguments, isTSExternalModuleReference, isTSFunctionType, isTSImportEqualsDeclaration, isTSImportType, isTSIndexSignature, isTSIndexedAccessType, isTSInferType, isTSInterfaceBody, isTSInterfaceDeclaration, isTSIntersectionType, isTSIntrinsicKeyword, isTSLiteralType, isTSMappedType, isTSMethodSignature, isTSModuleBlock, isTSModuleDeclaration, isTSNamedTupleMember, isTSNamespaceExportDeclaration, isTSNeverKeyword, isTSNonNullExpression, isTSNullKeyword, isTSNumberKeyword, isTSObjectKeyword, isTSOptionalType, isTSParameterProperty, isTSParenthesizedType, isTSPropertySignature, isTSQualifiedName, isTSRestType, isTSStringKeyword, isTSSymbolKeyword, isTSThisType, isTSTupleType, isTSType, isTSTypeAliasDeclaration, isTSTypeAnnotation, isTSTypeAssertion, isTSTypeElement, isTSTypeLiteral, isTSTypeOperator, isTSTypeParameter, isTSTypeParameterDeclaration, isTSTypeParameterInstantiation, isTSTypePredicate, isTSTypeQuery, isTSTypeReference, isTSUndefinedKeyword, isTSUnionType, isTSUnknownKeyword, isTSVoidKeyword, isTaggedTemplateExpression, isTemplateElement, isTemplateLiteral, isTerminatorless, isThisExpression, isThisTypeAnnotation, isThrowStatement, isTopicReference, isTryStatement, isTupleExpression, isTupleTypeAnnotation, isType, isTypeAlias, isTypeAnnotation, isTypeCastExpression, isTypeParameter, isTypeParameterDeclaration, isTypeParameterInstantiation, isTypeScript, isTypeofTypeAnnotation, isUnaryExpression, isUnaryLike, isUnionTypeAnnotation, isUpdateExpression, isUserWhitespacable, isV8IntrinsicIdentifier, isValidES3Identifier, isValidIdentifier, isVar, isVariableDeclaration, isVariableDeclarator, isVariance, isVoidTypeAnnotation, isWhile, isWhileStatement, isWithStatement, isYieldExpression, jsxAttribute as jSXAttribute, jsxClosingElement as jSXClosingElement, jsxClosingFragment as jSXClosingFragment, jsxElement as jSXElement, jsxEmptyExpression as jSXEmptyExpression, jsxExpressionContainer as jSXExpressionContainer, jsxFragment as jSXFragment, jsxIdentifier as jSXIdentifier, jsxMemberExpression as jSXMemberExpression, jsxNamespacedName as jSXNamespacedName, jsxOpeningElement as jSXOpeningElement, jsxOpeningFragment as jSXOpeningFragment, jsxSpreadAttribute as jSXSpreadAttribute, jsxSpreadChild as jSXSpreadChild, jsxText as jSXText, jsxAttribute, jsxClosingElement, jsxClosingFragment, jsxElement, jsxEmptyExpression, jsxExpressionContainer, jsxFragment, jsxIdentifier, jsxMemberExpression, jsxNamespacedName, jsxOpeningElement, jsxOpeningFragment, jsxSpreadAttribute, jsxSpreadChild, jsxText, labeledStatement, logicalExpression, matchesPattern, memberExpression, metaProperty, mixedTypeAnnotation, moduleExpression, newExpression, noop, nullLiteral, nullLiteralTypeAnnotation, nullableTypeAnnotation, NumberLiteral as numberLiteral, numberLiteralTypeAnnotation, numberTypeAnnotation, numericLiteral, objectExpression, objectMethod, objectPattern, objectProperty, objectTypeAnnotation, objectTypeCallProperty, objectTypeIndexer, objectTypeInternalSlot, objectTypeProperty, objectTypeSpreadProperty, opaqueType, optionalCallExpression, optionalIndexedAccessType, optionalMemberExpression, parenthesizedExpression, pipelineBareFunction, pipelinePrimaryTopicReference, pipelineTopicExpression, placeholder, prependToMemberExpression, privateName, program, qualifiedTypeIdentifier, react, recordExpression, regExpLiteral, RegexLiteral as regexLiteral, removeComments, removeProperties, removePropertiesDeep, removeTypeDuplicates, restElement, RestProperty as restProperty, returnStatement, sequenceExpression, shallowEqual, spreadElement, SpreadProperty as spreadProperty, staticBlock, stringLiteral, stringLiteralTypeAnnotation, stringTypeAnnotation, _super as super, switchCase, switchStatement, symbolTypeAnnotation, tsAnyKeyword as tSAnyKeyword, tsArrayType as tSArrayType, tsAsExpression as tSAsExpression, tsBigIntKeyword as tSBigIntKeyword, tsBooleanKeyword as tSBooleanKeyword, tsCallSignatureDeclaration as tSCallSignatureDeclaration, tsConditionalType as tSConditionalType, tsConstructSignatureDeclaration as tSConstructSignatureDeclaration, tsConstructorType as tSConstructorType, tsDeclareFunction as tSDeclareFunction, tsDeclareMethod as tSDeclareMethod, tsEnumDeclaration as tSEnumDeclaration, tsEnumMember as tSEnumMember, tsExportAssignment as tSExportAssignment, tsExpressionWithTypeArguments as tSExpressionWithTypeArguments, tsExternalModuleReference as tSExternalModuleReference, tsFunctionType as tSFunctionType, tsImportEqualsDeclaration as tSImportEqualsDeclaration, tsImportType as tSImportType, tsIndexSignature as tSIndexSignature, tsIndexedAccessType as tSIndexedAccessType, tsInferType as tSInferType, tsInterfaceBody as tSInterfaceBody, tsInterfaceDeclaration as tSInterfaceDeclaration, tsIntersectionType as tSIntersectionType, tsIntrinsicKeyword as tSIntrinsicKeyword, tsLiteralType as tSLiteralType, tsMappedType as tSMappedType, tsMethodSignature as tSMethodSignature, tsModuleBlock as tSModuleBlock, tsModuleDeclaration as tSModuleDeclaration, tsNamedTupleMember as tSNamedTupleMember, tsNamespaceExportDeclaration as tSNamespaceExportDeclaration, tsNeverKeyword as tSNeverKeyword, tsNonNullExpression as tSNonNullExpression, tsNullKeyword as tSNullKeyword, tsNumberKeyword as tSNumberKeyword, tsObjectKeyword as tSObjectKeyword, tsOptionalType as tSOptionalType, tsParameterProperty as tSParameterProperty, tsParenthesizedType as tSParenthesizedType, tsPropertySignature as tSPropertySignature, tsQualifiedName as tSQualifiedName, tsRestType as tSRestType, tsStringKeyword as tSStringKeyword, tsSymbolKeyword as tSSymbolKeyword, tsThisType as tSThisType, tsTupleType as tSTupleType, tsTypeAliasDeclaration as tSTypeAliasDeclaration, tsTypeAnnotation as tSTypeAnnotation, tsTypeAssertion as tSTypeAssertion, tsTypeLiteral as tSTypeLiteral, tsTypeOperator as tSTypeOperator, tsTypeParameter as tSTypeParameter, tsTypeParameterDeclaration as tSTypeParameterDeclaration, tsTypeParameterInstantiation as tSTypeParameterInstantiation, tsTypePredicate as tSTypePredicate, tsTypeQuery as tSTypeQuery, tsTypeReference as tSTypeReference, tsUndefinedKeyword as tSUndefinedKeyword, tsUnionType as tSUnionType, tsUnknownKeyword as tSUnknownKeyword, tsVoidKeyword as tSVoidKeyword, taggedTemplateExpression, templateElement, templateLiteral, thisExpression, thisTypeAnnotation, throwStatement, toBindingIdentifierName, toBlock, toComputedKey, _default$3 as toExpression, toIdentifier, toKeyAlias, toSequenceExpression, _default$2 as toStatement, topicReference, traverse, traverseFast, tryStatement, tsAnyKeyword, tsArrayType, tsAsExpression, tsBigIntKeyword, tsBooleanKeyword, tsCallSignatureDeclaration, tsConditionalType, tsConstructSignatureDeclaration, tsConstructorType, tsDeclareFunction, tsDeclareMethod, tsEnumDeclaration, tsEnumMember, tsExportAssignment, tsExpressionWithTypeArguments, tsExternalModuleReference, tsFunctionType, tsImportEqualsDeclaration, tsImportType, tsIndexSignature, tsIndexedAccessType, tsInferType, tsInterfaceBody, tsInterfaceDeclaration, tsIntersectionType, tsIntrinsicKeyword, tsLiteralType, tsMappedType, tsMethodSignature, tsModuleBlock, tsModuleDeclaration, tsNamedTupleMember, tsNamespaceExportDeclaration, tsNeverKeyword, tsNonNullExpression, tsNullKeyword, tsNumberKeyword, tsObjectKeyword, tsOptionalType, tsParameterProperty, tsParenthesizedType, tsPropertySignature, tsQualifiedName, tsRestType, tsStringKeyword, tsSymbolKeyword, tsThisType, tsTupleType, tsTypeAliasDeclaration, tsTypeAnnotation, tsTypeAssertion, tsTypeLiteral, tsTypeOperator, tsTypeParameter, tsTypeParameterDeclaration, tsTypeParameterInstantiation, tsTypePredicate, tsTypeQuery, tsTypeReference, tsUndefinedKeyword, tsUnionType, tsUnknownKeyword, tsVoidKeyword, tupleExpression, tupleTypeAnnotation, typeAlias, typeAnnotation, typeCastExpression, typeParameter, typeParameterDeclaration, typeParameterInstantiation, typeofTypeAnnotation, unaryExpression, unionTypeAnnotation, updateExpression, v8IntrinsicIdentifier, validate, _default$1 as valueToNode, variableDeclaration, variableDeclarator, variance, voidTypeAnnotation, whileStatement, withStatement, yieldExpression }; diff --git a/node_modules/@babel/types/lib/index.js b/node_modules/@babel/types/lib/index.js new file mode 100644 index 0000000..677a331 --- /dev/null +++ b/node_modules/@babel/types/lib/index.js @@ -0,0 +1,647 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + react: true, + assertNode: true, + createTypeAnnotationBasedOnTypeof: true, + createUnionTypeAnnotation: true, + createFlowUnionType: true, + createTSUnionType: true, + cloneNode: true, + clone: true, + cloneDeep: true, + cloneDeepWithoutLoc: true, + cloneWithoutLoc: true, + addComment: true, + addComments: true, + inheritInnerComments: true, + inheritLeadingComments: true, + inheritsComments: true, + inheritTrailingComments: true, + removeComments: true, + ensureBlock: true, + toBindingIdentifierName: true, + toBlock: true, + toComputedKey: true, + toExpression: true, + toIdentifier: true, + toKeyAlias: true, + toSequenceExpression: true, + toStatement: true, + valueToNode: true, + appendToMemberExpression: true, + inherits: true, + prependToMemberExpression: true, + removeProperties: true, + removePropertiesDeep: true, + removeTypeDuplicates: true, + getBindingIdentifiers: true, + getOuterBindingIdentifiers: true, + traverse: true, + traverseFast: true, + shallowEqual: true, + is: true, + isBinding: true, + isBlockScoped: true, + isImmutable: true, + isLet: true, + isNode: true, + isNodesEquivalent: true, + isPlaceholderType: true, + isReferenced: true, + isScope: true, + isSpecifierDefault: true, + isType: true, + isValidES3Identifier: true, + isValidIdentifier: true, + isVar: true, + matchesPattern: true, + validate: true, + buildMatchMemberExpression: true +}; +Object.defineProperty(exports, "addComment", { + enumerable: true, + get: function () { + return _addComment.default; + } +}); +Object.defineProperty(exports, "addComments", { + enumerable: true, + get: function () { + return _addComments.default; + } +}); +Object.defineProperty(exports, "appendToMemberExpression", { + enumerable: true, + get: function () { + return _appendToMemberExpression.default; + } +}); +Object.defineProperty(exports, "assertNode", { + enumerable: true, + get: function () { + return _assertNode.default; + } +}); +Object.defineProperty(exports, "buildMatchMemberExpression", { + enumerable: true, + get: function () { + return _buildMatchMemberExpression.default; + } +}); +Object.defineProperty(exports, "clone", { + enumerable: true, + get: function () { + return _clone.default; + } +}); +Object.defineProperty(exports, "cloneDeep", { + enumerable: true, + get: function () { + return _cloneDeep.default; + } +}); +Object.defineProperty(exports, "cloneDeepWithoutLoc", { + enumerable: true, + get: function () { + return _cloneDeepWithoutLoc.default; + } +}); +Object.defineProperty(exports, "cloneNode", { + enumerable: true, + get: function () { + return _cloneNode.default; + } +}); +Object.defineProperty(exports, "cloneWithoutLoc", { + enumerable: true, + get: function () { + return _cloneWithoutLoc.default; + } +}); +Object.defineProperty(exports, "createFlowUnionType", { + enumerable: true, + get: function () { + return _createFlowUnionType.default; + } +}); +Object.defineProperty(exports, "createTSUnionType", { + enumerable: true, + get: function () { + return _createTSUnionType.default; + } +}); +Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { + enumerable: true, + get: function () { + return _createTypeAnnotationBasedOnTypeof.default; + } +}); +Object.defineProperty(exports, "createUnionTypeAnnotation", { + enumerable: true, + get: function () { + return _createFlowUnionType.default; + } +}); +Object.defineProperty(exports, "ensureBlock", { + enumerable: true, + get: function () { + return _ensureBlock.default; + } +}); +Object.defineProperty(exports, "getBindingIdentifiers", { + enumerable: true, + get: function () { + return _getBindingIdentifiers.default; + } +}); +Object.defineProperty(exports, "getOuterBindingIdentifiers", { + enumerable: true, + get: function () { + return _getOuterBindingIdentifiers.default; + } +}); +Object.defineProperty(exports, "inheritInnerComments", { + enumerable: true, + get: function () { + return _inheritInnerComments.default; + } +}); +Object.defineProperty(exports, "inheritLeadingComments", { + enumerable: true, + get: function () { + return _inheritLeadingComments.default; + } +}); +Object.defineProperty(exports, "inheritTrailingComments", { + enumerable: true, + get: function () { + return _inheritTrailingComments.default; + } +}); +Object.defineProperty(exports, "inherits", { + enumerable: true, + get: function () { + return _inherits.default; + } +}); +Object.defineProperty(exports, "inheritsComments", { + enumerable: true, + get: function () { + return _inheritsComments.default; + } +}); +Object.defineProperty(exports, "is", { + enumerable: true, + get: function () { + return _is.default; + } +}); +Object.defineProperty(exports, "isBinding", { + enumerable: true, + get: function () { + return _isBinding.default; + } +}); +Object.defineProperty(exports, "isBlockScoped", { + enumerable: true, + get: function () { + return _isBlockScoped.default; + } +}); +Object.defineProperty(exports, "isImmutable", { + enumerable: true, + get: function () { + return _isImmutable.default; + } +}); +Object.defineProperty(exports, "isLet", { + enumerable: true, + get: function () { + return _isLet.default; + } +}); +Object.defineProperty(exports, "isNode", { + enumerable: true, + get: function () { + return _isNode.default; + } +}); +Object.defineProperty(exports, "isNodesEquivalent", { + enumerable: true, + get: function () { + return _isNodesEquivalent.default; + } +}); +Object.defineProperty(exports, "isPlaceholderType", { + enumerable: true, + get: function () { + return _isPlaceholderType.default; + } +}); +Object.defineProperty(exports, "isReferenced", { + enumerable: true, + get: function () { + return _isReferenced.default; + } +}); +Object.defineProperty(exports, "isScope", { + enumerable: true, + get: function () { + return _isScope.default; + } +}); +Object.defineProperty(exports, "isSpecifierDefault", { + enumerable: true, + get: function () { + return _isSpecifierDefault.default; + } +}); +Object.defineProperty(exports, "isType", { + enumerable: true, + get: function () { + return _isType.default; + } +}); +Object.defineProperty(exports, "isValidES3Identifier", { + enumerable: true, + get: function () { + return _isValidES3Identifier.default; + } +}); +Object.defineProperty(exports, "isValidIdentifier", { + enumerable: true, + get: function () { + return _isValidIdentifier.default; + } +}); +Object.defineProperty(exports, "isVar", { + enumerable: true, + get: function () { + return _isVar.default; + } +}); +Object.defineProperty(exports, "matchesPattern", { + enumerable: true, + get: function () { + return _matchesPattern.default; + } +}); +Object.defineProperty(exports, "prependToMemberExpression", { + enumerable: true, + get: function () { + return _prependToMemberExpression.default; + } +}); +exports.react = void 0; +Object.defineProperty(exports, "removeComments", { + enumerable: true, + get: function () { + return _removeComments.default; + } +}); +Object.defineProperty(exports, "removeProperties", { + enumerable: true, + get: function () { + return _removeProperties.default; + } +}); +Object.defineProperty(exports, "removePropertiesDeep", { + enumerable: true, + get: function () { + return _removePropertiesDeep.default; + } +}); +Object.defineProperty(exports, "removeTypeDuplicates", { + enumerable: true, + get: function () { + return _removeTypeDuplicates.default; + } +}); +Object.defineProperty(exports, "shallowEqual", { + enumerable: true, + get: function () { + return _shallowEqual.default; + } +}); +Object.defineProperty(exports, "toBindingIdentifierName", { + enumerable: true, + get: function () { + return _toBindingIdentifierName.default; + } +}); +Object.defineProperty(exports, "toBlock", { + enumerable: true, + get: function () { + return _toBlock.default; + } +}); +Object.defineProperty(exports, "toComputedKey", { + enumerable: true, + get: function () { + return _toComputedKey.default; + } +}); +Object.defineProperty(exports, "toExpression", { + enumerable: true, + get: function () { + return _toExpression.default; + } +}); +Object.defineProperty(exports, "toIdentifier", { + enumerable: true, + get: function () { + return _toIdentifier.default; + } +}); +Object.defineProperty(exports, "toKeyAlias", { + enumerable: true, + get: function () { + return _toKeyAlias.default; + } +}); +Object.defineProperty(exports, "toSequenceExpression", { + enumerable: true, + get: function () { + return _toSequenceExpression.default; + } +}); +Object.defineProperty(exports, "toStatement", { + enumerable: true, + get: function () { + return _toStatement.default; + } +}); +Object.defineProperty(exports, "traverse", { + enumerable: true, + get: function () { + return _traverse.default; + } +}); +Object.defineProperty(exports, "traverseFast", { + enumerable: true, + get: function () { + return _traverseFast.default; + } +}); +Object.defineProperty(exports, "validate", { + enumerable: true, + get: function () { + return _validate.default; + } +}); +Object.defineProperty(exports, "valueToNode", { + enumerable: true, + get: function () { + return _valueToNode.default; + } +}); + +var _isReactComponent = require("./validators/react/isReactComponent"); + +var _isCompatTag = require("./validators/react/isCompatTag"); + +var _buildChildren = require("./builders/react/buildChildren"); + +var _assertNode = require("./asserts/assertNode"); + +var _generated = require("./asserts/generated"); + +Object.keys(_generated).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _generated[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated[key]; + } + }); +}); + +var _createTypeAnnotationBasedOnTypeof = require("./builders/flow/createTypeAnnotationBasedOnTypeof"); + +var _createFlowUnionType = require("./builders/flow/createFlowUnionType"); + +var _createTSUnionType = require("./builders/typescript/createTSUnionType"); + +var _generated2 = require("./builders/generated"); + +Object.keys(_generated2).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _generated2[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated2[key]; + } + }); +}); + +var _uppercase = require("./builders/generated/uppercase"); + +Object.keys(_uppercase).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _uppercase[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _uppercase[key]; + } + }); +}); + +var _cloneNode = require("./clone/cloneNode"); + +var _clone = require("./clone/clone"); + +var _cloneDeep = require("./clone/cloneDeep"); + +var _cloneDeepWithoutLoc = require("./clone/cloneDeepWithoutLoc"); + +var _cloneWithoutLoc = require("./clone/cloneWithoutLoc"); + +var _addComment = require("./comments/addComment"); + +var _addComments = require("./comments/addComments"); + +var _inheritInnerComments = require("./comments/inheritInnerComments"); + +var _inheritLeadingComments = require("./comments/inheritLeadingComments"); + +var _inheritsComments = require("./comments/inheritsComments"); + +var _inheritTrailingComments = require("./comments/inheritTrailingComments"); + +var _removeComments = require("./comments/removeComments"); + +var _generated3 = require("./constants/generated"); + +Object.keys(_generated3).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _generated3[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated3[key]; + } + }); +}); + +var _constants = require("./constants"); + +Object.keys(_constants).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _constants[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _constants[key]; + } + }); +}); + +var _ensureBlock = require("./converters/ensureBlock"); + +var _toBindingIdentifierName = require("./converters/toBindingIdentifierName"); + +var _toBlock = require("./converters/toBlock"); + +var _toComputedKey = require("./converters/toComputedKey"); + +var _toExpression = require("./converters/toExpression"); + +var _toIdentifier = require("./converters/toIdentifier"); + +var _toKeyAlias = require("./converters/toKeyAlias"); + +var _toSequenceExpression = require("./converters/toSequenceExpression"); + +var _toStatement = require("./converters/toStatement"); + +var _valueToNode = require("./converters/valueToNode"); + +var _definitions = require("./definitions"); + +Object.keys(_definitions).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _definitions[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _definitions[key]; + } + }); +}); + +var _appendToMemberExpression = require("./modifications/appendToMemberExpression"); + +var _inherits = require("./modifications/inherits"); + +var _prependToMemberExpression = require("./modifications/prependToMemberExpression"); + +var _removeProperties = require("./modifications/removeProperties"); + +var _removePropertiesDeep = require("./modifications/removePropertiesDeep"); + +var _removeTypeDuplicates = require("./modifications/flow/removeTypeDuplicates"); + +var _getBindingIdentifiers = require("./retrievers/getBindingIdentifiers"); + +var _getOuterBindingIdentifiers = require("./retrievers/getOuterBindingIdentifiers"); + +var _traverse = require("./traverse/traverse"); + +Object.keys(_traverse).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _traverse[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _traverse[key]; + } + }); +}); + +var _traverseFast = require("./traverse/traverseFast"); + +var _shallowEqual = require("./utils/shallowEqual"); + +var _is = require("./validators/is"); + +var _isBinding = require("./validators/isBinding"); + +var _isBlockScoped = require("./validators/isBlockScoped"); + +var _isImmutable = require("./validators/isImmutable"); + +var _isLet = require("./validators/isLet"); + +var _isNode = require("./validators/isNode"); + +var _isNodesEquivalent = require("./validators/isNodesEquivalent"); + +var _isPlaceholderType = require("./validators/isPlaceholderType"); + +var _isReferenced = require("./validators/isReferenced"); + +var _isScope = require("./validators/isScope"); + +var _isSpecifierDefault = require("./validators/isSpecifierDefault"); + +var _isType = require("./validators/isType"); + +var _isValidES3Identifier = require("./validators/isValidES3Identifier"); + +var _isValidIdentifier = require("./validators/isValidIdentifier"); + +var _isVar = require("./validators/isVar"); + +var _matchesPattern = require("./validators/matchesPattern"); + +var _validate = require("./validators/validate"); + +var _buildMatchMemberExpression = require("./validators/buildMatchMemberExpression"); + +var _generated4 = require("./validators/generated"); + +Object.keys(_generated4).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _generated4[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated4[key]; + } + }); +}); + +var _generated5 = require("./ast-types/generated"); + +Object.keys(_generated5).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _generated5[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated5[key]; + } + }); +}); +const react = { + isReactComponent: _isReactComponent.default, + isCompatTag: _isCompatTag.default, + buildChildren: _buildChildren.default +}; +exports.react = react;
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/index.js.flow b/node_modules/@babel/types/lib/index.js.flow new file mode 100644 index 0000000..331add0 --- /dev/null +++ b/node_modules/@babel/types/lib/index.js.flow @@ -0,0 +1,2572 @@ +// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/flow.js for script used. + +declare class BabelNodeComment { + value: string; + start: number; + end: number; + loc: BabelNodeSourceLocation; +} + +declare class BabelNodeCommentBlock extends BabelNodeComment { + type: "CommentBlock"; +} + +declare class BabelNodeCommentLine extends BabelNodeComment { + type: "CommentLine"; +} + +declare class BabelNodeSourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +declare class BabelNode { + leadingComments?: Array<BabelNodeComment>; + innerComments?: Array<BabelNodeComment>; + trailingComments?: Array<BabelNodeComment>; + start: ?number; + end: ?number; + loc: ?BabelNodeSourceLocation; + extra?: { [string]: mixed }; +} + +declare class BabelNodeArrayExpression extends BabelNode { + type: "ArrayExpression"; + elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>; +} + +declare class BabelNodeAssignmentExpression extends BabelNode { + type: "AssignmentExpression"; + operator: string; + left: BabelNodeLVal; + right: BabelNodeExpression; +} + +declare class BabelNodeBinaryExpression extends BabelNode { + type: "BinaryExpression"; + operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; + left: BabelNodeExpression | BabelNodePrivateName; + right: BabelNodeExpression; +} + +declare class BabelNodeInterpreterDirective extends BabelNode { + type: "InterpreterDirective"; + value: string; +} + +declare class BabelNodeDirective extends BabelNode { + type: "Directive"; + value: BabelNodeDirectiveLiteral; +} + +declare class BabelNodeDirectiveLiteral extends BabelNode { + type: "DirectiveLiteral"; + value: string; +} + +declare class BabelNodeBlockStatement extends BabelNode { + type: "BlockStatement"; + body: Array<BabelNodeStatement>; + directives?: Array<BabelNodeDirective>; +} + +declare class BabelNodeBreakStatement extends BabelNode { + type: "BreakStatement"; + label?: BabelNodeIdentifier; +} + +declare class BabelNodeCallExpression extends BabelNode { + type: "CallExpression"; + callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier; + arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>; + optional?: true | false; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeCatchClause extends BabelNode { + type: "CatchClause"; + param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern; + body: BabelNodeBlockStatement; +} + +declare class BabelNodeConditionalExpression extends BabelNode { + type: "ConditionalExpression"; + test: BabelNodeExpression; + consequent: BabelNodeExpression; + alternate: BabelNodeExpression; +} + +declare class BabelNodeContinueStatement extends BabelNode { + type: "ContinueStatement"; + label?: BabelNodeIdentifier; +} + +declare class BabelNodeDebuggerStatement extends BabelNode { + type: "DebuggerStatement"; +} + +declare class BabelNodeDoWhileStatement extends BabelNode { + type: "DoWhileStatement"; + test: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeEmptyStatement extends BabelNode { + type: "EmptyStatement"; +} + +declare class BabelNodeExpressionStatement extends BabelNode { + type: "ExpressionStatement"; + expression: BabelNodeExpression; +} + +declare class BabelNodeFile extends BabelNode { + type: "File"; + program: BabelNodeProgram; + comments?: Array<BabelNodeCommentBlock | BabelNodeCommentLine>; + tokens?: Array<any>; +} + +declare class BabelNodeForInStatement extends BabelNode { + type: "ForInStatement"; + left: BabelNodeVariableDeclaration | BabelNodeLVal; + right: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeForStatement extends BabelNode { + type: "ForStatement"; + init?: BabelNodeVariableDeclaration | BabelNodeExpression; + test?: BabelNodeExpression; + update?: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeFunctionDeclaration extends BabelNode { + type: "FunctionDeclaration"; + id?: BabelNodeIdentifier; + params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>; + body: BabelNodeBlockStatement; + generator?: boolean; + async?: boolean; + declare?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeFunctionExpression extends BabelNode { + type: "FunctionExpression"; + id?: BabelNodeIdentifier; + params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>; + body: BabelNodeBlockStatement; + generator?: boolean; + async?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeIdentifier extends BabelNode { + type: "Identifier"; + name: string; + decorators?: Array<BabelNodeDecorator>; + optional?: boolean; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeIfStatement extends BabelNode { + type: "IfStatement"; + test: BabelNodeExpression; + consequent: BabelNodeStatement; + alternate?: BabelNodeStatement; +} + +declare class BabelNodeLabeledStatement extends BabelNode { + type: "LabeledStatement"; + label: BabelNodeIdentifier; + body: BabelNodeStatement; +} + +declare class BabelNodeStringLiteral extends BabelNode { + type: "StringLiteral"; + value: string; +} + +declare class BabelNodeNumericLiteral extends BabelNode { + type: "NumericLiteral"; + value: number; +} + +declare class BabelNodeNullLiteral extends BabelNode { + type: "NullLiteral"; +} + +declare class BabelNodeBooleanLiteral extends BabelNode { + type: "BooleanLiteral"; + value: boolean; +} + +declare class BabelNodeRegExpLiteral extends BabelNode { + type: "RegExpLiteral"; + pattern: string; + flags?: string; +} + +declare class BabelNodeLogicalExpression extends BabelNode { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: BabelNodeExpression; + right: BabelNodeExpression; +} + +declare class BabelNodeMemberExpression extends BabelNode { + type: "MemberExpression"; + object: BabelNodeExpression; + property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName; + computed?: boolean; + optional?: true | false; +} + +declare class BabelNodeNewExpression extends BabelNode { + type: "NewExpression"; + callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier; + arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>; + optional?: true | false; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeProgram extends BabelNode { + type: "Program"; + body: Array<BabelNodeStatement>; + directives?: Array<BabelNodeDirective>; + sourceType?: "script" | "module"; + interpreter?: BabelNodeInterpreterDirective; + sourceFile: string; +} + +declare class BabelNodeObjectExpression extends BabelNode { + type: "ObjectExpression"; + properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>; +} + +declare class BabelNodeObjectMethod extends BabelNode { + type: "ObjectMethod"; + kind?: "method" | "get" | "set"; + key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral; + params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>; + body: BabelNodeBlockStatement; + computed?: boolean; + generator?: boolean; + async?: boolean; + decorators?: Array<BabelNodeDecorator>; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeObjectProperty extends BabelNode { + type: "ObjectProperty"; + key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral; + value: BabelNodeExpression | BabelNodePatternLike; + computed?: boolean; + shorthand?: boolean; + decorators?: Array<BabelNodeDecorator>; +} + +declare class BabelNodeRestElement extends BabelNode { + type: "RestElement"; + argument: BabelNodeLVal; + decorators?: Array<BabelNodeDecorator>; + optional?: boolean; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeReturnStatement extends BabelNode { + type: "ReturnStatement"; + argument?: BabelNodeExpression; +} + +declare class BabelNodeSequenceExpression extends BabelNode { + type: "SequenceExpression"; + expressions: Array<BabelNodeExpression>; +} + +declare class BabelNodeParenthesizedExpression extends BabelNode { + type: "ParenthesizedExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodeSwitchCase extends BabelNode { + type: "SwitchCase"; + test?: BabelNodeExpression; + consequent: Array<BabelNodeStatement>; +} + +declare class BabelNodeSwitchStatement extends BabelNode { + type: "SwitchStatement"; + discriminant: BabelNodeExpression; + cases: Array<BabelNodeSwitchCase>; +} + +declare class BabelNodeThisExpression extends BabelNode { + type: "ThisExpression"; +} + +declare class BabelNodeThrowStatement extends BabelNode { + type: "ThrowStatement"; + argument: BabelNodeExpression; +} + +declare class BabelNodeTryStatement extends BabelNode { + type: "TryStatement"; + block: BabelNodeBlockStatement; + handler?: BabelNodeCatchClause; + finalizer?: BabelNodeBlockStatement; +} + +declare class BabelNodeUnaryExpression extends BabelNode { + type: "UnaryExpression"; + operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; + argument: BabelNodeExpression; + prefix?: boolean; +} + +declare class BabelNodeUpdateExpression extends BabelNode { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: BabelNodeExpression; + prefix?: boolean; +} + +declare class BabelNodeVariableDeclaration extends BabelNode { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: Array<BabelNodeVariableDeclarator>; + declare?: boolean; +} + +declare class BabelNodeVariableDeclarator extends BabelNode { + type: "VariableDeclarator"; + id: BabelNodeLVal; + init?: BabelNodeExpression; + definite?: boolean; +} + +declare class BabelNodeWhileStatement extends BabelNode { + type: "WhileStatement"; + test: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeWithStatement extends BabelNode { + type: "WithStatement"; + object: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeAssignmentPattern extends BabelNode { + type: "AssignmentPattern"; + left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression; + right: BabelNodeExpression; + decorators?: Array<BabelNodeDecorator>; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeArrayPattern extends BabelNode { + type: "ArrayPattern"; + elements: Array<null | BabelNodePatternLike>; + decorators?: Array<BabelNodeDecorator>; + optional?: boolean; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeArrowFunctionExpression extends BabelNode { + type: "ArrowFunctionExpression"; + params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>; + body: BabelNodeBlockStatement | BabelNodeExpression; + async?: boolean; + expression: boolean; + generator?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeClassBody extends BabelNode { + type: "ClassBody"; + body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeClassAccessorProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature | BabelNodeStaticBlock>; +} + +declare class BabelNodeClassExpression extends BabelNode { + type: "ClassExpression"; + id?: BabelNodeIdentifier; + superClass?: BabelNodeExpression; + body: BabelNodeClassBody; + decorators?: Array<BabelNodeDecorator>; + mixins?: BabelNodeInterfaceExtends; + superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeClassDeclaration extends BabelNode { + type: "ClassDeclaration"; + id: BabelNodeIdentifier; + superClass?: BabelNodeExpression; + body: BabelNodeClassBody; + decorators?: Array<BabelNodeDecorator>; + abstract?: boolean; + declare?: boolean; + mixins?: BabelNodeInterfaceExtends; + superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeExportAllDeclaration extends BabelNode { + type: "ExportAllDeclaration"; + source: BabelNodeStringLiteral; + assertions?: Array<BabelNodeImportAttribute>; + exportKind?: "type" | "value"; +} + +declare class BabelNodeExportDefaultDeclaration extends BabelNode { + type: "ExportDefaultDeclaration"; + declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression; + exportKind?: "value"; +} + +declare class BabelNodeExportNamedDeclaration extends BabelNode { + type: "ExportNamedDeclaration"; + declaration?: BabelNodeDeclaration; + specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>; + source?: BabelNodeStringLiteral; + assertions?: Array<BabelNodeImportAttribute>; + exportKind?: "type" | "value"; +} + +declare class BabelNodeExportSpecifier extends BabelNode { + type: "ExportSpecifier"; + local: BabelNodeIdentifier; + exported: BabelNodeIdentifier | BabelNodeStringLiteral; + exportKind?: "type" | "value"; +} + +declare class BabelNodeForOfStatement extends BabelNode { + type: "ForOfStatement"; + left: BabelNodeVariableDeclaration | BabelNodeLVal; + right: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeImportDeclaration extends BabelNode { + type: "ImportDeclaration"; + specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>; + source: BabelNodeStringLiteral; + assertions?: Array<BabelNodeImportAttribute>; + importKind?: "type" | "typeof" | "value"; +} + +declare class BabelNodeImportDefaultSpecifier extends BabelNode { + type: "ImportDefaultSpecifier"; + local: BabelNodeIdentifier; +} + +declare class BabelNodeImportNamespaceSpecifier extends BabelNode { + type: "ImportNamespaceSpecifier"; + local: BabelNodeIdentifier; +} + +declare class BabelNodeImportSpecifier extends BabelNode { + type: "ImportSpecifier"; + local: BabelNodeIdentifier; + imported: BabelNodeIdentifier | BabelNodeStringLiteral; + importKind?: "type" | "typeof" | "value"; +} + +declare class BabelNodeMetaProperty extends BabelNode { + type: "MetaProperty"; + meta: BabelNodeIdentifier; + property: BabelNodeIdentifier; +} + +declare class BabelNodeClassMethod extends BabelNode { + type: "ClassMethod"; + kind?: "get" | "set" | "method" | "constructor"; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>; + body: BabelNodeBlockStatement; + computed?: boolean; + generator?: boolean; + async?: boolean; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + decorators?: Array<BabelNodeDecorator>; + optional?: boolean; + override?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeObjectPattern extends BabelNode { + type: "ObjectPattern"; + properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>; + decorators?: Array<BabelNodeDecorator>; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeSpreadElement extends BabelNode { + type: "SpreadElement"; + argument: BabelNodeExpression; +} + +declare class BabelNodeSuper extends BabelNode { + type: "Super"; +} + +declare class BabelNodeTaggedTemplateExpression extends BabelNode { + type: "TaggedTemplateExpression"; + tag: BabelNodeExpression; + quasi: BabelNodeTemplateLiteral; + typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTemplateElement extends BabelNode { + type: "TemplateElement"; + value: { raw: string, cooked?: string }; + tail?: boolean; +} + +declare class BabelNodeTemplateLiteral extends BabelNode { + type: "TemplateLiteral"; + quasis: Array<BabelNodeTemplateElement>; + expressions: Array<BabelNodeExpression | BabelNodeTSType>; +} + +declare class BabelNodeYieldExpression extends BabelNode { + type: "YieldExpression"; + argument?: BabelNodeExpression; + delegate?: boolean; +} + +declare class BabelNodeAwaitExpression extends BabelNode { + type: "AwaitExpression"; + argument: BabelNodeExpression; +} + +declare class BabelNodeImport extends BabelNode { + type: "Import"; +} + +declare class BabelNodeBigIntLiteral extends BabelNode { + type: "BigIntLiteral"; + value: string; +} + +declare class BabelNodeExportNamespaceSpecifier extends BabelNode { + type: "ExportNamespaceSpecifier"; + exported: BabelNodeIdentifier; +} + +declare class BabelNodeOptionalMemberExpression extends BabelNode { + type: "OptionalMemberExpression"; + object: BabelNodeExpression; + property: BabelNodeExpression | BabelNodeIdentifier; + computed?: boolean; + optional: boolean; +} + +declare class BabelNodeOptionalCallExpression extends BabelNode { + type: "OptionalCallExpression"; + callee: BabelNodeExpression; + arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>; + optional: boolean; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeClassProperty extends BabelNode { + type: "ClassProperty"; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + value?: BabelNodeExpression; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + decorators?: Array<BabelNodeDecorator>; + computed?: boolean; + abstract?: boolean; + accessibility?: "public" | "private" | "protected"; + declare?: boolean; + definite?: boolean; + optional?: boolean; + override?: boolean; + readonly?: boolean; + variance?: BabelNodeVariance; +} + +declare class BabelNodeClassAccessorProperty extends BabelNode { + type: "ClassAccessorProperty"; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression | BabelNodePrivateName; + value?: BabelNodeExpression; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + decorators?: Array<BabelNodeDecorator>; + computed?: boolean; + abstract?: boolean; + accessibility?: "public" | "private" | "protected"; + declare?: boolean; + definite?: boolean; + optional?: boolean; + override?: boolean; + readonly?: boolean; + variance?: BabelNodeVariance; +} + +declare class BabelNodeClassPrivateProperty extends BabelNode { + type: "ClassPrivateProperty"; + key: BabelNodePrivateName; + value?: BabelNodeExpression; + decorators?: Array<BabelNodeDecorator>; + definite?: boolean; + readonly?: boolean; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + variance?: BabelNodeVariance; +} + +declare class BabelNodeClassPrivateMethod extends BabelNode { + type: "ClassPrivateMethod"; + kind?: "get" | "set" | "method" | "constructor"; + key: BabelNodePrivateName; + params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>; + body: BabelNodeBlockStatement; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + async?: boolean; + computed?: boolean; + decorators?: Array<BabelNodeDecorator>; + generator?: boolean; + optional?: boolean; + override?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodePrivateName extends BabelNode { + type: "PrivateName"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeStaticBlock extends BabelNode { + type: "StaticBlock"; + body: Array<BabelNodeStatement>; +} + +declare class BabelNodeAnyTypeAnnotation extends BabelNode { + type: "AnyTypeAnnotation"; +} + +declare class BabelNodeArrayTypeAnnotation extends BabelNode { + type: "ArrayTypeAnnotation"; + elementType: BabelNodeFlowType; +} + +declare class BabelNodeBooleanTypeAnnotation extends BabelNode { + type: "BooleanTypeAnnotation"; +} + +declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; +} + +declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode { + type: "NullLiteralTypeAnnotation"; +} + +declare class BabelNodeClassImplements extends BabelNode { + type: "ClassImplements"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeDeclareClass extends BabelNode { + type: "DeclareClass"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array<BabelNodeInterfaceExtends>; +} + +declare class BabelNodeDeclareFunction extends BabelNode { + type: "DeclareFunction"; + id: BabelNodeIdentifier; + predicate?: BabelNodeDeclaredPredicate; +} + +declare class BabelNodeDeclareInterface extends BabelNode { + type: "DeclareInterface"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array<BabelNodeInterfaceExtends>; +} + +declare class BabelNodeDeclareModule extends BabelNode { + type: "DeclareModule"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + body: BabelNodeBlockStatement; + kind?: "CommonJS" | "ES"; +} + +declare class BabelNodeDeclareModuleExports extends BabelNode { + type: "DeclareModuleExports"; + typeAnnotation: BabelNodeTypeAnnotation; +} + +declare class BabelNodeDeclareTypeAlias extends BabelNode { + type: "DeclareTypeAlias"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + right: BabelNodeFlowType; +} + +declare class BabelNodeDeclareOpaqueType extends BabelNode { + type: "DeclareOpaqueType"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + supertype?: BabelNodeFlowType; + impltype?: BabelNodeFlowType; +} + +declare class BabelNodeDeclareVariable extends BabelNode { + type: "DeclareVariable"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeDeclareExportDeclaration extends BabelNode { + type: "DeclareExportDeclaration"; + declaration?: BabelNodeFlow; + specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>; + source?: BabelNodeStringLiteral; +} + +declare class BabelNodeDeclareExportAllDeclaration extends BabelNode { + type: "DeclareExportAllDeclaration"; + source: BabelNodeStringLiteral; + exportKind?: "type" | "value"; +} + +declare class BabelNodeDeclaredPredicate extends BabelNode { + type: "DeclaredPredicate"; + value: BabelNodeFlow; +} + +declare class BabelNodeExistsTypeAnnotation extends BabelNode { + type: "ExistsTypeAnnotation"; +} + +declare class BabelNodeFunctionTypeAnnotation extends BabelNode { + type: "FunctionTypeAnnotation"; + typeParameters?: BabelNodeTypeParameterDeclaration; + params: Array<BabelNodeFunctionTypeParam>; + rest?: BabelNodeFunctionTypeParam; + returnType: BabelNodeFlowType; +} + +declare class BabelNodeFunctionTypeParam extends BabelNode { + type: "FunctionTypeParam"; + name?: BabelNodeIdentifier; + typeAnnotation: BabelNodeFlowType; + optional?: boolean; +} + +declare class BabelNodeGenericTypeAnnotation extends BabelNode { + type: "GenericTypeAnnotation"; + id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeInferredPredicate extends BabelNode { + type: "InferredPredicate"; +} + +declare class BabelNodeInterfaceExtends extends BabelNode { + type: "InterfaceExtends"; + id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeInterfaceDeclaration extends BabelNode { + type: "InterfaceDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array<BabelNodeInterfaceExtends>; +} + +declare class BabelNodeInterfaceTypeAnnotation extends BabelNode { + type: "InterfaceTypeAnnotation"; + body: BabelNodeObjectTypeAnnotation; +} + +declare class BabelNodeIntersectionTypeAnnotation extends BabelNode { + type: "IntersectionTypeAnnotation"; + types: Array<BabelNodeFlowType>; +} + +declare class BabelNodeMixedTypeAnnotation extends BabelNode { + type: "MixedTypeAnnotation"; +} + +declare class BabelNodeEmptyTypeAnnotation extends BabelNode { + type: "EmptyTypeAnnotation"; +} + +declare class BabelNodeNullableTypeAnnotation extends BabelNode { + type: "NullableTypeAnnotation"; + typeAnnotation: BabelNodeFlowType; +} + +declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode { + type: "NumberLiteralTypeAnnotation"; + value: number; +} + +declare class BabelNodeNumberTypeAnnotation extends BabelNode { + type: "NumberTypeAnnotation"; +} + +declare class BabelNodeObjectTypeAnnotation extends BabelNode { + type: "ObjectTypeAnnotation"; + properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>; + indexers?: Array<BabelNodeObjectTypeIndexer>; + callProperties?: Array<BabelNodeObjectTypeCallProperty>; + internalSlots?: Array<BabelNodeObjectTypeInternalSlot>; + exact?: boolean; + inexact?: boolean; +} + +declare class BabelNodeObjectTypeInternalSlot extends BabelNode { + type: "ObjectTypeInternalSlot"; + id: BabelNodeIdentifier; + value: BabelNodeFlowType; + optional: boolean; + method: boolean; +} + +declare class BabelNodeObjectTypeCallProperty extends BabelNode { + type: "ObjectTypeCallProperty"; + value: BabelNodeFlowType; +} + +declare class BabelNodeObjectTypeIndexer extends BabelNode { + type: "ObjectTypeIndexer"; + id?: BabelNodeIdentifier; + key: BabelNodeFlowType; + value: BabelNodeFlowType; + variance?: BabelNodeVariance; +} + +declare class BabelNodeObjectTypeProperty extends BabelNode { + type: "ObjectTypeProperty"; + key: BabelNodeIdentifier | BabelNodeStringLiteral; + value: BabelNodeFlowType; + variance?: BabelNodeVariance; + kind: "init" | "get" | "set"; + method: boolean; + optional: boolean; + proto: boolean; +} + +declare class BabelNodeObjectTypeSpreadProperty extends BabelNode { + type: "ObjectTypeSpreadProperty"; + argument: BabelNodeFlowType; +} + +declare class BabelNodeOpaqueType extends BabelNode { + type: "OpaqueType"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + supertype?: BabelNodeFlowType; + impltype: BabelNodeFlowType; +} + +declare class BabelNodeQualifiedTypeIdentifier extends BabelNode { + type: "QualifiedTypeIdentifier"; + id: BabelNodeIdentifier; + qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; +} + +declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode { + type: "StringLiteralTypeAnnotation"; + value: string; +} + +declare class BabelNodeStringTypeAnnotation extends BabelNode { + type: "StringTypeAnnotation"; +} + +declare class BabelNodeSymbolTypeAnnotation extends BabelNode { + type: "SymbolTypeAnnotation"; +} + +declare class BabelNodeThisTypeAnnotation extends BabelNode { + type: "ThisTypeAnnotation"; +} + +declare class BabelNodeTupleTypeAnnotation extends BabelNode { + type: "TupleTypeAnnotation"; + types: Array<BabelNodeFlowType>; +} + +declare class BabelNodeTypeofTypeAnnotation extends BabelNode { + type: "TypeofTypeAnnotation"; + argument: BabelNodeFlowType; +} + +declare class BabelNodeTypeAlias extends BabelNode { + type: "TypeAlias"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + right: BabelNodeFlowType; +} + +declare class BabelNodeTypeAnnotation extends BabelNode { + type: "TypeAnnotation"; + typeAnnotation: BabelNodeFlowType; +} + +declare class BabelNodeTypeCastExpression extends BabelNode { + type: "TypeCastExpression"; + expression: BabelNodeExpression; + typeAnnotation: BabelNodeTypeAnnotation; +} + +declare class BabelNodeTypeParameter extends BabelNode { + type: "TypeParameter"; + bound?: BabelNodeTypeAnnotation; + variance?: BabelNodeVariance; + name: string; +} + +declare class BabelNodeTypeParameterDeclaration extends BabelNode { + type: "TypeParameterDeclaration"; + params: Array<BabelNodeTypeParameter>; +} + +declare class BabelNodeTypeParameterInstantiation extends BabelNode { + type: "TypeParameterInstantiation"; + params: Array<BabelNodeFlowType>; +} + +declare class BabelNodeUnionTypeAnnotation extends BabelNode { + type: "UnionTypeAnnotation"; + types: Array<BabelNodeFlowType>; +} + +declare class BabelNodeVariance extends BabelNode { + type: "Variance"; + kind: "minus" | "plus"; +} + +declare class BabelNodeVoidTypeAnnotation extends BabelNode { + type: "VoidTypeAnnotation"; +} + +declare class BabelNodeEnumDeclaration extends BabelNode { + type: "EnumDeclaration"; + id: BabelNodeIdentifier; + body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody; +} + +declare class BabelNodeEnumBooleanBody extends BabelNode { + type: "EnumBooleanBody"; + members: Array<BabelNodeEnumBooleanMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} + +declare class BabelNodeEnumNumberBody extends BabelNode { + type: "EnumNumberBody"; + members: Array<BabelNodeEnumNumberMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} + +declare class BabelNodeEnumStringBody extends BabelNode { + type: "EnumStringBody"; + members: Array<BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember>; + explicitType: boolean; + hasUnknownMembers: boolean; +} + +declare class BabelNodeEnumSymbolBody extends BabelNode { + type: "EnumSymbolBody"; + members: Array<BabelNodeEnumDefaultedMember>; + hasUnknownMembers: boolean; +} + +declare class BabelNodeEnumBooleanMember extends BabelNode { + type: "EnumBooleanMember"; + id: BabelNodeIdentifier; + init: BabelNodeBooleanLiteral; +} + +declare class BabelNodeEnumNumberMember extends BabelNode { + type: "EnumNumberMember"; + id: BabelNodeIdentifier; + init: BabelNodeNumericLiteral; +} + +declare class BabelNodeEnumStringMember extends BabelNode { + type: "EnumStringMember"; + id: BabelNodeIdentifier; + init: BabelNodeStringLiteral; +} + +declare class BabelNodeEnumDefaultedMember extends BabelNode { + type: "EnumDefaultedMember"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeIndexedAccessType extends BabelNode { + type: "IndexedAccessType"; + objectType: BabelNodeFlowType; + indexType: BabelNodeFlowType; +} + +declare class BabelNodeOptionalIndexedAccessType extends BabelNode { + type: "OptionalIndexedAccessType"; + objectType: BabelNodeFlowType; + indexType: BabelNodeFlowType; + optional: boolean; +} + +declare class BabelNodeJSXAttribute extends BabelNode { + type: "JSXAttribute"; + name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName; + value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer; +} + +declare class BabelNodeJSXClosingElement extends BabelNode { + type: "JSXClosingElement"; + name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName; +} + +declare class BabelNodeJSXElement extends BabelNode { + type: "JSXElement"; + openingElement: BabelNodeJSXOpeningElement; + closingElement?: BabelNodeJSXClosingElement; + children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>; + selfClosing?: boolean; +} + +declare class BabelNodeJSXEmptyExpression extends BabelNode { + type: "JSXEmptyExpression"; +} + +declare class BabelNodeJSXExpressionContainer extends BabelNode { + type: "JSXExpressionContainer"; + expression: BabelNodeExpression | BabelNodeJSXEmptyExpression; +} + +declare class BabelNodeJSXSpreadChild extends BabelNode { + type: "JSXSpreadChild"; + expression: BabelNodeExpression; +} + +declare class BabelNodeJSXIdentifier extends BabelNode { + type: "JSXIdentifier"; + name: string; +} + +declare class BabelNodeJSXMemberExpression extends BabelNode { + type: "JSXMemberExpression"; + object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier; + property: BabelNodeJSXIdentifier; +} + +declare class BabelNodeJSXNamespacedName extends BabelNode { + type: "JSXNamespacedName"; + namespace: BabelNodeJSXIdentifier; + name: BabelNodeJSXIdentifier; +} + +declare class BabelNodeJSXOpeningElement extends BabelNode { + type: "JSXOpeningElement"; + name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName; + attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>; + selfClosing?: boolean; + typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeJSXSpreadAttribute extends BabelNode { + type: "JSXSpreadAttribute"; + argument: BabelNodeExpression; +} + +declare class BabelNodeJSXText extends BabelNode { + type: "JSXText"; + value: string; +} + +declare class BabelNodeJSXFragment extends BabelNode { + type: "JSXFragment"; + openingFragment: BabelNodeJSXOpeningFragment; + closingFragment: BabelNodeJSXClosingFragment; + children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>; +} + +declare class BabelNodeJSXOpeningFragment extends BabelNode { + type: "JSXOpeningFragment"; +} + +declare class BabelNodeJSXClosingFragment extends BabelNode { + type: "JSXClosingFragment"; +} + +declare class BabelNodeNoop extends BabelNode { + type: "Noop"; +} + +declare class BabelNodePlaceholder extends BabelNode { + type: "Placeholder"; + expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; + name: BabelNodeIdentifier; +} + +declare class BabelNodeV8IntrinsicIdentifier extends BabelNode { + type: "V8IntrinsicIdentifier"; + name: string; +} + +declare class BabelNodeArgumentPlaceholder extends BabelNode { + type: "ArgumentPlaceholder"; +} + +declare class BabelNodeBindExpression extends BabelNode { + type: "BindExpression"; + object: BabelNodeExpression; + callee: BabelNodeExpression; +} + +declare class BabelNodeImportAttribute extends BabelNode { + type: "ImportAttribute"; + key: BabelNodeIdentifier | BabelNodeStringLiteral; + value: BabelNodeStringLiteral; +} + +declare class BabelNodeDecorator extends BabelNode { + type: "Decorator"; + expression: BabelNodeExpression; +} + +declare class BabelNodeDoExpression extends BabelNode { + type: "DoExpression"; + body: BabelNodeBlockStatement; + async?: boolean; +} + +declare class BabelNodeExportDefaultSpecifier extends BabelNode { + type: "ExportDefaultSpecifier"; + exported: BabelNodeIdentifier; +} + +declare class BabelNodeRecordExpression extends BabelNode { + type: "RecordExpression"; + properties: Array<BabelNodeObjectProperty | BabelNodeSpreadElement>; +} + +declare class BabelNodeTupleExpression extends BabelNode { + type: "TupleExpression"; + elements?: Array<BabelNodeExpression | BabelNodeSpreadElement>; +} + +declare class BabelNodeDecimalLiteral extends BabelNode { + type: "DecimalLiteral"; + value: string; +} + +declare class BabelNodeModuleExpression extends BabelNode { + type: "ModuleExpression"; + body: BabelNodeProgram; +} + +declare class BabelNodeTopicReference extends BabelNode { + type: "TopicReference"; +} + +declare class BabelNodePipelineTopicExpression extends BabelNode { + type: "PipelineTopicExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodePipelineBareFunction extends BabelNode { + type: "PipelineBareFunction"; + callee: BabelNodeExpression; +} + +declare class BabelNodePipelinePrimaryTopicReference extends BabelNode { + type: "PipelinePrimaryTopicReference"; +} + +declare class BabelNodeTSParameterProperty extends BabelNode { + type: "TSParameterProperty"; + parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern; + accessibility?: "public" | "private" | "protected"; + decorators?: Array<BabelNodeDecorator>; + override?: boolean; + readonly?: boolean; +} + +declare class BabelNodeTSDeclareFunction extends BabelNode { + type: "TSDeclareFunction"; + id?: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; + params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>; + returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; + async?: boolean; + declare?: boolean; + generator?: boolean; +} + +declare class BabelNodeTSDeclareMethod extends BabelNode { + type: "TSDeclareMethod"; + decorators?: Array<BabelNodeDecorator>; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; + params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>; + returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + async?: boolean; + computed?: boolean; + generator?: boolean; + kind?: "get" | "set" | "method" | "constructor"; + optional?: boolean; + override?: boolean; +} + +declare class BabelNodeTSQualifiedName extends BabelNode { + type: "TSQualifiedName"; + left: BabelNodeTSEntityName; + right: BabelNodeIdentifier; +} + +declare class BabelNodeTSCallSignatureDeclaration extends BabelNode { + type: "TSCallSignatureDeclaration"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode { + type: "TSConstructSignatureDeclaration"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSPropertySignature extends BabelNode { + type: "TSPropertySignature"; + key: BabelNodeExpression; + typeAnnotation?: BabelNodeTSTypeAnnotation; + initializer?: BabelNodeExpression; + computed?: boolean; + kind: "get" | "set"; + optional?: boolean; + readonly?: boolean; +} + +declare class BabelNodeTSMethodSignature extends BabelNode { + type: "TSMethodSignature"; + key: BabelNodeExpression; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>; + typeAnnotation?: BabelNodeTSTypeAnnotation; + computed?: boolean; + kind: "method" | "get" | "set"; + optional?: boolean; +} + +declare class BabelNodeTSIndexSignature extends BabelNode { + type: "TSIndexSignature"; + parameters: Array<BabelNodeIdentifier>; + typeAnnotation?: BabelNodeTSTypeAnnotation; + readonly?: boolean; +} + +declare class BabelNodeTSAnyKeyword extends BabelNode { + type: "TSAnyKeyword"; +} + +declare class BabelNodeTSBooleanKeyword extends BabelNode { + type: "TSBooleanKeyword"; +} + +declare class BabelNodeTSBigIntKeyword extends BabelNode { + type: "TSBigIntKeyword"; +} + +declare class BabelNodeTSIntrinsicKeyword extends BabelNode { + type: "TSIntrinsicKeyword"; +} + +declare class BabelNodeTSNeverKeyword extends BabelNode { + type: "TSNeverKeyword"; +} + +declare class BabelNodeTSNullKeyword extends BabelNode { + type: "TSNullKeyword"; +} + +declare class BabelNodeTSNumberKeyword extends BabelNode { + type: "TSNumberKeyword"; +} + +declare class BabelNodeTSObjectKeyword extends BabelNode { + type: "TSObjectKeyword"; +} + +declare class BabelNodeTSStringKeyword extends BabelNode { + type: "TSStringKeyword"; +} + +declare class BabelNodeTSSymbolKeyword extends BabelNode { + type: "TSSymbolKeyword"; +} + +declare class BabelNodeTSUndefinedKeyword extends BabelNode { + type: "TSUndefinedKeyword"; +} + +declare class BabelNodeTSUnknownKeyword extends BabelNode { + type: "TSUnknownKeyword"; +} + +declare class BabelNodeTSVoidKeyword extends BabelNode { + type: "TSVoidKeyword"; +} + +declare class BabelNodeTSThisType extends BabelNode { + type: "TSThisType"; +} + +declare class BabelNodeTSFunctionType extends BabelNode { + type: "TSFunctionType"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSConstructorType extends BabelNode { + type: "TSConstructorType"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>; + typeAnnotation?: BabelNodeTSTypeAnnotation; + abstract?: boolean; +} + +declare class BabelNodeTSTypeReference extends BabelNode { + type: "TSTypeReference"; + typeName: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSTypePredicate extends BabelNode { + type: "TSTypePredicate"; + parameterName: BabelNodeIdentifier | BabelNodeTSThisType; + typeAnnotation?: BabelNodeTSTypeAnnotation; + asserts?: boolean; +} + +declare class BabelNodeTSTypeQuery extends BabelNode { + type: "TSTypeQuery"; + exprName: BabelNodeTSEntityName | BabelNodeTSImportType; +} + +declare class BabelNodeTSTypeLiteral extends BabelNode { + type: "TSTypeLiteral"; + members: Array<BabelNodeTSTypeElement>; +} + +declare class BabelNodeTSArrayType extends BabelNode { + type: "TSArrayType"; + elementType: BabelNodeTSType; +} + +declare class BabelNodeTSTupleType extends BabelNode { + type: "TSTupleType"; + elementTypes: Array<BabelNodeTSType | BabelNodeTSNamedTupleMember>; +} + +declare class BabelNodeTSOptionalType extends BabelNode { + type: "TSOptionalType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSRestType extends BabelNode { + type: "TSRestType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSNamedTupleMember extends BabelNode { + type: "TSNamedTupleMember"; + label: BabelNodeIdentifier; + elementType: BabelNodeTSType; + optional?: boolean; +} + +declare class BabelNodeTSUnionType extends BabelNode { + type: "TSUnionType"; + types: Array<BabelNodeTSType>; +} + +declare class BabelNodeTSIntersectionType extends BabelNode { + type: "TSIntersectionType"; + types: Array<BabelNodeTSType>; +} + +declare class BabelNodeTSConditionalType extends BabelNode { + type: "TSConditionalType"; + checkType: BabelNodeTSType; + extendsType: BabelNodeTSType; + trueType: BabelNodeTSType; + falseType: BabelNodeTSType; +} + +declare class BabelNodeTSInferType extends BabelNode { + type: "TSInferType"; + typeParameter: BabelNodeTSTypeParameter; +} + +declare class BabelNodeTSParenthesizedType extends BabelNode { + type: "TSParenthesizedType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeOperator extends BabelNode { + type: "TSTypeOperator"; + typeAnnotation: BabelNodeTSType; + operator: string; +} + +declare class BabelNodeTSIndexedAccessType extends BabelNode { + type: "TSIndexedAccessType"; + objectType: BabelNodeTSType; + indexType: BabelNodeTSType; +} + +declare class BabelNodeTSMappedType extends BabelNode { + type: "TSMappedType"; + typeParameter: BabelNodeTSTypeParameter; + typeAnnotation?: BabelNodeTSType; + nameType?: BabelNodeTSType; + optional?: boolean; + readonly?: boolean; +} + +declare class BabelNodeTSLiteralType extends BabelNode { + type: "TSLiteralType"; + literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral | BabelNodeUnaryExpression; +} + +declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode { + type: "TSExpressionWithTypeArguments"; + expression: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSInterfaceDeclaration extends BabelNode { + type: "TSInterfaceDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + body: BabelNodeTSInterfaceBody; + declare?: boolean; +} + +declare class BabelNodeTSInterfaceBody extends BabelNode { + type: "TSInterfaceBody"; + body: Array<BabelNodeTSTypeElement>; +} + +declare class BabelNodeTSTypeAliasDeclaration extends BabelNode { + type: "TSTypeAliasDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + typeAnnotation: BabelNodeTSType; + declare?: boolean; +} + +declare class BabelNodeTSAsExpression extends BabelNode { + type: "TSAsExpression"; + expression: BabelNodeExpression; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeAssertion extends BabelNode { + type: "TSTypeAssertion"; + typeAnnotation: BabelNodeTSType; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSEnumDeclaration extends BabelNode { + type: "TSEnumDeclaration"; + id: BabelNodeIdentifier; + members: Array<BabelNodeTSEnumMember>; + declare?: boolean; + initializer?: BabelNodeExpression; +} + +declare class BabelNodeTSEnumMember extends BabelNode { + type: "TSEnumMember"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + initializer?: BabelNodeExpression; +} + +declare class BabelNodeTSModuleDeclaration extends BabelNode { + type: "TSModuleDeclaration"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration; + declare?: boolean; + global?: boolean; +} + +declare class BabelNodeTSModuleBlock extends BabelNode { + type: "TSModuleBlock"; + body: Array<BabelNodeStatement>; +} + +declare class BabelNodeTSImportType extends BabelNode { + type: "TSImportType"; + argument: BabelNodeStringLiteral; + qualifier?: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSImportEqualsDeclaration extends BabelNode { + type: "TSImportEqualsDeclaration"; + id: BabelNodeIdentifier; + moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference; + importKind?: "type" | "value"; + isExport: boolean; +} + +declare class BabelNodeTSExternalModuleReference extends BabelNode { + type: "TSExternalModuleReference"; + expression: BabelNodeStringLiteral; +} + +declare class BabelNodeTSNonNullExpression extends BabelNode { + type: "TSNonNullExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSExportAssignment extends BabelNode { + type: "TSExportAssignment"; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode { + type: "TSNamespaceExportDeclaration"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeTSTypeAnnotation extends BabelNode { + type: "TSTypeAnnotation"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeParameterInstantiation extends BabelNode { + type: "TSTypeParameterInstantiation"; + params: Array<BabelNodeTSType>; +} + +declare class BabelNodeTSTypeParameterDeclaration extends BabelNode { + type: "TSTypeParameterDeclaration"; + params: Array<BabelNodeTSTypeParameter>; +} + +declare class BabelNodeTSTypeParameter extends BabelNode { + type: "TSTypeParameter"; + constraint?: BabelNodeTSType; + name: string; +} + +type BabelNodeStandardized = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeInterpreterDirective | BabelNodeDirective | BabelNodeDirectiveLiteral | BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeCallExpression | BabelNodeCatchClause | BabelNodeConditionalExpression | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeFile | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeProgram | BabelNodeObjectExpression | BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeRestElement | BabelNodeReturnStatement | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeSwitchCase | BabelNodeSwitchStatement | BabelNodeThisExpression | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeVariableDeclaration | BabelNodeVariableDeclarator | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeArrowFunctionExpression | BabelNodeClassBody | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeExportSpecifier | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeMetaProperty | BabelNodeClassMethod | BabelNodeObjectPattern | BabelNodeSpreadElement | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateElement | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeAwaitExpression | BabelNodeImport | BabelNodeBigIntLiteral | BabelNodeExportNamespaceSpecifier | BabelNodeOptionalMemberExpression | BabelNodeOptionalCallExpression | BabelNodeClassProperty | BabelNodeClassAccessorProperty | BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName | BabelNodeStaticBlock; +type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeAwaitExpression | BabelNodeImport | BabelNodeBigIntLiteral | BabelNodeOptionalMemberExpression | BabelNodeOptionalCallExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeBindExpression | BabelNodeDoExpression | BabelNodeRecordExpression | BabelNodeTupleExpression | BabelNodeDecimalLiteral | BabelNodeModuleExpression | BabelNodeTopicReference | BabelNodePipelineTopicExpression | BabelNodePipelineBareFunction | BabelNodePipelinePrimaryTopicReference | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression; +type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression; +type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeStaticBlock | BabelNodeTSModuleBlock; +type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeStaticBlock | BabelNodeTSModuleBlock; +type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock; +type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration; +type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression; +type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement; +type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement; +type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement; +type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement; +type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression; +type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement; +type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement; +type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeStaticBlock; +type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeArrowFunctionExpression | BabelNodeBigIntLiteral | BabelNodeDecimalLiteral; +type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration; +type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; +type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty; +type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName; +type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral | BabelNodeDecimalLiteral; +type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeDecimalLiteral; +type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty; +type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty; +type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassAccessorProperty | BabelNodeClassPrivateProperty; +type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement; +type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; +type BabelNodeClass = BabelNodeClassExpression | BabelNodeClassDeclaration; +type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration; +type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration; +type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportNamespaceSpecifier | BabelNodeExportDefaultSpecifier; +type BabelNodeAccessor = BabelNodeClassAccessorProperty; +type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName; +type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation | BabelNodeEnumDeclaration | BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody | BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember | BabelNodeIndexedAccessType | BabelNodeOptionalIndexedAccessType; +type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation | BabelNodeIndexedAccessType | BabelNodeOptionalIndexedAccessType; +type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation; +type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias; +type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate; +type BabelNodeEnumBody = BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody; +type BabelNodeEnumMember = BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember; +type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment; +type BabelNodeMiscellaneous = BabelNodeNoop | BabelNodePlaceholder | BabelNodeV8IntrinsicIdentifier; +type BabelNodeTypeScript = BabelNodeTSParameterProperty | BabelNodeTSDeclareFunction | BabelNodeTSDeclareMethod | BabelNodeTSQualifiedName | BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature | BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSIntrinsicKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSNamedTupleMember | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSInterfaceDeclaration | BabelNodeTSInterfaceBody | BabelNodeTSTypeAliasDeclaration | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSEnumDeclaration | BabelNodeTSEnumMember | BabelNodeTSModuleDeclaration | BabelNodeTSModuleBlock | BabelNodeTSImportType | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExternalModuleReference | BabelNodeTSNonNullExpression | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration | BabelNodeTSTypeAnnotation | BabelNodeTSTypeParameterInstantiation | BabelNodeTSTypeParameterDeclaration | BabelNodeTSTypeParameter; +type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature; +type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSIntrinsicKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType; +type BabelNodeTSBaseType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSIntrinsicKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSLiteralType; + +declare module "@babel/types" { + declare export function arrayExpression(elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeArrayExpression; + declare export function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression; + declare export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression | BabelNodePrivateName, right: BabelNodeExpression): BabelNodeBinaryExpression; + declare export function interpreterDirective(value: string): BabelNodeInterpreterDirective; + declare export function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective; + declare export function directiveLiteral(value: string): BabelNodeDirectiveLiteral; + declare export function blockStatement(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>): BabelNodeBlockStatement; + declare export function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement; + declare export function callExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeCallExpression; + declare export function catchClause(param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern, body: BabelNodeBlockStatement): BabelNodeCatchClause; + declare export function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression; + declare export function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement; + declare export function debuggerStatement(): BabelNodeDebuggerStatement; + declare export function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement; + declare export function emptyStatement(): BabelNodeEmptyStatement; + declare export function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement; + declare export function file(program: BabelNodeProgram, comments?: Array<BabelNodeCommentBlock | BabelNodeCommentLine>, tokens?: Array<any>): BabelNodeFile; + declare export function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement; + declare export function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement; + declare export function functionDeclaration(id?: BabelNodeIdentifier, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionDeclaration; + declare export function functionExpression(id?: BabelNodeIdentifier, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionExpression; + declare export function identifier(name: string): BabelNodeIdentifier; + declare export function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement; + declare export function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement; + declare export function stringLiteral(value: string): BabelNodeStringLiteral; + declare export function numericLiteral(value: number): BabelNodeNumericLiteral; + declare export function nullLiteral(): BabelNodeNullLiteral; + declare export function booleanLiteral(value: boolean): BabelNodeBooleanLiteral; + declare export function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral; + declare export function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression; + declare export function memberExpression(object: BabelNodeExpression, property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName, computed?: boolean, optional?: true | false): BabelNodeMemberExpression; + declare export function newExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeNewExpression; + declare export function program(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective): BabelNodeProgram; + declare export function objectExpression(properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeObjectExpression; + declare export function objectMethod(kind?: "method" | "get" | "set", key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, body: BabelNodeBlockStatement, computed?: boolean, generator?: boolean, async?: boolean): BabelNodeObjectMethod; + declare export function objectProperty(key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<BabelNodeDecorator>): BabelNodeObjectProperty; + declare export function restElement(argument: BabelNodeLVal): BabelNodeRestElement; + declare export function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement; + declare export function sequenceExpression(expressions: Array<BabelNodeExpression>): BabelNodeSequenceExpression; + declare export function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression; + declare export function switchCase(test?: BabelNodeExpression, consequent: Array<BabelNodeStatement>): BabelNodeSwitchCase; + declare export function switchStatement(discriminant: BabelNodeExpression, cases: Array<BabelNodeSwitchCase>): BabelNodeSwitchStatement; + declare export function thisExpression(): BabelNodeThisExpression; + declare export function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement; + declare export function tryStatement(block: BabelNodeBlockStatement, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement; + declare export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression; + declare export function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression; + declare export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<BabelNodeVariableDeclarator>): BabelNodeVariableDeclaration; + declare export function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression): BabelNodeVariableDeclarator; + declare export function whileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWhileStatement; + declare export function withStatement(object: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWithStatement; + declare export function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression): BabelNodeAssignmentPattern; + declare export function arrayPattern(elements: Array<null | BabelNodePatternLike>): BabelNodeArrayPattern; + declare export function arrowFunctionExpression(params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean): BabelNodeArrowFunctionExpression; + declare export function classBody(body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeClassAccessorProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature | BabelNodeStaticBlock>): BabelNodeClassBody; + declare export function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array<BabelNodeDecorator>): BabelNodeClassExpression; + declare export function classDeclaration(id: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array<BabelNodeDecorator>): BabelNodeClassDeclaration; + declare export function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration; + declare export function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration; + declare export function exportNamedDeclaration(declaration?: BabelNodeDeclaration, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral): BabelNodeExportNamedDeclaration; + declare export function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier | BabelNodeStringLiteral): BabelNodeExportSpecifier; + declare export function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement; + declare export function importDeclaration(specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>, source: BabelNodeStringLiteral): BabelNodeImportDeclaration; + declare export function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier; + declare export function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier; + declare export function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier | BabelNodeStringLiteral): BabelNodeImportSpecifier; + declare export function metaProperty(meta: BabelNodeIdentifier, property: BabelNodeIdentifier): BabelNodeMetaProperty; + declare export function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): BabelNodeClassMethod; + declare export function objectPattern(properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>): BabelNodeObjectPattern; + declare export function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement; + declare function _super(): BabelNodeSuper; + declare export { _super as super } + declare export function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral): BabelNodeTaggedTemplateExpression; + declare export function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): BabelNodeTemplateElement; + declare export function templateLiteral(quasis: Array<BabelNodeTemplateElement>, expressions: Array<BabelNodeExpression | BabelNodeTSType>): BabelNodeTemplateLiteral; + declare export function yieldExpression(argument?: BabelNodeExpression, delegate?: boolean): BabelNodeYieldExpression; + declare export function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression; + declare function _import(): BabelNodeImport; + declare export { _import as import } + declare export function bigIntLiteral(value: string): BabelNodeBigIntLiteral; + declare export function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier; + declare export function optionalMemberExpression(object: BabelNodeExpression, property: BabelNodeExpression | BabelNodeIdentifier, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression; + declare export function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>, optional: boolean): BabelNodeOptionalCallExpression; + declare export function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array<BabelNodeDecorator>, computed?: boolean, _static?: boolean): BabelNodeClassProperty; + declare export function classAccessorProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression | BabelNodePrivateName, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array<BabelNodeDecorator>, computed?: boolean, _static?: boolean): BabelNodeClassAccessorProperty; + declare export function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression, decorators?: Array<BabelNodeDecorator>, _static: any): BabelNodeClassPrivateProperty; + declare export function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, _static?: boolean): BabelNodeClassPrivateMethod; + declare export function privateName(id: BabelNodeIdentifier): BabelNodePrivateName; + declare export function staticBlock(body: Array<BabelNodeStatement>): BabelNodeStaticBlock; + declare export function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation; + declare export function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation; + declare export function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation; + declare export function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation; + declare export function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation; + declare export function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements; + declare export function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareClass; + declare export function declareFunction(id: BabelNodeIdentifier): BabelNodeDeclareFunction; + declare export function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareInterface; + declare export function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule; + declare export function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports; + declare export function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias; + declare export function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType; + declare export function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable; + declare export function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral): BabelNodeDeclareExportDeclaration; + declare export function declareExportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeDeclareExportAllDeclaration; + declare export function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate; + declare export function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation; + declare export function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array<BabelNodeFunctionTypeParam>, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation; + declare export function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType): BabelNodeFunctionTypeParam; + declare export function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation; + declare export function inferredPredicate(): BabelNodeInferredPredicate; + declare export function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends; + declare export function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceDeclaration; + declare export function interfaceTypeAnnotation(_extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation; + declare export function intersectionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeIntersectionTypeAnnotation; + declare export function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation; + declare export function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation; + declare export function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation; + declare export function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation; + declare export function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation; + declare export function objectTypeAnnotation(properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>, indexers?: Array<BabelNodeObjectTypeIndexer>, callProperties?: Array<BabelNodeObjectTypeCallProperty>, internalSlots?: Array<BabelNodeObjectTypeInternalSlot>, exact?: boolean): BabelNodeObjectTypeAnnotation; + declare export function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot; + declare export function objectTypeCallProperty(value: BabelNodeFlowType): BabelNodeObjectTypeCallProperty; + declare export function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeIndexer; + declare export function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeProperty; + declare export function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty; + declare export function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType; + declare export function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier; + declare export function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation; + declare export function stringTypeAnnotation(): BabelNodeStringTypeAnnotation; + declare export function symbolTypeAnnotation(): BabelNodeSymbolTypeAnnotation; + declare export function thisTypeAnnotation(): BabelNodeThisTypeAnnotation; + declare export function tupleTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeTupleTypeAnnotation; + declare export function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation; + declare export function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias; + declare export function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation; + declare export function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression; + declare export function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeTypeParameter; + declare export function typeParameterDeclaration(params: Array<BabelNodeTypeParameter>): BabelNodeTypeParameterDeclaration; + declare export function typeParameterInstantiation(params: Array<BabelNodeFlowType>): BabelNodeTypeParameterInstantiation; + declare export function unionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation; + declare export function variance(kind: "minus" | "plus"): BabelNodeVariance; + declare export function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation; + declare export function enumDeclaration(id: BabelNodeIdentifier, body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody): BabelNodeEnumDeclaration; + declare export function enumBooleanBody(members: Array<BabelNodeEnumBooleanMember>): BabelNodeEnumBooleanBody; + declare export function enumNumberBody(members: Array<BabelNodeEnumNumberMember>): BabelNodeEnumNumberBody; + declare export function enumStringBody(members: Array<BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember>): BabelNodeEnumStringBody; + declare export function enumSymbolBody(members: Array<BabelNodeEnumDefaultedMember>): BabelNodeEnumSymbolBody; + declare export function enumBooleanMember(id: BabelNodeIdentifier): BabelNodeEnumBooleanMember; + declare export function enumNumberMember(id: BabelNodeIdentifier, init: BabelNodeNumericLiteral): BabelNodeEnumNumberMember; + declare export function enumStringMember(id: BabelNodeIdentifier, init: BabelNodeStringLiteral): BabelNodeEnumStringMember; + declare export function enumDefaultedMember(id: BabelNodeIdentifier): BabelNodeEnumDefaultedMember; + declare export function indexedAccessType(objectType: BabelNodeFlowType, indexType: BabelNodeFlowType): BabelNodeIndexedAccessType; + declare export function optionalIndexedAccessType(objectType: BabelNodeFlowType, indexType: BabelNodeFlowType): BabelNodeOptionalIndexedAccessType; + declare export function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute; + declare export function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName): BabelNodeJSXClosingElement; + declare export function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>, selfClosing?: boolean): BabelNodeJSXElement; + declare export function jsxEmptyExpression(): BabelNodeJSXEmptyExpression; + declare export function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer; + declare export function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild; + declare export function jsxIdentifier(name: string): BabelNodeJSXIdentifier; + declare export function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression; + declare export function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName; + declare export function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName, attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>, selfClosing?: boolean): BabelNodeJSXOpeningElement; + declare export function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute; + declare export function jsxText(value: string): BabelNodeJSXText; + declare export function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>): BabelNodeJSXFragment; + declare export function jsxOpeningFragment(): BabelNodeJSXOpeningFragment; + declare export function jsxClosingFragment(): BabelNodeJSXClosingFragment; + declare export function noop(): BabelNodeNoop; + declare export function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder; + declare export function v8IntrinsicIdentifier(name: string): BabelNodeV8IntrinsicIdentifier; + declare export function argumentPlaceholder(): BabelNodeArgumentPlaceholder; + declare export function bindExpression(object: BabelNodeExpression, callee: BabelNodeExpression): BabelNodeBindExpression; + declare export function importAttribute(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeStringLiteral): BabelNodeImportAttribute; + declare export function decorator(expression: BabelNodeExpression): BabelNodeDecorator; + declare export function doExpression(body: BabelNodeBlockStatement, async?: boolean): BabelNodeDoExpression; + declare export function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier; + declare export function recordExpression(properties: Array<BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeRecordExpression; + declare export function tupleExpression(elements?: Array<BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeTupleExpression; + declare export function decimalLiteral(value: string): BabelNodeDecimalLiteral; + declare export function moduleExpression(body: BabelNodeProgram): BabelNodeModuleExpression; + declare export function topicReference(): BabelNodeTopicReference; + declare export function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression; + declare export function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction; + declare export function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference; + declare export function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern): BabelNodeTSParameterProperty; + declare export function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareFunction; + declare export function tsDeclareMethod(decorators?: Array<BabelNodeDecorator>, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareMethod; + declare export function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName; + declare export function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration; + declare export function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration; + declare export function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression): BabelNodeTSPropertySignature; + declare export function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSMethodSignature; + declare export function tsIndexSignature(parameters: Array<BabelNodeIdentifier>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSIndexSignature; + declare export function tsAnyKeyword(): BabelNodeTSAnyKeyword; + declare export function tsBooleanKeyword(): BabelNodeTSBooleanKeyword; + declare export function tsBigIntKeyword(): BabelNodeTSBigIntKeyword; + declare export function tsIntrinsicKeyword(): BabelNodeTSIntrinsicKeyword; + declare export function tsNeverKeyword(): BabelNodeTSNeverKeyword; + declare export function tsNullKeyword(): BabelNodeTSNullKeyword; + declare export function tsNumberKeyword(): BabelNodeTSNumberKeyword; + declare export function tsObjectKeyword(): BabelNodeTSObjectKeyword; + declare export function tsStringKeyword(): BabelNodeTSStringKeyword; + declare export function tsSymbolKeyword(): BabelNodeTSSymbolKeyword; + declare export function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword; + declare export function tsUnknownKeyword(): BabelNodeTSUnknownKeyword; + declare export function tsVoidKeyword(): BabelNodeTSVoidKeyword; + declare export function tsThisType(): BabelNodeTSThisType; + declare export function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType; + declare export function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType; + declare export function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference; + declare export function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation?: BabelNodeTSTypeAnnotation, asserts?: boolean): BabelNodeTSTypePredicate; + declare export function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery; + declare export function tsTypeLiteral(members: Array<BabelNodeTSTypeElement>): BabelNodeTSTypeLiteral; + declare export function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType; + declare export function tsTupleType(elementTypes: Array<BabelNodeTSType | BabelNodeTSNamedTupleMember>): BabelNodeTSTupleType; + declare export function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType; + declare export function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType; + declare export function tsNamedTupleMember(label: BabelNodeIdentifier, elementType: BabelNodeTSType, optional?: boolean): BabelNodeTSNamedTupleMember; + declare export function tsUnionType(types: Array<BabelNodeTSType>): BabelNodeTSUnionType; + declare export function tsIntersectionType(types: Array<BabelNodeTSType>): BabelNodeTSIntersectionType; + declare export function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType; + declare export function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType; + declare export function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType; + declare export function tsTypeOperator(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeOperator; + declare export function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType; + declare export function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType, nameType?: BabelNodeTSType): BabelNodeTSMappedType; + declare export function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral | BabelNodeUnaryExpression): BabelNodeTSLiteralType; + declare export function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments; + declare export function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array<BabelNodeTSExpressionWithTypeArguments>, body: BabelNodeTSInterfaceBody): BabelNodeTSInterfaceDeclaration; + declare export function tsInterfaceBody(body: Array<BabelNodeTSTypeElement>): BabelNodeTSInterfaceBody; + declare export function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAliasDeclaration; + declare export function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression; + declare export function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion; + declare export function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array<BabelNodeTSEnumMember>): BabelNodeTSEnumDeclaration; + declare export function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember; + declare export function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration): BabelNodeTSModuleDeclaration; + declare export function tsModuleBlock(body: Array<BabelNodeStatement>): BabelNodeTSModuleBlock; + declare export function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType; + declare export function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference): BabelNodeTSImportEqualsDeclaration; + declare export function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference; + declare export function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression; + declare export function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment; + declare export function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration; + declare export function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation; + declare export function tsTypeParameterInstantiation(params: Array<BabelNodeTSType>): BabelNodeTSTypeParameterInstantiation; + declare export function tsTypeParameterDeclaration(params: Array<BabelNodeTSTypeParameter>): BabelNodeTSTypeParameterDeclaration; + declare export function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name: string): BabelNodeTSTypeParameter; + declare export function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression) + declare export function assertArrayExpression(node: ?Object, opts?: ?Object): void + declare export function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression) + declare export function assertAssignmentExpression(node: ?Object, opts?: ?Object): void + declare export function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression) + declare export function assertBinaryExpression(node: ?Object, opts?: ?Object): void + declare export function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective) + declare export function assertInterpreterDirective(node: ?Object, opts?: ?Object): void + declare export function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective) + declare export function assertDirective(node: ?Object, opts?: ?Object): void + declare export function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral) + declare export function assertDirectiveLiteral(node: ?Object, opts?: ?Object): void + declare export function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement) + declare export function assertBlockStatement(node: ?Object, opts?: ?Object): void + declare export function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement) + declare export function assertBreakStatement(node: ?Object, opts?: ?Object): void + declare export function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression) + declare export function assertCallExpression(node: ?Object, opts?: ?Object): void + declare export function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause) + declare export function assertCatchClause(node: ?Object, opts?: ?Object): void + declare export function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression) + declare export function assertConditionalExpression(node: ?Object, opts?: ?Object): void + declare export function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement) + declare export function assertContinueStatement(node: ?Object, opts?: ?Object): void + declare export function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement) + declare export function assertDebuggerStatement(node: ?Object, opts?: ?Object): void + declare export function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement) + declare export function assertDoWhileStatement(node: ?Object, opts?: ?Object): void + declare export function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement) + declare export function assertEmptyStatement(node: ?Object, opts?: ?Object): void + declare export function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement) + declare export function assertExpressionStatement(node: ?Object, opts?: ?Object): void + declare export function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile) + declare export function assertFile(node: ?Object, opts?: ?Object): void + declare export function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement) + declare export function assertForInStatement(node: ?Object, opts?: ?Object): void + declare export function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement) + declare export function assertForStatement(node: ?Object, opts?: ?Object): void + declare export function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration) + declare export function assertFunctionDeclaration(node: ?Object, opts?: ?Object): void + declare export function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression) + declare export function assertFunctionExpression(node: ?Object, opts?: ?Object): void + declare export function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier) + declare export function assertIdentifier(node: ?Object, opts?: ?Object): void + declare export function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement) + declare export function assertIfStatement(node: ?Object, opts?: ?Object): void + declare export function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement) + declare export function assertLabeledStatement(node: ?Object, opts?: ?Object): void + declare export function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral) + declare export function assertStringLiteral(node: ?Object, opts?: ?Object): void + declare export function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral) + declare export function assertNumericLiteral(node: ?Object, opts?: ?Object): void + declare export function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral) + declare export function assertNullLiteral(node: ?Object, opts?: ?Object): void + declare export function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral) + declare export function assertBooleanLiteral(node: ?Object, opts?: ?Object): void + declare export function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral) + declare export function assertRegExpLiteral(node: ?Object, opts?: ?Object): void + declare export function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression) + declare export function assertLogicalExpression(node: ?Object, opts?: ?Object): void + declare export function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression) + declare export function assertMemberExpression(node: ?Object, opts?: ?Object): void + declare export function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression) + declare export function assertNewExpression(node: ?Object, opts?: ?Object): void + declare export function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram) + declare export function assertProgram(node: ?Object, opts?: ?Object): void + declare export function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression) + declare export function assertObjectExpression(node: ?Object, opts?: ?Object): void + declare export function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod) + declare export function assertObjectMethod(node: ?Object, opts?: ?Object): void + declare export function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty) + declare export function assertObjectProperty(node: ?Object, opts?: ?Object): void + declare export function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement) + declare export function assertRestElement(node: ?Object, opts?: ?Object): void + declare export function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement) + declare export function assertReturnStatement(node: ?Object, opts?: ?Object): void + declare export function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression) + declare export function assertSequenceExpression(node: ?Object, opts?: ?Object): void + declare export function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression) + declare export function assertParenthesizedExpression(node: ?Object, opts?: ?Object): void + declare export function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase) + declare export function assertSwitchCase(node: ?Object, opts?: ?Object): void + declare export function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement) + declare export function assertSwitchStatement(node: ?Object, opts?: ?Object): void + declare export function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression) + declare export function assertThisExpression(node: ?Object, opts?: ?Object): void + declare export function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement) + declare export function assertThrowStatement(node: ?Object, opts?: ?Object): void + declare export function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement) + declare export function assertTryStatement(node: ?Object, opts?: ?Object): void + declare export function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression) + declare export function assertUnaryExpression(node: ?Object, opts?: ?Object): void + declare export function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression) + declare export function assertUpdateExpression(node: ?Object, opts?: ?Object): void + declare export function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration) + declare export function assertVariableDeclaration(node: ?Object, opts?: ?Object): void + declare export function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator) + declare export function assertVariableDeclarator(node: ?Object, opts?: ?Object): void + declare export function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement) + declare export function assertWhileStatement(node: ?Object, opts?: ?Object): void + declare export function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement) + declare export function assertWithStatement(node: ?Object, opts?: ?Object): void + declare export function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern) + declare export function assertAssignmentPattern(node: ?Object, opts?: ?Object): void + declare export function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern) + declare export function assertArrayPattern(node: ?Object, opts?: ?Object): void + declare export function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression) + declare export function assertArrowFunctionExpression(node: ?Object, opts?: ?Object): void + declare export function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody) + declare export function assertClassBody(node: ?Object, opts?: ?Object): void + declare export function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression) + declare export function assertClassExpression(node: ?Object, opts?: ?Object): void + declare export function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration) + declare export function assertClassDeclaration(node: ?Object, opts?: ?Object): void + declare export function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration) + declare export function assertExportAllDeclaration(node: ?Object, opts?: ?Object): void + declare export function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration) + declare export function assertExportDefaultDeclaration(node: ?Object, opts?: ?Object): void + declare export function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration) + declare export function assertExportNamedDeclaration(node: ?Object, opts?: ?Object): void + declare export function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier) + declare export function assertExportSpecifier(node: ?Object, opts?: ?Object): void + declare export function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement) + declare export function assertForOfStatement(node: ?Object, opts?: ?Object): void + declare export function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration) + declare export function assertImportDeclaration(node: ?Object, opts?: ?Object): void + declare export function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier) + declare export function assertImportDefaultSpecifier(node: ?Object, opts?: ?Object): void + declare export function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier) + declare export function assertImportNamespaceSpecifier(node: ?Object, opts?: ?Object): void + declare export function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier) + declare export function assertImportSpecifier(node: ?Object, opts?: ?Object): void + declare export function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty) + declare export function assertMetaProperty(node: ?Object, opts?: ?Object): void + declare export function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod) + declare export function assertClassMethod(node: ?Object, opts?: ?Object): void + declare export function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern) + declare export function assertObjectPattern(node: ?Object, opts?: ?Object): void + declare export function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement) + declare export function assertSpreadElement(node: ?Object, opts?: ?Object): void + declare export function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper) + declare export function assertSuper(node: ?Object, opts?: ?Object): void + declare export function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression) + declare export function assertTaggedTemplateExpression(node: ?Object, opts?: ?Object): void + declare export function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement) + declare export function assertTemplateElement(node: ?Object, opts?: ?Object): void + declare export function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral) + declare export function assertTemplateLiteral(node: ?Object, opts?: ?Object): void + declare export function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression) + declare export function assertYieldExpression(node: ?Object, opts?: ?Object): void + declare export function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression) + declare export function assertAwaitExpression(node: ?Object, opts?: ?Object): void + declare export function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport) + declare export function assertImport(node: ?Object, opts?: ?Object): void + declare export function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral) + declare export function assertBigIntLiteral(node: ?Object, opts?: ?Object): void + declare export function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier) + declare export function assertExportNamespaceSpecifier(node: ?Object, opts?: ?Object): void + declare export function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression) + declare export function assertOptionalMemberExpression(node: ?Object, opts?: ?Object): void + declare export function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression) + declare export function assertOptionalCallExpression(node: ?Object, opts?: ?Object): void + declare export function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty) + declare export function assertClassProperty(node: ?Object, opts?: ?Object): void + declare export function isClassAccessorProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassAccessorProperty) + declare export function assertClassAccessorProperty(node: ?Object, opts?: ?Object): void + declare export function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty) + declare export function assertClassPrivateProperty(node: ?Object, opts?: ?Object): void + declare export function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod) + declare export function assertClassPrivateMethod(node: ?Object, opts?: ?Object): void + declare export function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName) + declare export function assertPrivateName(node: ?Object, opts?: ?Object): void + declare export function isStaticBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStaticBlock) + declare export function assertStaticBlock(node: ?Object, opts?: ?Object): void + declare export function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation) + declare export function assertAnyTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation) + declare export function assertArrayTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation) + declare export function assertBooleanTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation) + declare export function assertBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation) + declare export function assertNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements) + declare export function assertClassImplements(node: ?Object, opts?: ?Object): void + declare export function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass) + declare export function assertDeclareClass(node: ?Object, opts?: ?Object): void + declare export function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction) + declare export function assertDeclareFunction(node: ?Object, opts?: ?Object): void + declare export function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface) + declare export function assertDeclareInterface(node: ?Object, opts?: ?Object): void + declare export function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule) + declare export function assertDeclareModule(node: ?Object, opts?: ?Object): void + declare export function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports) + declare export function assertDeclareModuleExports(node: ?Object, opts?: ?Object): void + declare export function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias) + declare export function assertDeclareTypeAlias(node: ?Object, opts?: ?Object): void + declare export function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType) + declare export function assertDeclareOpaqueType(node: ?Object, opts?: ?Object): void + declare export function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable) + declare export function assertDeclareVariable(node: ?Object, opts?: ?Object): void + declare export function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration) + declare export function assertDeclareExportDeclaration(node: ?Object, opts?: ?Object): void + declare export function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration) + declare export function assertDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): void + declare export function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate) + declare export function assertDeclaredPredicate(node: ?Object, opts?: ?Object): void + declare export function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation) + declare export function assertExistsTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation) + declare export function assertFunctionTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam) + declare export function assertFunctionTypeParam(node: ?Object, opts?: ?Object): void + declare export function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation) + declare export function assertGenericTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate) + declare export function assertInferredPredicate(node: ?Object, opts?: ?Object): void + declare export function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends) + declare export function assertInterfaceExtends(node: ?Object, opts?: ?Object): void + declare export function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration) + declare export function assertInterfaceDeclaration(node: ?Object, opts?: ?Object): void + declare export function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation) + declare export function assertInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation) + declare export function assertIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation) + declare export function assertMixedTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation) + declare export function assertEmptyTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation) + declare export function assertNullableTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation) + declare export function assertNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation) + declare export function assertNumberTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation) + declare export function assertObjectTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot) + declare export function assertObjectTypeInternalSlot(node: ?Object, opts?: ?Object): void + declare export function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty) + declare export function assertObjectTypeCallProperty(node: ?Object, opts?: ?Object): void + declare export function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer) + declare export function assertObjectTypeIndexer(node: ?Object, opts?: ?Object): void + declare export function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty) + declare export function assertObjectTypeProperty(node: ?Object, opts?: ?Object): void + declare export function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty) + declare export function assertObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): void + declare export function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType) + declare export function assertOpaqueType(node: ?Object, opts?: ?Object): void + declare export function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier) + declare export function assertQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): void + declare export function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation) + declare export function assertStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation) + declare export function assertStringTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isSymbolTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSymbolTypeAnnotation) + declare export function assertSymbolTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation) + declare export function assertThisTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation) + declare export function assertTupleTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation) + declare export function assertTypeofTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias) + declare export function assertTypeAlias(node: ?Object, opts?: ?Object): void + declare export function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation) + declare export function assertTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression) + declare export function assertTypeCastExpression(node: ?Object, opts?: ?Object): void + declare export function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter) + declare export function assertTypeParameter(node: ?Object, opts?: ?Object): void + declare export function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration) + declare export function assertTypeParameterDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation) + declare export function assertTypeParameterInstantiation(node: ?Object, opts?: ?Object): void + declare export function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation) + declare export function assertUnionTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance) + declare export function assertVariance(node: ?Object, opts?: ?Object): void + declare export function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation) + declare export function assertVoidTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDeclaration) + declare export function assertEnumDeclaration(node: ?Object, opts?: ?Object): void + declare export function isEnumBooleanBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanBody) + declare export function assertEnumBooleanBody(node: ?Object, opts?: ?Object): void + declare export function isEnumNumberBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberBody) + declare export function assertEnumNumberBody(node: ?Object, opts?: ?Object): void + declare export function isEnumStringBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringBody) + declare export function assertEnumStringBody(node: ?Object, opts?: ?Object): void + declare export function isEnumSymbolBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumSymbolBody) + declare export function assertEnumSymbolBody(node: ?Object, opts?: ?Object): void + declare export function isEnumBooleanMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanMember) + declare export function assertEnumBooleanMember(node: ?Object, opts?: ?Object): void + declare export function isEnumNumberMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberMember) + declare export function assertEnumNumberMember(node: ?Object, opts?: ?Object): void + declare export function isEnumStringMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringMember) + declare export function assertEnumStringMember(node: ?Object, opts?: ?Object): void + declare export function isEnumDefaultedMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDefaultedMember) + declare export function assertEnumDefaultedMember(node: ?Object, opts?: ?Object): void + declare export function isIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIndexedAccessType) + declare export function assertIndexedAccessType(node: ?Object, opts?: ?Object): void + declare export function isOptionalIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalIndexedAccessType) + declare export function assertOptionalIndexedAccessType(node: ?Object, opts?: ?Object): void + declare export function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute) + declare export function assertJSXAttribute(node: ?Object, opts?: ?Object): void + declare export function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement) + declare export function assertJSXClosingElement(node: ?Object, opts?: ?Object): void + declare export function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement) + declare export function assertJSXElement(node: ?Object, opts?: ?Object): void + declare export function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression) + declare export function assertJSXEmptyExpression(node: ?Object, opts?: ?Object): void + declare export function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer) + declare export function assertJSXExpressionContainer(node: ?Object, opts?: ?Object): void + declare export function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild) + declare export function assertJSXSpreadChild(node: ?Object, opts?: ?Object): void + declare export function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier) + declare export function assertJSXIdentifier(node: ?Object, opts?: ?Object): void + declare export function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression) + declare export function assertJSXMemberExpression(node: ?Object, opts?: ?Object): void + declare export function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName) + declare export function assertJSXNamespacedName(node: ?Object, opts?: ?Object): void + declare export function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement) + declare export function assertJSXOpeningElement(node: ?Object, opts?: ?Object): void + declare export function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute) + declare export function assertJSXSpreadAttribute(node: ?Object, opts?: ?Object): void + declare export function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText) + declare export function assertJSXText(node: ?Object, opts?: ?Object): void + declare export function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment) + declare export function assertJSXFragment(node: ?Object, opts?: ?Object): void + declare export function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment) + declare export function assertJSXOpeningFragment(node: ?Object, opts?: ?Object): void + declare export function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment) + declare export function assertJSXClosingFragment(node: ?Object, opts?: ?Object): void + declare export function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop) + declare export function assertNoop(node: ?Object, opts?: ?Object): void + declare export function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder) + declare export function assertPlaceholder(node: ?Object, opts?: ?Object): void + declare export function isV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeV8IntrinsicIdentifier) + declare export function assertV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): void + declare export function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder) + declare export function assertArgumentPlaceholder(node: ?Object, opts?: ?Object): void + declare export function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression) + declare export function assertBindExpression(node: ?Object, opts?: ?Object): void + declare export function isImportAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportAttribute) + declare export function assertImportAttribute(node: ?Object, opts?: ?Object): void + declare export function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator) + declare export function assertDecorator(node: ?Object, opts?: ?Object): void + declare export function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression) + declare export function assertDoExpression(node: ?Object, opts?: ?Object): void + declare export function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier) + declare export function assertExportDefaultSpecifier(node: ?Object, opts?: ?Object): void + declare export function isRecordExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRecordExpression) + declare export function assertRecordExpression(node: ?Object, opts?: ?Object): void + declare export function isTupleExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleExpression) + declare export function assertTupleExpression(node: ?Object, opts?: ?Object): void + declare export function isDecimalLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecimalLiteral) + declare export function assertDecimalLiteral(node: ?Object, opts?: ?Object): void + declare export function isModuleExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeModuleExpression) + declare export function assertModuleExpression(node: ?Object, opts?: ?Object): void + declare export function isTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTopicReference) + declare export function assertTopicReference(node: ?Object, opts?: ?Object): void + declare export function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression) + declare export function assertPipelineTopicExpression(node: ?Object, opts?: ?Object): void + declare export function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction) + declare export function assertPipelineBareFunction(node: ?Object, opts?: ?Object): void + declare export function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference) + declare export function assertPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): void + declare export function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty) + declare export function assertTSParameterProperty(node: ?Object, opts?: ?Object): void + declare export function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction) + declare export function assertTSDeclareFunction(node: ?Object, opts?: ?Object): void + declare export function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod) + declare export function assertTSDeclareMethod(node: ?Object, opts?: ?Object): void + declare export function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName) + declare export function assertTSQualifiedName(node: ?Object, opts?: ?Object): void + declare export function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration) + declare export function assertTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration) + declare export function assertTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature) + declare export function assertTSPropertySignature(node: ?Object, opts?: ?Object): void + declare export function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature) + declare export function assertTSMethodSignature(node: ?Object, opts?: ?Object): void + declare export function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature) + declare export function assertTSIndexSignature(node: ?Object, opts?: ?Object): void + declare export function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword) + declare export function assertTSAnyKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword) + declare export function assertTSBooleanKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSBigIntKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBigIntKeyword) + declare export function assertTSBigIntKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSIntrinsicKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntrinsicKeyword) + declare export function assertTSIntrinsicKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword) + declare export function assertTSNeverKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword) + declare export function assertTSNullKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword) + declare export function assertTSNumberKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword) + declare export function assertTSObjectKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword) + declare export function assertTSStringKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword) + declare export function assertTSSymbolKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword) + declare export function assertTSUndefinedKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword) + declare export function assertTSUnknownKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword) + declare export function assertTSVoidKeyword(node: ?Object, opts?: ?Object): void + declare export function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType) + declare export function assertTSThisType(node: ?Object, opts?: ?Object): void + declare export function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType) + declare export function assertTSFunctionType(node: ?Object, opts?: ?Object): void + declare export function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType) + declare export function assertTSConstructorType(node: ?Object, opts?: ?Object): void + declare export function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference) + declare export function assertTSTypeReference(node: ?Object, opts?: ?Object): void + declare export function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate) + declare export function assertTSTypePredicate(node: ?Object, opts?: ?Object): void + declare export function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery) + declare export function assertTSTypeQuery(node: ?Object, opts?: ?Object): void + declare export function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral) + declare export function assertTSTypeLiteral(node: ?Object, opts?: ?Object): void + declare export function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType) + declare export function assertTSArrayType(node: ?Object, opts?: ?Object): void + declare export function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType) + declare export function assertTSTupleType(node: ?Object, opts?: ?Object): void + declare export function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType) + declare export function assertTSOptionalType(node: ?Object, opts?: ?Object): void + declare export function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType) + declare export function assertTSRestType(node: ?Object, opts?: ?Object): void + declare export function isTSNamedTupleMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamedTupleMember) + declare export function assertTSNamedTupleMember(node: ?Object, opts?: ?Object): void + declare export function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType) + declare export function assertTSUnionType(node: ?Object, opts?: ?Object): void + declare export function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType) + declare export function assertTSIntersectionType(node: ?Object, opts?: ?Object): void + declare export function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType) + declare export function assertTSConditionalType(node: ?Object, opts?: ?Object): void + declare export function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType) + declare export function assertTSInferType(node: ?Object, opts?: ?Object): void + declare export function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType) + declare export function assertTSParenthesizedType(node: ?Object, opts?: ?Object): void + declare export function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator) + declare export function assertTSTypeOperator(node: ?Object, opts?: ?Object): void + declare export function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType) + declare export function assertTSIndexedAccessType(node: ?Object, opts?: ?Object): void + declare export function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType) + declare export function assertTSMappedType(node: ?Object, opts?: ?Object): void + declare export function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType) + declare export function assertTSLiteralType(node: ?Object, opts?: ?Object): void + declare export function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments) + declare export function assertTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): void + declare export function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration) + declare export function assertTSInterfaceDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody) + declare export function assertTSInterfaceBody(node: ?Object, opts?: ?Object): void + declare export function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration) + declare export function assertTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression) + declare export function assertTSAsExpression(node: ?Object, opts?: ?Object): void + declare export function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion) + declare export function assertTSTypeAssertion(node: ?Object, opts?: ?Object): void + declare export function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration) + declare export function assertTSEnumDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember) + declare export function assertTSEnumMember(node: ?Object, opts?: ?Object): void + declare export function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration) + declare export function assertTSModuleDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock) + declare export function assertTSModuleBlock(node: ?Object, opts?: ?Object): void + declare export function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType) + declare export function assertTSImportType(node: ?Object, opts?: ?Object): void + declare export function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration) + declare export function assertTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference) + declare export function assertTSExternalModuleReference(node: ?Object, opts?: ?Object): void + declare export function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression) + declare export function assertTSNonNullExpression(node: ?Object, opts?: ?Object): void + declare export function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment) + declare export function assertTSExportAssignment(node: ?Object, opts?: ?Object): void + declare export function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration) + declare export function assertTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation) + declare export function assertTSTypeAnnotation(node: ?Object, opts?: ?Object): void + declare export function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation) + declare export function assertTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): void + declare export function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration) + declare export function assertTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): void + declare export function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter) + declare export function assertTSTypeParameter(node: ?Object, opts?: ?Object): void + declare export function isStandardized(node: ?Object, opts?: ?Object): boolean + declare export function assertStandardized(node: ?Object, opts?: ?Object): void + declare export function isExpression(node: ?Object, opts?: ?Object): boolean + declare export function assertExpression(node: ?Object, opts?: ?Object): void + declare export function isBinary(node: ?Object, opts?: ?Object): boolean + declare export function assertBinary(node: ?Object, opts?: ?Object): void + declare export function isScopable(node: ?Object, opts?: ?Object): boolean + declare export function assertScopable(node: ?Object, opts?: ?Object): void + declare export function isBlockParent(node: ?Object, opts?: ?Object): boolean + declare export function assertBlockParent(node: ?Object, opts?: ?Object): void + declare export function isBlock(node: ?Object, opts?: ?Object): boolean + declare export function assertBlock(node: ?Object, opts?: ?Object): void + declare export function isStatement(node: ?Object, opts?: ?Object): boolean + declare export function assertStatement(node: ?Object, opts?: ?Object): void + declare export function isTerminatorless(node: ?Object, opts?: ?Object): boolean + declare export function assertTerminatorless(node: ?Object, opts?: ?Object): void + declare export function isCompletionStatement(node: ?Object, opts?: ?Object): boolean + declare export function assertCompletionStatement(node: ?Object, opts?: ?Object): void + declare export function isConditional(node: ?Object, opts?: ?Object): boolean + declare export function assertConditional(node: ?Object, opts?: ?Object): void + declare export function isLoop(node: ?Object, opts?: ?Object): boolean + declare export function assertLoop(node: ?Object, opts?: ?Object): void + declare export function isWhile(node: ?Object, opts?: ?Object): boolean + declare export function assertWhile(node: ?Object, opts?: ?Object): void + declare export function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean + declare export function assertExpressionWrapper(node: ?Object, opts?: ?Object): void + declare export function isFor(node: ?Object, opts?: ?Object): boolean + declare export function assertFor(node: ?Object, opts?: ?Object): void + declare export function isForXStatement(node: ?Object, opts?: ?Object): boolean + declare export function assertForXStatement(node: ?Object, opts?: ?Object): void + declare export function isFunction(node: ?Object, opts?: ?Object): boolean + declare export function assertFunction(node: ?Object, opts?: ?Object): void + declare export function isFunctionParent(node: ?Object, opts?: ?Object): boolean + declare export function assertFunctionParent(node: ?Object, opts?: ?Object): void + declare export function isPureish(node: ?Object, opts?: ?Object): boolean + declare export function assertPureish(node: ?Object, opts?: ?Object): void + declare export function isDeclaration(node: ?Object, opts?: ?Object): boolean + declare export function assertDeclaration(node: ?Object, opts?: ?Object): void + declare export function isPatternLike(node: ?Object, opts?: ?Object): boolean + declare export function assertPatternLike(node: ?Object, opts?: ?Object): void + declare export function isLVal(node: ?Object, opts?: ?Object): boolean + declare export function assertLVal(node: ?Object, opts?: ?Object): void + declare export function isTSEntityName(node: ?Object, opts?: ?Object): boolean + declare export function assertTSEntityName(node: ?Object, opts?: ?Object): void + declare export function isLiteral(node: ?Object, opts?: ?Object): boolean + declare export function assertLiteral(node: ?Object, opts?: ?Object): void + declare export function isImmutable(node: ?Object, opts?: ?Object): boolean + declare export function assertImmutable(node: ?Object, opts?: ?Object): void + declare export function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean + declare export function assertUserWhitespacable(node: ?Object, opts?: ?Object): void + declare export function isMethod(node: ?Object, opts?: ?Object): boolean + declare export function assertMethod(node: ?Object, opts?: ?Object): void + declare export function isObjectMember(node: ?Object, opts?: ?Object): boolean + declare export function assertObjectMember(node: ?Object, opts?: ?Object): void + declare export function isProperty(node: ?Object, opts?: ?Object): boolean + declare export function assertProperty(node: ?Object, opts?: ?Object): void + declare export function isUnaryLike(node: ?Object, opts?: ?Object): boolean + declare export function assertUnaryLike(node: ?Object, opts?: ?Object): void + declare export function isPattern(node: ?Object, opts?: ?Object): boolean + declare export function assertPattern(node: ?Object, opts?: ?Object): void + declare export function isClass(node: ?Object, opts?: ?Object): boolean + declare export function assertClass(node: ?Object, opts?: ?Object): void + declare export function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean + declare export function assertModuleDeclaration(node: ?Object, opts?: ?Object): void + declare export function isExportDeclaration(node: ?Object, opts?: ?Object): boolean + declare export function assertExportDeclaration(node: ?Object, opts?: ?Object): void + declare export function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean + declare export function assertModuleSpecifier(node: ?Object, opts?: ?Object): void + declare export function isAccessor(node: ?Object, opts?: ?Object): boolean + declare export function assertAccessor(node: ?Object, opts?: ?Object): void + declare export function isPrivate(node: ?Object, opts?: ?Object): boolean + declare export function assertPrivate(node: ?Object, opts?: ?Object): void + declare export function isFlow(node: ?Object, opts?: ?Object): boolean + declare export function assertFlow(node: ?Object, opts?: ?Object): void + declare export function isFlowType(node: ?Object, opts?: ?Object): boolean + declare export function assertFlowType(node: ?Object, opts?: ?Object): void + declare export function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean + declare export function assertFlowBaseAnnotation(node: ?Object, opts?: ?Object): void + declare export function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean + declare export function assertFlowDeclaration(node: ?Object, opts?: ?Object): void + declare export function isFlowPredicate(node: ?Object, opts?: ?Object): boolean + declare export function assertFlowPredicate(node: ?Object, opts?: ?Object): void + declare export function isEnumBody(node: ?Object, opts?: ?Object): boolean + declare export function assertEnumBody(node: ?Object, opts?: ?Object): void + declare export function isEnumMember(node: ?Object, opts?: ?Object): boolean + declare export function assertEnumMember(node: ?Object, opts?: ?Object): void + declare export function isJSX(node: ?Object, opts?: ?Object): boolean + declare export function assertJSX(node: ?Object, opts?: ?Object): void + declare export function isMiscellaneous(node: ?Object, opts?: ?Object): boolean + declare export function assertMiscellaneous(node: ?Object, opts?: ?Object): void + declare export function isTypeScript(node: ?Object, opts?: ?Object): boolean + declare export function assertTypeScript(node: ?Object, opts?: ?Object): void + declare export function isTSTypeElement(node: ?Object, opts?: ?Object): boolean + declare export function assertTSTypeElement(node: ?Object, opts?: ?Object): void + declare export function isTSType(node: ?Object, opts?: ?Object): boolean + declare export function assertTSType(node: ?Object, opts?: ?Object): void + declare export function isTSBaseType(node: ?Object, opts?: ?Object): boolean + declare export function assertTSBaseType(node: ?Object, opts?: ?Object): void + declare export function isNumberLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral) + declare export function assertNumberLiteral(node: ?Object, opts?: ?Object): void + declare export function isRegexLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral) + declare export function assertRegexLiteral(node: ?Object, opts?: ?Object): void + declare export function isRestProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement) + declare export function assertRestProperty(node: ?Object, opts?: ?Object): void + declare export function isSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement) + declare export function assertSpreadProperty(node: ?Object, opts?: ?Object): void + declare export var VISITOR_KEYS: { [type: string]: string[] } + declare export function assertNode(obj: any): void + declare export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): BabelNodeTypeAnnotation + declare export function createUnionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation + declare export function createFlowUnionType(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation + declare export function buildChildren(node: { children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeJSXEmptyExpression> }): Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment> + declare export function clone<T>(n: T): T; + declare export function cloneDeep<T>(n: T): T; + declare export function cloneDeepWithoutLoc<T>(n: T): T; + declare export function cloneNode<T>(n: T, deep?: boolean, withoutLoc?: boolean): T; + declare export function cloneWithoutLoc<T>(n: T): T; + declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing' + declare export function addComment<T: BabelNode>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T + declare export function addComments<T: BabelNode>(node: T, type: CommentTypeShorthand, comments: Array<Comment>): T + declare export function inheritInnerComments(node: BabelNode, parent: BabelNode): void + declare export function inheritLeadingComments(node: BabelNode, parent: BabelNode): void + declare export function inheritsComments<T: BabelNode>(node: T, parent: BabelNode): void + declare export function inheritTrailingComments(node: BabelNode, parent: BabelNode): void + declare export function removeComments<T: BabelNode>(node: T): T + declare export function ensureBlock(node: BabelNode, key: string): BabelNodeBlockStatement + declare export function toBindingIdentifierName(name?: ?string): string + declare export function toBlock(node: BabelNodeStatement | BabelNodeExpression, parent?: BabelNodeFunction | null): BabelNodeBlockStatement + declare export function toComputedKey(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNodeExpression | BabelNodeIdentifier): BabelNodeExpression + declare export function toExpression(node: BabelNodeExpressionStatement | BabelNodeExpression | BabelNodeClass | BabelNodeFunction): BabelNodeExpression + declare export function toIdentifier(name?: ?string): string + declare export function toKeyAlias(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNode): string + declare export function toStatement(node: BabelNodeStatement | BabelNodeClass | BabelNodeFunction | BabelNodeAssignmentExpression, ignore?: boolean): BabelNodeStatement | void + declare export function valueToNode(value: any): BabelNodeExpression + declare export function removeTypeDuplicates(types: Array<BabelNodeFlowType>): Array<BabelNodeFlowType> + declare export function appendToMemberExpression(member: BabelNodeMemberExpression, append: BabelNode, computed?: boolean): BabelNodeMemberExpression + declare export function inherits<T: BabelNode>(child: T, parent: BabelNode | null | void): T + declare export function prependToMemberExpression(member: BabelNodeMemberExpression, prepend: BabelNodeExpression): BabelNodeMemberExpression + declare export function removeProperties<T>(n: T, opts: ?{}): void; + declare export function removePropertiesDeep<T>(n: T, opts: ?{}): T; + declare export var getBindingIdentifiers: { + (node: BabelNode, duplicates?: boolean, outerOnly?: boolean): { [key: string]: BabelNodeIdentifier | Array<BabelNodeIdentifier> }, + keys: { [type: string]: string[] } + } + declare export function getOuterBindingIdentifiers(node: BabelNode, duplicates?: boolean): { [key: string]: BabelNodeIdentifier | Array<BabelNodeIdentifier> } + declare type TraversalAncestors = Array<{ + node: BabelNode, + key: string, + index?: number, + }>; + declare type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void; + declare type TraversalHandlers<T> = { + enter?: TraversalHandler<T>, + exit?: TraversalHandler<T>, + }; + declare export function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void; + declare export function traverseFast<T>(n: BabelNode, h: TraversalHandler<T>, state?: T): void; + declare export function shallowEqual(actual: Object, expected: Object): boolean + declare export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean + declare export function is(type: string, n: BabelNode, opts: Object): boolean; + declare export function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean + declare export function isBlockScoped(node: BabelNode): boolean + declare export function isImmutable(node: BabelNode): boolean + declare export function isLet(node: BabelNode): boolean + declare export function isNode(node: ?Object): boolean + declare export function isNodesEquivalent(a: any, b: any): boolean + declare export function isPlaceholderType(placeholderType: string, targetType: string): boolean + declare export function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean + declare export function isScope(node: BabelNode, parent: BabelNode): boolean + declare export function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean + declare export function isType(nodetype: ?string, targetType: string): boolean + declare export function isValidES3Identifier(name: string): boolean + declare export function isValidES3Identifier(name: string): boolean + declare export function isValidIdentifier(name: string): boolean + declare export function isVar(node: BabelNode): boolean + declare export function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean + declare export function validate(n: BabelNode, key: string, value: mixed): void; +} diff --git a/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js b/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js new file mode 100644 index 0000000..6a0ac93 --- /dev/null +++ b/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = appendToMemberExpression; + +var _generated = require("../builders/generated"); + +function appendToMemberExpression(member, append, computed = false) { + member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); + member.property = append; + member.computed = !!computed; + return member; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js b/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js new file mode 100644 index 0000000..de9464d --- /dev/null +++ b/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js @@ -0,0 +1,78 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeTypeDuplicates; + +var _generated = require("../../validators/generated"); + +function getQualifiedName(node) { + return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`; +} + +function removeTypeDuplicates(nodes) { + const generics = {}; + const bases = {}; + const typeGroups = new Set(); + const types = []; + + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (!node) continue; + + if (types.indexOf(node) >= 0) { + continue; + } + + if ((0, _generated.isAnyTypeAnnotation)(node)) { + return [node]; + } + + if ((0, _generated.isFlowBaseAnnotation)(node)) { + bases[node.type] = node; + continue; + } + + if ((0, _generated.isUnionTypeAnnotation)(node)) { + if (!typeGroups.has(node.types)) { + nodes = nodes.concat(node.types); + typeGroups.add(node.types); + } + + continue; + } + + if ((0, _generated.isGenericTypeAnnotation)(node)) { + const name = getQualifiedName(node.id); + + if (generics[name]) { + let existing = generics[name]; + + if (existing.typeParameters) { + if (node.typeParameters) { + existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); + } + } else { + existing = node.typeParameters; + } + } else { + generics[name] = node; + } + + continue; + } + + types.push(node); + } + + for (const type of Object.keys(bases)) { + types.push(bases[type]); + } + + for (const name of Object.keys(generics)) { + types.push(generics[name]); + } + + return types; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/inherits.js b/node_modules/@babel/types/lib/modifications/inherits.js new file mode 100644 index 0000000..8701897 --- /dev/null +++ b/node_modules/@babel/types/lib/modifications/inherits.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inherits; + +var _constants = require("../constants"); + +var _inheritsComments = require("../comments/inheritsComments"); + +function inherits(child, parent) { + if (!child || !parent) return child; + + for (const key of _constants.INHERIT_KEYS.optional) { + if (child[key] == null) { + child[key] = parent[key]; + } + } + + for (const key of Object.keys(parent)) { + if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; + } + + for (const key of _constants.INHERIT_KEYS.force) { + child[key] = parent[key]; + } + + (0, _inheritsComments.default)(child, parent); + return child; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js b/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js new file mode 100644 index 0000000..ee6de0e --- /dev/null +++ b/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = prependToMemberExpression; + +var _generated = require("../builders/generated"); + +function prependToMemberExpression(member, prepend) { + member.object = (0, _generated.memberExpression)(prepend, member.object); + return member; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/removeProperties.js b/node_modules/@babel/types/lib/modifications/removeProperties.js new file mode 100644 index 0000000..f9cf8e6 --- /dev/null +++ b/node_modules/@babel/types/lib/modifications/removeProperties.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeProperties; + +var _constants = require("../constants"); + +const CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; + +const CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); + +function removeProperties(node, opts = {}) { + const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; + + for (const key of map) { + if (node[key] != null) node[key] = undefined; + } + + for (const key of Object.keys(node)) { + if (key[0] === "_" && node[key] != null) node[key] = undefined; + } + + const symbols = Object.getOwnPropertySymbols(node); + + for (const sym of symbols) { + node[sym] = null; + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js b/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js new file mode 100644 index 0000000..e36f755 --- /dev/null +++ b/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removePropertiesDeep; + +var _traverseFast = require("../traverse/traverseFast"); + +var _removeProperties = require("./removeProperties"); + +function removePropertiesDeep(tree, opts) { + (0, _traverseFast.default)(tree, _removeProperties.default, opts); + return tree; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js b/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js new file mode 100644 index 0000000..25defea --- /dev/null +++ b/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js @@ -0,0 +1,54 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeTypeDuplicates; + +var _generated = require("../../validators/generated"); + +function removeTypeDuplicates(nodes) { + const generics = {}; + const bases = {}; + const typeGroups = new Set(); + const types = []; + + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (!node) continue; + + if (types.indexOf(node) >= 0) { + continue; + } + + if ((0, _generated.isTSAnyKeyword)(node)) { + return [node]; + } + + if ((0, _generated.isTSBaseType)(node)) { + bases[node.type] = node; + continue; + } + + if ((0, _generated.isTSUnionType)(node)) { + if (!typeGroups.has(node.types)) { + nodes.push(...node.types); + typeGroups.add(node.types); + } + + continue; + } + + types.push(node); + } + + for (const type of Object.keys(bases)) { + types.push(bases[type]); + } + + for (const name of Object.keys(generics)) { + types.push(generics[name]); + } + + return types; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js new file mode 100644 index 0000000..4daaf8b --- /dev/null +++ b/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js @@ -0,0 +1,104 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getBindingIdentifiers; + +var _generated = require("../validators/generated"); + +function getBindingIdentifiers(node, duplicates, outerOnly) { + let search = [].concat(node); + const ids = Object.create(null); + + while (search.length) { + const id = search.shift(); + if (!id) continue; + const keys = getBindingIdentifiers.keys[id.type]; + + if ((0, _generated.isIdentifier)(id)) { + if (duplicates) { + const _ids = ids[id.name] = ids[id.name] || []; + + _ids.push(id); + } else { + ids[id.name] = id; + } + + continue; + } + + if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) { + if ((0, _generated.isDeclaration)(id.declaration)) { + search.push(id.declaration); + } + + continue; + } + + if (outerOnly) { + if ((0, _generated.isFunctionDeclaration)(id)) { + search.push(id.id); + continue; + } + + if ((0, _generated.isFunctionExpression)(id)) { + continue; + } + } + + if (keys) { + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + + if (id[key]) { + search = search.concat(id[key]); + } + } + } + } + + return ids; +} + +getBindingIdentifiers.keys = { + DeclareClass: ["id"], + DeclareFunction: ["id"], + DeclareModule: ["id"], + DeclareVariable: ["id"], + DeclareInterface: ["id"], + DeclareTypeAlias: ["id"], + DeclareOpaqueType: ["id"], + InterfaceDeclaration: ["id"], + TypeAlias: ["id"], + OpaqueType: ["id"], + CatchClause: ["param"], + LabeledStatement: ["label"], + UnaryExpression: ["argument"], + AssignmentExpression: ["left"], + ImportSpecifier: ["local"], + ImportNamespaceSpecifier: ["local"], + ImportDefaultSpecifier: ["local"], + ImportDeclaration: ["specifiers"], + ExportSpecifier: ["exported"], + ExportNamespaceSpecifier: ["exported"], + ExportDefaultSpecifier: ["exported"], + FunctionDeclaration: ["id", "params"], + FunctionExpression: ["id", "params"], + ArrowFunctionExpression: ["params"], + ObjectMethod: ["params"], + ClassMethod: ["params"], + ClassPrivateMethod: ["params"], + ForInStatement: ["left"], + ForOfStatement: ["left"], + ClassDeclaration: ["id"], + ClassExpression: ["id"], + RestElement: ["argument"], + UpdateExpression: ["argument"], + ObjectProperty: ["value"], + AssignmentPattern: ["left"], + ArrayPattern: ["elements"], + ObjectPattern: ["properties"], + VariableDeclaration: ["declarations"], + VariableDeclarator: ["id"] +};
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js new file mode 100644 index 0000000..c27cffe --- /dev/null +++ b/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _getBindingIdentifiers = require("./getBindingIdentifiers"); + +var _default = getOuterBindingIdentifiers; +exports.default = _default; + +function getOuterBindingIdentifiers(node, duplicates) { + return (0, _getBindingIdentifiers.default)(node, duplicates, true); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/traverse/traverse.js b/node_modules/@babel/types/lib/traverse/traverse.js new file mode 100644 index 0000000..775aed1 --- /dev/null +++ b/node_modules/@babel/types/lib/traverse/traverse.js @@ -0,0 +1,55 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverse; + +var _definitions = require("../definitions"); + +function traverse(node, handlers, state) { + if (typeof handlers === "function") { + handlers = { + enter: handlers + }; + } + + const { + enter, + exit + } = handlers; + traverseSimpleImpl(node, enter, exit, state, []); +} + +function traverseSimpleImpl(node, enter, exit, state, ancestors) { + const keys = _definitions.VISITOR_KEYS[node.type]; + if (!keys) return; + if (enter) enter(node, ancestors, state); + + for (const key of keys) { + const subNode = node[key]; + + if (Array.isArray(subNode)) { + for (let i = 0; i < subNode.length; i++) { + const child = subNode[i]; + if (!child) continue; + ancestors.push({ + node, + key, + index: i + }); + traverseSimpleImpl(child, enter, exit, state, ancestors); + ancestors.pop(); + } + } else if (subNode) { + ancestors.push({ + node, + key + }); + traverseSimpleImpl(subNode, enter, exit, state, ancestors); + ancestors.pop(); + } + } + + if (exit) exit(node, ancestors, state); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/traverse/traverseFast.js b/node_modules/@babel/types/lib/traverse/traverseFast.js new file mode 100644 index 0000000..f038dd8 --- /dev/null +++ b/node_modules/@babel/types/lib/traverse/traverseFast.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverseFast; + +var _definitions = require("../definitions"); + +function traverseFast(node, enter, opts) { + if (!node) return; + const keys = _definitions.VISITOR_KEYS[node.type]; + if (!keys) return; + opts = opts || {}; + enter(node, opts); + + for (const key of keys) { + const subNode = node[key]; + + if (Array.isArray(subNode)) { + for (const node of subNode) { + traverseFast(node, enter, opts); + } + } else { + traverseFast(subNode, enter, opts); + } + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/inherit.js b/node_modules/@babel/types/lib/utils/inherit.js new file mode 100644 index 0000000..35f3381 --- /dev/null +++ b/node_modules/@babel/types/lib/utils/inherit.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inherit; + +function inherit(key, child, parent) { + if (child && parent) { + child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean))); + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js b/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js new file mode 100644 index 0000000..f0ca133 --- /dev/null +++ b/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js @@ -0,0 +1,47 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cleanJSXElementLiteralChild; + +var _generated = require("../../builders/generated"); + +function cleanJSXElementLiteralChild(child, args) { + const lines = child.value.split(/\r\n|\n|\r/); + let lastNonEmptyLine = 0; + + for (let i = 0; i < lines.length; i++) { + if (lines[i].match(/[^ \t]/)) { + lastNonEmptyLine = i; + } + } + + let str = ""; + + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + const isFirstLine = i === 0; + const isLastLine = i === lines.length - 1; + const isLastNonEmptyLine = i === lastNonEmptyLine; + let trimmedLine = line.replace(/\t/g, " "); + + if (!isFirstLine) { + trimmedLine = trimmedLine.replace(/^[ ]+/, ""); + } + + if (!isLastLine) { + trimmedLine = trimmedLine.replace(/[ ]+$/, ""); + } + + if (trimmedLine) { + if (!isLastNonEmptyLine) { + trimmedLine += " "; + } + + str += trimmedLine; + } + } + + if (str) args.push((0, _generated.stringLiteral)(str)); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/shallowEqual.js b/node_modules/@babel/types/lib/utils/shallowEqual.js new file mode 100644 index 0000000..fae259e --- /dev/null +++ b/node_modules/@babel/types/lib/utils/shallowEqual.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = shallowEqual; + +function shallowEqual(actual, expected) { + const keys = Object.keys(expected); + + for (const key of keys) { + if (actual[key] !== expected[key]) { + return false; + } + } + + return true; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js new file mode 100644 index 0000000..c006496 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildMatchMemberExpression; + +var _matchesPattern = require("./matchesPattern"); + +function buildMatchMemberExpression(match, allowPartial) { + const parts = match.split("."); + return member => (0, _matchesPattern.default)(member, parts, allowPartial); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/generated/index.js b/node_modules/@babel/types/lib/validators/generated/index.js new file mode 100644 index 0000000..f2956ec --- /dev/null +++ b/node_modules/@babel/types/lib/validators/generated/index.js @@ -0,0 +1,4811 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isAccessor = isAccessor; +exports.isAnyTypeAnnotation = isAnyTypeAnnotation; +exports.isArgumentPlaceholder = isArgumentPlaceholder; +exports.isArrayExpression = isArrayExpression; +exports.isArrayPattern = isArrayPattern; +exports.isArrayTypeAnnotation = isArrayTypeAnnotation; +exports.isArrowFunctionExpression = isArrowFunctionExpression; +exports.isAssignmentExpression = isAssignmentExpression; +exports.isAssignmentPattern = isAssignmentPattern; +exports.isAwaitExpression = isAwaitExpression; +exports.isBigIntLiteral = isBigIntLiteral; +exports.isBinary = isBinary; +exports.isBinaryExpression = isBinaryExpression; +exports.isBindExpression = isBindExpression; +exports.isBlock = isBlock; +exports.isBlockParent = isBlockParent; +exports.isBlockStatement = isBlockStatement; +exports.isBooleanLiteral = isBooleanLiteral; +exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; +exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation; +exports.isBreakStatement = isBreakStatement; +exports.isCallExpression = isCallExpression; +exports.isCatchClause = isCatchClause; +exports.isClass = isClass; +exports.isClassAccessorProperty = isClassAccessorProperty; +exports.isClassBody = isClassBody; +exports.isClassDeclaration = isClassDeclaration; +exports.isClassExpression = isClassExpression; +exports.isClassImplements = isClassImplements; +exports.isClassMethod = isClassMethod; +exports.isClassPrivateMethod = isClassPrivateMethod; +exports.isClassPrivateProperty = isClassPrivateProperty; +exports.isClassProperty = isClassProperty; +exports.isCompletionStatement = isCompletionStatement; +exports.isConditional = isConditional; +exports.isConditionalExpression = isConditionalExpression; +exports.isContinueStatement = isContinueStatement; +exports.isDebuggerStatement = isDebuggerStatement; +exports.isDecimalLiteral = isDecimalLiteral; +exports.isDeclaration = isDeclaration; +exports.isDeclareClass = isDeclareClass; +exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; +exports.isDeclareExportDeclaration = isDeclareExportDeclaration; +exports.isDeclareFunction = isDeclareFunction; +exports.isDeclareInterface = isDeclareInterface; +exports.isDeclareModule = isDeclareModule; +exports.isDeclareModuleExports = isDeclareModuleExports; +exports.isDeclareOpaqueType = isDeclareOpaqueType; +exports.isDeclareTypeAlias = isDeclareTypeAlias; +exports.isDeclareVariable = isDeclareVariable; +exports.isDeclaredPredicate = isDeclaredPredicate; +exports.isDecorator = isDecorator; +exports.isDirective = isDirective; +exports.isDirectiveLiteral = isDirectiveLiteral; +exports.isDoExpression = isDoExpression; +exports.isDoWhileStatement = isDoWhileStatement; +exports.isEmptyStatement = isEmptyStatement; +exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation; +exports.isEnumBody = isEnumBody; +exports.isEnumBooleanBody = isEnumBooleanBody; +exports.isEnumBooleanMember = isEnumBooleanMember; +exports.isEnumDeclaration = isEnumDeclaration; +exports.isEnumDefaultedMember = isEnumDefaultedMember; +exports.isEnumMember = isEnumMember; +exports.isEnumNumberBody = isEnumNumberBody; +exports.isEnumNumberMember = isEnumNumberMember; +exports.isEnumStringBody = isEnumStringBody; +exports.isEnumStringMember = isEnumStringMember; +exports.isEnumSymbolBody = isEnumSymbolBody; +exports.isExistsTypeAnnotation = isExistsTypeAnnotation; +exports.isExportAllDeclaration = isExportAllDeclaration; +exports.isExportDeclaration = isExportDeclaration; +exports.isExportDefaultDeclaration = isExportDefaultDeclaration; +exports.isExportDefaultSpecifier = isExportDefaultSpecifier; +exports.isExportNamedDeclaration = isExportNamedDeclaration; +exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier; +exports.isExportSpecifier = isExportSpecifier; +exports.isExpression = isExpression; +exports.isExpressionStatement = isExpressionStatement; +exports.isExpressionWrapper = isExpressionWrapper; +exports.isFile = isFile; +exports.isFlow = isFlow; +exports.isFlowBaseAnnotation = isFlowBaseAnnotation; +exports.isFlowDeclaration = isFlowDeclaration; +exports.isFlowPredicate = isFlowPredicate; +exports.isFlowType = isFlowType; +exports.isFor = isFor; +exports.isForInStatement = isForInStatement; +exports.isForOfStatement = isForOfStatement; +exports.isForStatement = isForStatement; +exports.isForXStatement = isForXStatement; +exports.isFunction = isFunction; +exports.isFunctionDeclaration = isFunctionDeclaration; +exports.isFunctionExpression = isFunctionExpression; +exports.isFunctionParent = isFunctionParent; +exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation; +exports.isFunctionTypeParam = isFunctionTypeParam; +exports.isGenericTypeAnnotation = isGenericTypeAnnotation; +exports.isIdentifier = isIdentifier; +exports.isIfStatement = isIfStatement; +exports.isImmutable = isImmutable; +exports.isImport = isImport; +exports.isImportAttribute = isImportAttribute; +exports.isImportDeclaration = isImportDeclaration; +exports.isImportDefaultSpecifier = isImportDefaultSpecifier; +exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier; +exports.isImportSpecifier = isImportSpecifier; +exports.isIndexedAccessType = isIndexedAccessType; +exports.isInferredPredicate = isInferredPredicate; +exports.isInterfaceDeclaration = isInterfaceDeclaration; +exports.isInterfaceExtends = isInterfaceExtends; +exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; +exports.isInterpreterDirective = isInterpreterDirective; +exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; +exports.isJSX = isJSX; +exports.isJSXAttribute = isJSXAttribute; +exports.isJSXClosingElement = isJSXClosingElement; +exports.isJSXClosingFragment = isJSXClosingFragment; +exports.isJSXElement = isJSXElement; +exports.isJSXEmptyExpression = isJSXEmptyExpression; +exports.isJSXExpressionContainer = isJSXExpressionContainer; +exports.isJSXFragment = isJSXFragment; +exports.isJSXIdentifier = isJSXIdentifier; +exports.isJSXMemberExpression = isJSXMemberExpression; +exports.isJSXNamespacedName = isJSXNamespacedName; +exports.isJSXOpeningElement = isJSXOpeningElement; +exports.isJSXOpeningFragment = isJSXOpeningFragment; +exports.isJSXSpreadAttribute = isJSXSpreadAttribute; +exports.isJSXSpreadChild = isJSXSpreadChild; +exports.isJSXText = isJSXText; +exports.isLVal = isLVal; +exports.isLabeledStatement = isLabeledStatement; +exports.isLiteral = isLiteral; +exports.isLogicalExpression = isLogicalExpression; +exports.isLoop = isLoop; +exports.isMemberExpression = isMemberExpression; +exports.isMetaProperty = isMetaProperty; +exports.isMethod = isMethod; +exports.isMiscellaneous = isMiscellaneous; +exports.isMixedTypeAnnotation = isMixedTypeAnnotation; +exports.isModuleDeclaration = isModuleDeclaration; +exports.isModuleExpression = isModuleExpression; +exports.isModuleSpecifier = isModuleSpecifier; +exports.isNewExpression = isNewExpression; +exports.isNoop = isNoop; +exports.isNullLiteral = isNullLiteral; +exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; +exports.isNullableTypeAnnotation = isNullableTypeAnnotation; +exports.isNumberLiteral = isNumberLiteral; +exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; +exports.isNumberTypeAnnotation = isNumberTypeAnnotation; +exports.isNumericLiteral = isNumericLiteral; +exports.isObjectExpression = isObjectExpression; +exports.isObjectMember = isObjectMember; +exports.isObjectMethod = isObjectMethod; +exports.isObjectPattern = isObjectPattern; +exports.isObjectProperty = isObjectProperty; +exports.isObjectTypeAnnotation = isObjectTypeAnnotation; +exports.isObjectTypeCallProperty = isObjectTypeCallProperty; +exports.isObjectTypeIndexer = isObjectTypeIndexer; +exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot; +exports.isObjectTypeProperty = isObjectTypeProperty; +exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; +exports.isOpaqueType = isOpaqueType; +exports.isOptionalCallExpression = isOptionalCallExpression; +exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType; +exports.isOptionalMemberExpression = isOptionalMemberExpression; +exports.isParenthesizedExpression = isParenthesizedExpression; +exports.isPattern = isPattern; +exports.isPatternLike = isPatternLike; +exports.isPipelineBareFunction = isPipelineBareFunction; +exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; +exports.isPipelineTopicExpression = isPipelineTopicExpression; +exports.isPlaceholder = isPlaceholder; +exports.isPrivate = isPrivate; +exports.isPrivateName = isPrivateName; +exports.isProgram = isProgram; +exports.isProperty = isProperty; +exports.isPureish = isPureish; +exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; +exports.isRecordExpression = isRecordExpression; +exports.isRegExpLiteral = isRegExpLiteral; +exports.isRegexLiteral = isRegexLiteral; +exports.isRestElement = isRestElement; +exports.isRestProperty = isRestProperty; +exports.isReturnStatement = isReturnStatement; +exports.isScopable = isScopable; +exports.isSequenceExpression = isSequenceExpression; +exports.isSpreadElement = isSpreadElement; +exports.isSpreadProperty = isSpreadProperty; +exports.isStandardized = isStandardized; +exports.isStatement = isStatement; +exports.isStaticBlock = isStaticBlock; +exports.isStringLiteral = isStringLiteral; +exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; +exports.isStringTypeAnnotation = isStringTypeAnnotation; +exports.isSuper = isSuper; +exports.isSwitchCase = isSwitchCase; +exports.isSwitchStatement = isSwitchStatement; +exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation; +exports.isTSAnyKeyword = isTSAnyKeyword; +exports.isTSArrayType = isTSArrayType; +exports.isTSAsExpression = isTSAsExpression; +exports.isTSBaseType = isTSBaseType; +exports.isTSBigIntKeyword = isTSBigIntKeyword; +exports.isTSBooleanKeyword = isTSBooleanKeyword; +exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; +exports.isTSConditionalType = isTSConditionalType; +exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; +exports.isTSConstructorType = isTSConstructorType; +exports.isTSDeclareFunction = isTSDeclareFunction; +exports.isTSDeclareMethod = isTSDeclareMethod; +exports.isTSEntityName = isTSEntityName; +exports.isTSEnumDeclaration = isTSEnumDeclaration; +exports.isTSEnumMember = isTSEnumMember; +exports.isTSExportAssignment = isTSExportAssignment; +exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; +exports.isTSExternalModuleReference = isTSExternalModuleReference; +exports.isTSFunctionType = isTSFunctionType; +exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; +exports.isTSImportType = isTSImportType; +exports.isTSIndexSignature = isTSIndexSignature; +exports.isTSIndexedAccessType = isTSIndexedAccessType; +exports.isTSInferType = isTSInferType; +exports.isTSInterfaceBody = isTSInterfaceBody; +exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; +exports.isTSIntersectionType = isTSIntersectionType; +exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword; +exports.isTSLiteralType = isTSLiteralType; +exports.isTSMappedType = isTSMappedType; +exports.isTSMethodSignature = isTSMethodSignature; +exports.isTSModuleBlock = isTSModuleBlock; +exports.isTSModuleDeclaration = isTSModuleDeclaration; +exports.isTSNamedTupleMember = isTSNamedTupleMember; +exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; +exports.isTSNeverKeyword = isTSNeverKeyword; +exports.isTSNonNullExpression = isTSNonNullExpression; +exports.isTSNullKeyword = isTSNullKeyword; +exports.isTSNumberKeyword = isTSNumberKeyword; +exports.isTSObjectKeyword = isTSObjectKeyword; +exports.isTSOptionalType = isTSOptionalType; +exports.isTSParameterProperty = isTSParameterProperty; +exports.isTSParenthesizedType = isTSParenthesizedType; +exports.isTSPropertySignature = isTSPropertySignature; +exports.isTSQualifiedName = isTSQualifiedName; +exports.isTSRestType = isTSRestType; +exports.isTSStringKeyword = isTSStringKeyword; +exports.isTSSymbolKeyword = isTSSymbolKeyword; +exports.isTSThisType = isTSThisType; +exports.isTSTupleType = isTSTupleType; +exports.isTSType = isTSType; +exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; +exports.isTSTypeAnnotation = isTSTypeAnnotation; +exports.isTSTypeAssertion = isTSTypeAssertion; +exports.isTSTypeElement = isTSTypeElement; +exports.isTSTypeLiteral = isTSTypeLiteral; +exports.isTSTypeOperator = isTSTypeOperator; +exports.isTSTypeParameter = isTSTypeParameter; +exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; +exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; +exports.isTSTypePredicate = isTSTypePredicate; +exports.isTSTypeQuery = isTSTypeQuery; +exports.isTSTypeReference = isTSTypeReference; +exports.isTSUndefinedKeyword = isTSUndefinedKeyword; +exports.isTSUnionType = isTSUnionType; +exports.isTSUnknownKeyword = isTSUnknownKeyword; +exports.isTSVoidKeyword = isTSVoidKeyword; +exports.isTaggedTemplateExpression = isTaggedTemplateExpression; +exports.isTemplateElement = isTemplateElement; +exports.isTemplateLiteral = isTemplateLiteral; +exports.isTerminatorless = isTerminatorless; +exports.isThisExpression = isThisExpression; +exports.isThisTypeAnnotation = isThisTypeAnnotation; +exports.isThrowStatement = isThrowStatement; +exports.isTopicReference = isTopicReference; +exports.isTryStatement = isTryStatement; +exports.isTupleExpression = isTupleExpression; +exports.isTupleTypeAnnotation = isTupleTypeAnnotation; +exports.isTypeAlias = isTypeAlias; +exports.isTypeAnnotation = isTypeAnnotation; +exports.isTypeCastExpression = isTypeCastExpression; +exports.isTypeParameter = isTypeParameter; +exports.isTypeParameterDeclaration = isTypeParameterDeclaration; +exports.isTypeParameterInstantiation = isTypeParameterInstantiation; +exports.isTypeScript = isTypeScript; +exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation; +exports.isUnaryExpression = isUnaryExpression; +exports.isUnaryLike = isUnaryLike; +exports.isUnionTypeAnnotation = isUnionTypeAnnotation; +exports.isUpdateExpression = isUpdateExpression; +exports.isUserWhitespacable = isUserWhitespacable; +exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier; +exports.isVariableDeclaration = isVariableDeclaration; +exports.isVariableDeclarator = isVariableDeclarator; +exports.isVariance = isVariance; +exports.isVoidTypeAnnotation = isVoidTypeAnnotation; +exports.isWhile = isWhile; +exports.isWhileStatement = isWhileStatement; +exports.isWithStatement = isWithStatement; +exports.isYieldExpression = isYieldExpression; + +var _shallowEqual = require("../../utils/shallowEqual"); + +function isArrayExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAssignmentExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AssignmentExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBinaryExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BinaryExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterpreterDirective(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterpreterDirective") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDirective(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Directive") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDirectiveLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DirectiveLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlockStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BlockStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBreakStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BreakStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCallExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "CallExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCatchClause(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "CatchClause") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isConditionalExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ConditionalExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isContinueStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ContinueStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDebuggerStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DebuggerStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDoWhileStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DoWhileStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEmptyStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EmptyStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpressionStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExpressionStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFile(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "File") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForInStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForInStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Identifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIfStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "IfStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLabeledStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "LabeledStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumericLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumericLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRegExpLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RegExpLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLogicalExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "LogicalExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNewExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NewExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isProgram(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Program") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRestElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RestElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isReturnStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ReturnStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSequenceExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SequenceExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isParenthesizedExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ParenthesizedExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSwitchCase(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SwitchCase") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSwitchStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SwitchStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThisExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThisExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThrowStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThrowStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTryStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TryStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnaryExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UnaryExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUpdateExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UpdateExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariableDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VariableDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariableDeclarator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VariableDeclarator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWhileStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "WhileStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWithStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "WithStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAssignmentPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AssignmentPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrayPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrowFunctionExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrowFunctionExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportAllDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportAllDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDefaultDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportDefaultDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportNamedDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportNamedDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForOfStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForOfStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportDefaultSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportDefaultSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportNamespaceSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportNamespaceSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMetaProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MetaProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSpreadElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SpreadElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSuper(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Super") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTaggedTemplateExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TaggedTemplateExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTemplateElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TemplateElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTemplateLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TemplateLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isYieldExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "YieldExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAwaitExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AwaitExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImport(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Import") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBigIntLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BigIntLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportNamespaceSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportNamespaceSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OptionalMemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalCallExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OptionalCallExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassAccessorProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassAccessorProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassPrivateProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassPrivateProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassPrivateMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassPrivateMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPrivateName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PrivateName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStaticBlock(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StaticBlock") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAnyTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AnyTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrayTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassImplements(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassImplements") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareClass(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareClass") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareInterface(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareInterface") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareModule(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareModule") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareModuleExports(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareModuleExports") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareTypeAlias(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareTypeAlias") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareOpaqueType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareOpaqueType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareVariable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareVariable") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareExportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareExportAllDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareExportAllDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclaredPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclaredPredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExistsTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExistsTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionTypeParam(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionTypeParam") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isGenericTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "GenericTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInferredPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InferredPredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceExtends(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceExtends") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIntersectionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "IntersectionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMixedTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MixedTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEmptyTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EmptyTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullableTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullableTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeInternalSlot(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeInternalSlot") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeCallProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeCallProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeIndexer(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeIndexer") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeSpreadProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeSpreadProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOpaqueType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OpaqueType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isQualifiedTypeIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "QualifiedTypeIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSymbolTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SymbolTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThisTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThisTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTupleTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TupleTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeofTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeofTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeAlias(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeAlias") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeCastExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeCastExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameter(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameter") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameterDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameterDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameterInstantiation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameterInstantiation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UnionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariance(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Variance") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVoidTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VoidTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumBooleanBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumBooleanBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumNumberBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumNumberBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumStringBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumStringBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumSymbolBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumSymbolBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumBooleanMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumBooleanMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumNumberMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumNumberMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumStringMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumStringMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumDefaultedMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumDefaultedMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIndexedAccessType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "IndexedAccessType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalIndexedAccessType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OptionalIndexedAccessType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXAttribute(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXClosingElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXClosingElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXEmptyExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXEmptyExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXExpressionContainer(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXExpressionContainer") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXSpreadChild(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXSpreadChild") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXMemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXNamespacedName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXNamespacedName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXOpeningElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXOpeningElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXSpreadAttribute(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXSpreadAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXText(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXText") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXOpeningFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXOpeningFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXClosingFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXClosingFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNoop(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Noop") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPlaceholder(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Placeholder") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isV8IntrinsicIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "V8IntrinsicIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArgumentPlaceholder(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArgumentPlaceholder") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBindExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BindExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportAttribute(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDecorator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Decorator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDoExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DoExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDefaultSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportDefaultSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRecordExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RecordExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTupleExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TupleExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDecimalLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DecimalLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ModuleExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTopicReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TopicReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelineTopicExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelineTopicExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelineBareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelineBareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelinePrimaryTopicReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelinePrimaryTopicReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSParameterProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSParameterProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSDeclareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSDeclareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSDeclareMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSDeclareMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSQualifiedName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSQualifiedName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSCallSignatureDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSCallSignatureDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConstructSignatureDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConstructSignatureDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSPropertySignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSPropertySignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSMethodSignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSMethodSignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIndexSignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIndexSignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSAnyKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSAnyKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSBooleanKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSBooleanKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSBigIntKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSBigIntKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIntrinsicKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIntrinsicKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNeverKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNeverKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNullKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNullKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNumberKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNumberKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSObjectKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSObjectKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSStringKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSStringKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSSymbolKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSSymbolKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUndefinedKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUndefinedKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUnknownKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUnknownKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSVoidKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSVoidKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSThisType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSThisType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSFunctionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSFunctionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConstructorType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConstructorType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypePredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypePredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeQuery(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeQuery") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSArrayType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSArrayType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTupleType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTupleType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSOptionalType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSOptionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSRestType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSRestType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNamedTupleMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNamedTupleMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUnionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUnionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIntersectionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIntersectionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConditionalType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConditionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInferType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInferType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSParenthesizedType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSParenthesizedType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeOperator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeOperator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIndexedAccessType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIndexedAccessType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSMappedType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSMappedType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSLiteralType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSLiteralType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExpressionWithTypeArguments(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExpressionWithTypeArguments") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInterfaceDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInterfaceDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInterfaceBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInterfaceBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAliasDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAliasDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSAsExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSAsExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAssertion(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAssertion") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEnumDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSEnumDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEnumMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSEnumMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSModuleDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSModuleDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSModuleBlock(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSModuleBlock") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSImportType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSImportType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSImportEqualsDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSImportEqualsDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExternalModuleReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExternalModuleReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNonNullExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNonNullExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExportAssignment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExportAssignment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNamespaceExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNamespaceExportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameterInstantiation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameterInstantiation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameterDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameterDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameter(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameter") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStandardized(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "InterpreterDirective" === nodeType || "Directive" === nodeType || "DirectiveLiteral" === nodeType || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "CallExpression" === nodeType || "CatchClause" === nodeType || "ConditionalExpression" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "File" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "Program" === nodeType || "ObjectExpression" === nodeType || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "RestElement" === nodeType || "ReturnStatement" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "SwitchCase" === nodeType || "SwitchStatement" === nodeType || "ThisExpression" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "VariableDeclaration" === nodeType || "VariableDeclarator" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassBody" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ExportSpecifier" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "MetaProperty" === nodeType || "ClassMethod" === nodeType || "ObjectPattern" === nodeType || "SpreadElement" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateElement" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "ExportNamespaceSpecifier" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType || "StaticBlock" === nodeType || nodeType === "Placeholder" && ("Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode || "BlockStatement" === node.expectedNode || "ClassBody" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TopicReference" === nodeType || "PipelineTopicExpression" === nodeType || "PipelineBareFunction" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBinary(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isScopable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlockParent(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlock(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTerminatorless(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCompletionStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isConditional(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLoop(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWhile(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpressionWrapper(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFor(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForXStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionParent(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPureish(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPatternLike(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLVal(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEntityName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImmutable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUserWhitespacable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnaryLike(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClass(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAccessor(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ClassAccessorProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPrivate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlow(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "EnumDeclaration" === nodeType || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowBaseAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSX(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMiscellaneous(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("Noop" === nodeType || "Placeholder" === nodeType || "V8IntrinsicIdentifier" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeScript(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("TSParameterProperty" === nodeType || "TSDeclareFunction" === nodeType || "TSDeclareMethod" === nodeType || "TSQualifiedName" === nodeType || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSNamedTupleMember" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSInterfaceBody" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSEnumDeclaration" === nodeType || "TSEnumMember" === nodeType || "TSModuleDeclaration" === nodeType || "TSModuleBlock" === nodeType || "TSImportType" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExternalModuleReference" === nodeType || "TSNonNullExpression" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || "TSTypeAnnotation" === nodeType || "TSTypeParameterInstantiation" === nodeType || "TSTypeParameterDeclaration" === nodeType || "TSTypeParameter" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSBaseType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberLiteral(node, opts) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRegexLiteral(node, opts) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RegexLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRestProperty(node, opts) { + console.trace("The node type RestProperty has been renamed to RestElement"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RestProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSpreadProperty(node, opts) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SpreadProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/is.js b/node_modules/@babel/types/lib/validators/is.js new file mode 100644 index 0000000..581979f --- /dev/null +++ b/node_modules/@babel/types/lib/validators/is.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = is; + +var _shallowEqual = require("../utils/shallowEqual"); + +var _isType = require("./isType"); + +var _isPlaceholderType = require("./isPlaceholderType"); + +var _definitions = require("../definitions"); + +function is(type, node, opts) { + if (!node) return false; + const matches = (0, _isType.default)(node.type, type); + + if (!matches) { + if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { + return (0, _isPlaceholderType.default)(node.expectedNode, type); + } + + return false; + } + + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isBinding.js b/node_modules/@babel/types/lib/validators/isBinding.js new file mode 100644 index 0000000..74c86dd --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isBinding.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBinding; + +var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers"); + +function isBinding(node, parent, grandparent) { + if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { + return false; + } + + const keys = _getBindingIdentifiers.default.keys[parent.type]; + + if (keys) { + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const val = parent[key]; + + if (Array.isArray(val)) { + if (val.indexOf(node) >= 0) return true; + } else { + if (val === node) return true; + } + } + } + + return false; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isBlockScoped.js b/node_modules/@babel/types/lib/validators/isBlockScoped.js new file mode 100644 index 0000000..77ec166 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isBlockScoped.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBlockScoped; + +var _generated = require("./generated"); + +var _isLet = require("./isLet"); + +function isBlockScoped(node) { + return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isImmutable.js b/node_modules/@babel/types/lib/validators/isImmutable.js new file mode 100644 index 0000000..27754f6 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isImmutable.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isImmutable; + +var _isType = require("./isType"); + +var _generated = require("./generated"); + +function isImmutable(node) { + if ((0, _isType.default)(node.type, "Immutable")) return true; + + if ((0, _generated.isIdentifier)(node)) { + if (node.name === "undefined") { + return true; + } else { + return false; + } + } + + return false; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isLet.js b/node_modules/@babel/types/lib/validators/isLet.js new file mode 100644 index 0000000..93d7562 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isLet.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLet; + +var _generated = require("./generated"); + +var _constants = require("../constants"); + +function isLet(node) { + return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isNode.js b/node_modules/@babel/types/lib/validators/isNode.js new file mode 100644 index 0000000..e88a47a --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isNode.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNode; + +var _definitions = require("../definitions"); + +function isNode(node) { + return !!(node && _definitions.VISITOR_KEYS[node.type]); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/node_modules/@babel/types/lib/validators/isNodesEquivalent.js new file mode 100644 index 0000000..f829834 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isNodesEquivalent.js @@ -0,0 +1,67 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNodesEquivalent; + +var _definitions = require("../definitions"); + +function isNodesEquivalent(a, b) { + if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { + return a === b; + } + + if (a.type !== b.type) { + return false; + } + + const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); + const visitorKeys = _definitions.VISITOR_KEYS[a.type]; + + for (const field of fields) { + if (typeof a[field] !== typeof b[field]) { + return false; + } + + if (a[field] == null && b[field] == null) { + continue; + } else if (a[field] == null || b[field] == null) { + return false; + } + + if (Array.isArray(a[field])) { + if (!Array.isArray(b[field])) { + return false; + } + + if (a[field].length !== b[field].length) { + return false; + } + + for (let i = 0; i < a[field].length; i++) { + if (!isNodesEquivalent(a[field][i], b[field][i])) { + return false; + } + } + + continue; + } + + if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) { + for (const key of Object.keys(a[field])) { + if (a[field][key] !== b[field][key]) { + return false; + } + } + + continue; + } + + if (!isNodesEquivalent(a[field], b[field])) { + return false; + } + } + + return true; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isPlaceholderType.js b/node_modules/@babel/types/lib/validators/isPlaceholderType.js new file mode 100644 index 0000000..e8271de --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isPlaceholderType.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isPlaceholderType; + +var _definitions = require("../definitions"); + +function isPlaceholderType(placeholderType, targetType) { + if (placeholderType === targetType) return true; + const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; + + if (aliases) { + for (const alias of aliases) { + if (targetType === alias) return true; + } + } + + return false; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isReferenced.js b/node_modules/@babel/types/lib/validators/isReferenced.js new file mode 100644 index 0000000..471150b --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isReferenced.js @@ -0,0 +1,128 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isReferenced; + +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + case "MemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + + return parent.object === node; + + case "JSXMemberExpression": + return parent.object === node; + + case "VariableDeclarator": + return parent.init === node; + + case "ArrowFunctionExpression": + return parent.body === node; + + case "PrivateName": + return false; + + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.key === node) { + return !!parent.computed; + } + + return false; + + case "ObjectProperty": + if (parent.key === node) { + return !!parent.computed; + } + + return !grandparent || grandparent.type !== "ObjectPattern"; + + case "ClassProperty": + case "ClassAccessorProperty": + if (parent.key === node) { + return !!parent.computed; + } + + return true; + + case "ClassPrivateProperty": + return parent.key !== node; + + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + + case "AssignmentExpression": + return parent.right === node; + + case "AssignmentPattern": + return parent.right === node; + + case "LabeledStatement": + return false; + + case "CatchClause": + return false; + + case "RestElement": + return false; + + case "BreakStatement": + case "ContinueStatement": + return false; + + case "FunctionDeclaration": + case "FunctionExpression": + return false; + + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + + case "ExportSpecifier": + if (grandparent != null && grandparent.source) { + return false; + } + + return parent.local === node; + + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + + case "ImportAttribute": + return false; + + case "JSXAttribute": + return false; + + case "ObjectPattern": + case "ArrayPattern": + return false; + + case "MetaProperty": + return false; + + case "ObjectTypeProperty": + return parent.key !== node; + + case "TSEnumMember": + return parent.id !== node; + + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + + return true; + } + + return true; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isScope.js b/node_modules/@babel/types/lib/validators/isScope.js new file mode 100644 index 0000000..0f82449 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isScope.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isScope; + +var _generated = require("./generated"); + +function isScope(node, parent) { + if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) { + return false; + } + + if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) { + return true; + } + + return (0, _generated.isScopable)(node); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isSpecifierDefault.js b/node_modules/@babel/types/lib/validators/isSpecifierDefault.js new file mode 100644 index 0000000..25431cc --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isSpecifierDefault.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isSpecifierDefault; + +var _generated = require("./generated"); + +function isSpecifierDefault(specifier) { + return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, { + name: "default" + }); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isType.js b/node_modules/@babel/types/lib/validators/isType.js new file mode 100644 index 0000000..59d31df --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isType.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isType; + +var _definitions = require("../definitions"); + +function isType(nodeType, targetType) { + if (nodeType === targetType) return true; + if (_definitions.ALIAS_KEYS[targetType]) return false; + const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; + + if (aliases) { + if (aliases[0] === nodeType) return true; + + for (const alias of aliases) { + if (nodeType === alias) return true; + } + } + + return false; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/node_modules/@babel/types/lib/validators/isValidES3Identifier.js new file mode 100644 index 0000000..5cef566 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isValidES3Identifier.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isValidES3Identifier; + +var _isValidIdentifier = require("./isValidIdentifier"); + +const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]); + +function isValidES3Identifier(name) { + return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/node_modules/@babel/types/lib/validators/isValidIdentifier.js new file mode 100644 index 0000000..3fa6f98 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isValidIdentifier.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isValidIdentifier; + +var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); + +function isValidIdentifier(name, reserved = true) { + if (typeof name !== "string") return false; + + if (reserved) { + if ((0, _helperValidatorIdentifier.isKeyword)(name) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name, true)) { + return false; + } + } + + return (0, _helperValidatorIdentifier.isIdentifierName)(name); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isVar.js b/node_modules/@babel/types/lib/validators/isVar.js new file mode 100644 index 0000000..a34801d --- /dev/null +++ b/node_modules/@babel/types/lib/validators/isVar.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isVar; + +var _generated = require("./generated"); + +var _constants = require("../constants"); + +function isVar(node) { + return (0, _generated.isVariableDeclaration)(node, { + kind: "var" + }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/matchesPattern.js b/node_modules/@babel/types/lib/validators/matchesPattern.js new file mode 100644 index 0000000..d961f5a --- /dev/null +++ b/node_modules/@babel/types/lib/validators/matchesPattern.js @@ -0,0 +1,42 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = matchesPattern; + +var _generated = require("./generated"); + +function matchesPattern(member, match, allowPartial) { + if (!(0, _generated.isMemberExpression)(member)) return false; + const parts = Array.isArray(match) ? match : match.split("."); + const nodes = []; + let node; + + for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { + nodes.push(node.property); + } + + nodes.push(node); + if (nodes.length < parts.length) return false; + if (!allowPartial && nodes.length > parts.length) return false; + + for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { + const node = nodes[j]; + let value; + + if ((0, _generated.isIdentifier)(node)) { + value = node.name; + } else if ((0, _generated.isStringLiteral)(node)) { + value = node.value; + } else if ((0, _generated.isThisExpression)(node)) { + value = "this"; + } else { + return false; + } + + if (parts[i] !== value) return false; + } + + return true; +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/react/isCompatTag.js b/node_modules/@babel/types/lib/validators/react/isCompatTag.js new file mode 100644 index 0000000..57761c2 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/react/isCompatTag.js @@ -0,0 +1,10 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCompatTag; + +function isCompatTag(tagName) { + return !!tagName && /^[a-z]/.test(tagName); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/node_modules/@babel/types/lib/validators/react/isReactComponent.js new file mode 100644 index 0000000..0dd2102 --- /dev/null +++ b/node_modules/@babel/types/lib/validators/react/isReactComponent.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _buildMatchMemberExpression = require("../buildMatchMemberExpression"); + +const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); +var _default = isReactComponent; +exports.default = _default;
\ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/validate.js b/node_modules/@babel/types/lib/validators/validate.js new file mode 100644 index 0000000..a2bfe3d --- /dev/null +++ b/node_modules/@babel/types/lib/validators/validate.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = validate; +exports.validateChild = validateChild; +exports.validateField = validateField; + +var _definitions = require("../definitions"); + +function validate(node, key, val) { + if (!node) return; + const fields = _definitions.NODE_FIELDS[node.type]; + if (!fields) return; + const field = fields[key]; + validateField(node, key, val, field); + validateChild(node, key, val); +} + +function validateField(node, key, val, field) { + if (!(field != null && field.validate)) return; + if (field.optional && val == null) return; + field.validate(node, key, val); +} + +function validateChild(node, key, val) { + if (val == null) return; + const validate = _definitions.NODE_PARENT_VALIDATIONS[val.type]; + if (!validate) return; + validate(node, key, val); +}
\ No newline at end of file diff --git a/node_modules/@babel/types/package.json b/node_modules/@babel/types/package.json new file mode 100644 index 0000000..bf92dac --- /dev/null +++ b/node_modules/@babel/types/package.json @@ -0,0 +1,39 @@ +{ + "name": "@babel/types", + "version": "7.17.0", + "description": "Babel Types is a Lodash-esque utility library for AST nodes", + "author": "The Babel Team (https://babel.dev/team)", + "homepage": "https://babel.dev/docs/en/next/babel-types", + "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-types" + }, + "main": "./lib/index.js", + "types": "./lib/index-legacy.d.ts", + "typesVersions": { + ">=3.7": { + "lib/index-legacy.d.ts": [ + "lib/index.d.ts" + ] + } + }, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "devDependencies": { + "@babel/generator": "^7.17.0", + "@babel/parser": "^7.17.0", + "chalk": "^4.1.0", + "glob": "^7.1.7" + }, + "engines": { + "node": ">=6.9.0" + } +}
\ No newline at end of file diff --git a/node_modules/@babel/types/scripts/generators/asserts.js b/node_modules/@babel/types/scripts/generators/asserts.js new file mode 100644 index 0000000..bdfd948 --- /dev/null +++ b/node_modules/@babel/types/scripts/generators/asserts.js @@ -0,0 +1,50 @@ +import definitions from "../../lib/definitions/index.js"; + +function addAssertHelper(type) { + const result = + definitions.NODE_FIELDS[type] || definitions.FLIPPED_ALIAS_KEYS[type] + ? `node is t.${type}` + : "boolean"; + + return `export function assert${type}(node: object | null | undefined, opts?: object | null): asserts ${ + result === "boolean" ? "node" : result + } { + assert("${type}", node, opts) } + `; +} + +export default function generateAsserts() { + let output = `/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import is from "../../validators/is"; +import type * as t from "../.."; + +function assert(type: string, node: any, opts?: any): void { + if (!is(type, node, opts)) { + throw new Error( + \`Expected type "\${type}" with option \${JSON.stringify(opts)}, \` + + \`but instead got "\${node.type}".\`, + ); + } +}\n\n`; + + Object.keys(definitions.VISITOR_KEYS).forEach(type => { + output += addAssertHelper(type); + }); + + Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { + output += addAssertHelper(type); + }); + + Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { + const newType = definitions.DEPRECATED_KEYS[type]; + output += `export function assert${type}(node: any, opts: any): void { + console.trace("The node type ${type} has been renamed to ${newType}"); + assert("${type}", node, opts); +}\n`; + }); + + return output; +} diff --git a/node_modules/@babel/types/scripts/generators/ast-types.js b/node_modules/@babel/types/scripts/generators/ast-types.js new file mode 100644 index 0000000..3bf4286 --- /dev/null +++ b/node_modules/@babel/types/scripts/generators/ast-types.js @@ -0,0 +1,144 @@ +import t from "../../lib/index.js"; +import stringifyValidator from "../utils/stringifyValidator.js"; + +export default function generateAstTypes() { + let code = `// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/ast-types.js for script used. + +interface BaseComment { + value: string; + start: number; + end: number; + loc: SourceLocation; + type: "CommentBlock" | "CommentLine"; +} + +export interface CommentBlock extends BaseComment { + type: "CommentBlock"; +} + +export interface CommentLine extends BaseComment { + type: "CommentLine"; +} + +export type Comment = CommentBlock | CommentLine; + +export interface SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +interface BaseNode { + leadingComments: ReadonlyArray<Comment> | null; + innerComments: ReadonlyArray<Comment> | null; + trailingComments: ReadonlyArray<Comment> | null; + start: number | null; + end: number | null; + loc: SourceLocation | null; + type: Node["type"]; + range?: [number, number]; + extra?: Record<string, unknown>; +} + +export type CommentTypeShorthand = "leading" | "inner" | "trailing"; + +export type Node = ${t.TYPES.filter(k => !t.FLIPPED_ALIAS_KEYS[k]) + .sort() + .join(" | ")};\n\n`; + + const deprecatedAlias = {}; + for (const type in t.DEPRECATED_KEYS) { + deprecatedAlias[t.DEPRECATED_KEYS[type]] = type; + } + for (const type in t.NODE_FIELDS) { + const fields = t.NODE_FIELDS[type]; + const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type); + const struct = []; + + fieldNames.forEach(fieldName => { + const field = fields[fieldName]; + // Future / annoying TODO: + // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either: + // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key, + // - declare an alias type for valid keys, detect the case and reuse it here, + // - declare a disjoint union with, for example, ObjectPropertyBase, + // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty + // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)" + let typeAnnotation = stringifyValidator(field.validate, ""); + + if (isNullable(field) && !hasDefault(field)) { + typeAnnotation += " | null"; + } + + const alphaNumeric = /^\w+$/; + const optional = field.optional ? "?" : ""; + + if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) { + struct.push(`${fieldName}${optional}: ${typeAnnotation};`); + } else { + struct.push(`"${fieldName}"${optional}: ${typeAnnotation};`); + } + }); + + code += `export interface ${type} extends BaseNode { + type: "${type}"; + ${struct.join("\n ").trim()} +}\n\n`; + + if (deprecatedAlias[type]) { + code += `/** + * @deprecated Use \`${type}\` + */ +export interface ${deprecatedAlias[type]} extends BaseNode { + type: "${deprecatedAlias[type]}"; + ${struct.join("\n ").trim()} +}\n\n +`; + } + } + + for (const type in t.FLIPPED_ALIAS_KEYS) { + const types = t.FLIPPED_ALIAS_KEYS[type]; + code += `export type ${type} = ${types + .map(type => `${type}`) + .join(" | ")};\n`; + } + code += "\n"; + + code += "export interface Aliases {\n"; + for (const type in t.FLIPPED_ALIAS_KEYS) { + code += ` ${type}: ${type};\n`; + } + code += "}\n\n"; + code += `export type DeprecatedAliases = ${Object.keys( + t.DEPRECATED_KEYS + ).join(" | ")}\n\n`; + + return code; +} + +function hasDefault(field) { + return field.default != null; +} + +function isNullable(field) { + return field.optional || hasDefault(field); +} + +function sortFieldNames(fields, type) { + return fields.sort((fieldA, fieldB) => { + const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }); +} diff --git a/node_modules/@babel/types/scripts/generators/builders.js b/node_modules/@babel/types/scripts/generators/builders.js new file mode 100644 index 0000000..13e772e --- /dev/null +++ b/node_modules/@babel/types/scripts/generators/builders.js @@ -0,0 +1,163 @@ +import t from "../../lib/index.js"; +import definitions from "../../lib/definitions/index.js"; +import formatBuilderName from "../utils/formatBuilderName.js"; +import lowerFirst from "../utils/lowerFirst.js"; +import stringifyValidator from "../utils/stringifyValidator.js"; + +function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) { + const index = fieldNames.indexOf(fieldName); + return fieldNames.slice(index).every(_ => isNullable(fields[_])); +} + +function hasDefault(field) { + return field.default != null; +} + +function isNullable(field) { + return field.optional || hasDefault(field); +} + +function sortFieldNames(fields, type) { + return fields.sort((fieldA, fieldB) => { + const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }); +} + +function generateBuilderArgs(type) { + const fields = t.NODE_FIELDS[type]; + const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type); + const builderNames = t.BUILDER_KEYS[type]; + + const args = []; + + fieldNames.forEach(fieldName => { + const field = fields[fieldName]; + // Future / annoying TODO: + // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either: + // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key, + // - declare an alias type for valid keys, detect the case and reuse it here, + // - declare a disjoint union with, for example, ObjectPropertyBase, + // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty + // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)" + let typeAnnotation = stringifyValidator(field.validate, "t."); + + if (isNullable(field) && !hasDefault(field)) { + typeAnnotation += " | null"; + } + + if (builderNames.includes(fieldName)) { + const bindingIdentifierName = t.toBindingIdentifierName(fieldName); + if (areAllRemainingFieldsNullable(fieldName, builderNames, fields)) { + args.push( + `${bindingIdentifierName}${ + isNullable(field) ? "?:" : ":" + } ${typeAnnotation}` + ); + } else { + args.push( + `${bindingIdentifierName}: ${typeAnnotation}${ + isNullable(field) ? " | undefined" : "" + }` + ); + } + } + }); + + return args; +} + +export default function generateBuilders(kind) { + return kind === "uppercase.js" + ? generateUppercaseBuilders() + : generateLowercaseBuilders(); +} + +function generateLowercaseBuilders() { + let output = `/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import builder from "../builder"; +import type * as t from "../.."; + +/* eslint-disable @typescript-eslint/no-unused-vars */ + +`; + + const reservedNames = new Set(["super", "import"]); + Object.keys(definitions.BUILDER_KEYS).forEach(type => { + const defArgs = generateBuilderArgs(type); + const formatedBuilderName = formatBuilderName(type); + const formatedBuilderNameLocal = reservedNames.has(formatedBuilderName) + ? `_${formatedBuilderName}` + : formatedBuilderName; + output += `${ + formatedBuilderNameLocal === formatedBuilderName ? "export " : "" + }function ${formatedBuilderNameLocal}(${defArgs.join( + ", " + )}): t.${type} { return builder.apply("${type}", arguments); }\n`; + if (formatedBuilderNameLocal !== formatedBuilderName) { + output += `export { ${formatedBuilderNameLocal} as ${formatedBuilderName} };\n`; + } + + // This is needed for backwards compatibility. + // It should be removed in the next major version. + // JSXIdentifier -> jSXIdentifier + if (/^[A-Z]{2}/.test(type)) { + output += `export { ${formatedBuilderNameLocal} as ${lowerFirst( + type + )} }\n`; + } + }); + + Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { + const newType = definitions.DEPRECATED_KEYS[type]; + const formatedBuilderName = formatBuilderName(type); + output += `/** @deprecated */ +function ${type}(${generateBuilderArgs(newType).join(", ")}): t.${type} { + console.trace("The node type ${type} has been renamed to ${newType}"); + return builder.apply("${type}", arguments); +} +export { ${type} as ${formatedBuilderName} };\n`; + // This is needed for backwards compatibility. + // It should be removed in the next major version. + // JSXIdentifier -> jSXIdentifier + if (/^[A-Z]{2}/.test(type)) { + output += `export { ${type} as ${lowerFirst(type)} }\n`; + } + }); + + return output; +} + +function generateUppercaseBuilders() { + let output = `/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ + +/** + * This file is written in JavaScript and not TypeScript because uppercase builders + * conflict with AST types. TypeScript reads the uppercase.d.ts file instead. + */ + + export {\n`; + + Object.keys(definitions.BUILDER_KEYS).forEach(type => { + const formatedBuilderName = formatBuilderName(type); + output += ` ${formatedBuilderName} as ${type},\n`; + }); + + Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { + const formatedBuilderName = formatBuilderName(type); + output += ` ${formatedBuilderName} as ${type},\n`; + }); + + output += ` } from './index';\n`; + return output; +} diff --git a/node_modules/@babel/types/scripts/generators/constants.js b/node_modules/@babel/types/scripts/generators/constants.js new file mode 100644 index 0000000..68abdbd --- /dev/null +++ b/node_modules/@babel/types/scripts/generators/constants.js @@ -0,0 +1,15 @@ +import definitions from "../../lib/definitions/index.js"; + +export default function generateConstants() { + let output = `/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import { FLIPPED_ALIAS_KEYS } from "../../definitions";\n\n`; + + Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { + output += `export const ${type.toUpperCase()}_TYPES = FLIPPED_ALIAS_KEYS["${type}"];\n`; + }); + + return output; +} diff --git a/node_modules/@babel/types/scripts/generators/docs.js b/node_modules/@babel/types/scripts/generators/docs.js new file mode 100644 index 0000000..95e4815 --- /dev/null +++ b/node_modules/@babel/types/scripts/generators/docs.js @@ -0,0 +1,282 @@ +import util from "util"; +import stringifyValidator from "../utils/stringifyValidator.js"; +import toFunctionName from "../utils/toFunctionName.js"; + +import t from "../../lib/index.js"; + +const readme = [ + `--- +id: babel-types +title: @babel/types +--- +<!-- Do not modify! This file is automatically generated by + github.com/babel/babel/babel-types/scripts/generators/docs.js !--> + +> This module contains methods for building ASTs manually and for checking the types of AST nodes. + +## Install + +\`\`\`sh +npm install --save-dev @babel/types +\`\`\` + +## API`, +]; + +const customTypes = { + ClassMethod: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, + Identifier: { + name: "`string`", + }, + MemberExpression: { + property: "if computed then `Expression` else `Identifier`", + }, + ObjectMethod: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, + ObjectProperty: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, + ClassPrivateMethod: { + computed: "'false'", + }, + ClassPrivateProperty: { + computed: "'false'", + }, +}; +const APIHistory = { + ClassProperty: [["v7.6.0", "Supports `static`"]], +}; +function formatHistory(historyItems) { + const lines = historyItems.map( + item => "| `" + item[0] + "` | " + item[1] + " |" + ); + return [ + "<details>", + " <summary>History</summary>", + "| Version | Changes |", + "| --- | --- |", + ...lines, + "</details>", + ]; +} +function printAPIHistory(key, readme) { + if (APIHistory[key]) { + readme.push(""); + readme.push(...formatHistory(APIHistory[key])); + } +} +function printNodeFields(key, readme) { + if (Object.keys(t.NODE_FIELDS[key]).length > 0) { + readme.push(""); + readme.push("AST Node `" + key + "` shape:"); + Object.keys(t.NODE_FIELDS[key]) + .sort(function (fieldA, fieldB) { + const indexA = t.BUILDER_KEYS[key].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[key].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }) + .forEach(function (field) { + const defaultValue = t.NODE_FIELDS[key][field].default; + const fieldDescription = ["`" + field + "`"]; + const validator = t.NODE_FIELDS[key][field].validate; + if (customTypes[key] && customTypes[key][field]) { + fieldDescription.push(`: ${customTypes[key][field]}`); + } else if (validator) { + try { + fieldDescription.push( + ": `" + stringifyValidator(validator, "") + "`" + ); + } catch (ex) { + if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") { + console.log( + "Unrecognised validator type for " + key + "." + field + ); + console.dir(ex.validator, { depth: 10, colors: true }); + } + } + } + if (defaultValue !== null || t.NODE_FIELDS[key][field].optional) { + fieldDescription.push( + " (default: `" + util.inspect(defaultValue) + "`" + ); + if (t.BUILDER_KEYS[key].indexOf(field) < 0) { + fieldDescription.push(", excluded from builder function"); + } + fieldDescription.push(")"); + } else { + fieldDescription.push(" (required)"); + } + readme.push("- " + fieldDescription.join("")); + }); + } +} + +function printAliasKeys(key, readme) { + if (t.ALIAS_KEYS[key] && t.ALIAS_KEYS[key].length) { + readme.push(""); + readme.push( + "Aliases: " + + t.ALIAS_KEYS[key] + .map(function (key) { + return "[`" + key + "`](#" + key.toLowerCase() + ")"; + }) + .join(", ") + ); + } +} +readme.push("### Node Builders"); +readme.push(""); +Object.keys(t.BUILDER_KEYS) + .sort() + .forEach(function (key) { + readme.push("#### " + toFunctionName(key)); + readme.push(""); + readme.push("```javascript"); + readme.push( + "t." + toFunctionName(key) + "(" + t.BUILDER_KEYS[key].join(", ") + ");" + ); + readme.push("```"); + printAPIHistory(key, readme); + readme.push(""); + readme.push( + "See also `t.is" + + key + + "(node, opts)` and `t.assert" + + key + + "(node, opts)`." + ); + + printNodeFields(key, readme); + printAliasKeys(key, readme); + + readme.push(""); + readme.push("---"); + readme.push(""); + }); + +function generateMapAliasToNodeTypes() { + const result = new Map(); + for (const nodeType of Object.keys(t.ALIAS_KEYS)) { + const aliases = t.ALIAS_KEYS[nodeType]; + if (!aliases) continue; + for (const alias of aliases) { + if (!result.has(alias)) { + result.set(alias, []); + } + const nodeTypes = result.get(alias); + nodeTypes.push(nodeType); + } + } + return result; +} +const aliasDescriptions = { + Binary: + "A cover of BinaryExpression and LogicalExpression, which share the same AST shape.", + Block: "Deprecated. Will be removed in Babel 8.", + BlockParent: + "A cover of AST nodes that start an execution context with new [LexicalEnvironment](https://tc39.es/ecma262/#table-additional-state-components-for-ecmascript-code-execution-contexts). In other words, they define the scope of `let` and `const` declarations.", + Class: + "A cover of ClassExpression and ClassDeclaration, which share the same AST shape.", + CompletionStatement: + "A statement that indicates the [completion records](https://tc39.es/ecma262/#sec-completion-record-specification-type). In other words, they define the control flow of the program, such as when should a loop break or an action throws critical errors.", + Conditional: + "A cover of ConditionalExpression and IfStatement, which share the same AST shape.", + Declaration: + "A cover of any [Declaration](https://tc39.es/ecma262/#prod-Declaration)s.", + EnumBody: "A cover of Flow enum bodies.", + EnumMember: "A cover of Flow enum membors.", + ExportDeclaration: + "A cover of any [ExportDeclaration](https://tc39.es/ecma262/#prod-ExportDeclaration)s.", + Expression: + "A cover of any [Expression](https://tc39.es/ecma262/#sec-ecmascript-language-expressions)s.", + ExpressionWrapper: + "A wrapper of expression that does not have runtime semantics.", + Flow: "A cover of AST nodes defined for Flow.", + FlowBaseAnnotation: "A cover of primary Flow type annotations.", + FlowDeclaration: "A cover of Flow declarations.", + FlowPredicate: "A cover of Flow predicates.", + FlowType: "A cover of Flow type annotations.", + For: "A cover of [ForStatement](https://tc39.es/ecma262/#sec-for-statement)s and [ForXStatement](#forxstatement)s.", + ForXStatement: + "A cover of [ForInStatements and ForOfStatements](https://tc39.es/ecma262/#sec-for-in-and-for-of-statements).", + Function: + "A cover of functions and [method](#method)s, the must have `body` and `params`. Note: `Function` is different to `FunctionParent`. For example, a `StaticBlock` is a `FunctionParent` but not `Function`.", + FunctionParent: + "A cover of AST nodes that start an execution context with new [VariableEnvironment](https://tc39.es/ecma262/#table-additional-state-components-for-ecmascript-code-execution-contexts). In other words, they define the scope of `var` declarations. FunctionParent did not include `Program` since Babel 7.", + Immutable: + "A cover of immutable objects and JSX elements. An object is [immutable](https://tc39.es/ecma262/#immutable-prototype-exotic-object) if no other properties can be defined once created.", + JSX: "A cover of AST nodes defined for [JSX](https://facebook.github.io/jsx/).", + LVal: "A cover of left hand side expressions used in the `left` of assignment expressions and [ForXStatement](#forxstatement)s. ", + Literal: + "A cover of [Literal](https://tc39.es/ecma262/#sec-primary-expression-literals)s, [Regular Expression Literal](https://tc39.es/ecma262/#sec-primary-expression-regular-expression-literals)s and [Template Literal](https://tc39.es/ecma262/#sec-template-literals)s.", + Loop: "A cover of loop statements.", + Method: "A cover of object methods and class methods.", + Miscellaneous: + "A cover of non-standard AST types that are sometimes useful for development.", + ModuleDeclaration: + "A cover of ImportDeclaration and [ExportDeclaration](#exportdeclaration)", + ModuleSpecifier: + "A cover of import and export specifiers. Note: It is _not_ the [ModuleSpecifier](https://tc39.es/ecma262/#prod-ModuleSpecifier) defined in the spec.", + ObjectMember: + "A cover of [members](https://tc39.es/ecma262/#prod-PropertyDefinitionList) in an object literal.", + Pattern: + "A cover of [BindingPattern](https://tc39.es/ecma262/#prod-BindingPattern) except Identifiers.", + PatternLike: + "A cover of [BindingPattern](https://tc39.es/ecma262/#prod-BindingPattern)s. ", + Private: "A cover of private class elements and private identifiers.", + Property: "A cover of object properties and class properties.", + Pureish: + "A cover of AST nodes which do not have side-effects. In other words, there is no observable behaviour changes if they are evaluated more than once.", + Scopable: + "A cover of [FunctionParent](#functionparent) and [BlockParent](#blockparent).", + Standardized: + "A cover of AST nodes which are part of an official ECMAScript specification.", + Statement: + "A cover of any [Statement](https://tc39.es/ecma262/#prod-Statement)s.", + TSBaseType: "A cover of primary TypeScript type annotations.", + TSEntityName: "A cover of ts entities.", + TSType: "A cover of TypeScript type annotations.", + TSTypeElement: "A cover of TypeScript type declarations.", + TypeScript: "A cover of AST nodes defined for TypeScript.", + Terminatorless: + "A cover of AST nodes whose semantic will change when a line terminator is inserted between the operator and the operand.", + UnaryLike: "A cover of UnaryExpression and SpreadElement.", + UserWhitespacable: "Deprecated. Will be removed in Babel 8.", + While: + "A cover of DoWhileStatement and WhileStatement, which share the same AST shape.", +}; +const mapAliasToNodeTypes = generateMapAliasToNodeTypes(); +readme.push("### Aliases"); +readme.push(""); +for (const alias of [...mapAliasToNodeTypes.keys()].sort()) { + const nodeTypes = mapAliasToNodeTypes.get(alias); + nodeTypes.sort(); + if (!(alias in aliasDescriptions)) { + throw new Error( + 'Missing alias descriptions of "' + + alias + + ", which covers " + + nodeTypes.join(",") + ); + } + readme.push("#### " + alias); + readme.push(""); + readme.push(aliasDescriptions[alias]); + readme.push("```javascript"); + readme.push("t.is" + alias + "(node);"); + readme.push("```"); + readme.push(""); + readme.push("Covered nodes: "); + for (const nodeType of nodeTypes) { + readme.push("- [`" + nodeType + "`](#" + nodeType.toLowerCase() + ")"); + } + readme.push(""); +} + +process.stdout.write(readme.join("\n")); diff --git a/node_modules/@babel/types/scripts/generators/flow.js b/node_modules/@babel/types/scripts/generators/flow.js new file mode 100644 index 0000000..7fabcc6 --- /dev/null +++ b/node_modules/@babel/types/scripts/generators/flow.js @@ -0,0 +1,260 @@ +import t from "../../lib/index.js"; +import stringifyValidator from "../utils/stringifyValidator.js"; +import toFunctionName from "../utils/toFunctionName.js"; + +const NODE_PREFIX = "BabelNode"; + +let code = `// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/flow.js for script used. + +declare class ${NODE_PREFIX}Comment { + value: string; + start: number; + end: number; + loc: ${NODE_PREFIX}SourceLocation; +} + +declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment { + type: "CommentBlock"; +} + +declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment { + type: "CommentLine"; +} + +declare class ${NODE_PREFIX}SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +declare class ${NODE_PREFIX} { + leadingComments?: Array<${NODE_PREFIX}Comment>; + innerComments?: Array<${NODE_PREFIX}Comment>; + trailingComments?: Array<${NODE_PREFIX}Comment>; + start: ?number; + end: ?number; + loc: ?${NODE_PREFIX}SourceLocation; + extra?: { [string]: mixed }; +}\n\n`; + +// + +const lines = []; + +for (const type in t.NODE_FIELDS) { + const fields = t.NODE_FIELDS[type]; + + const struct = ['type: "' + type + '";']; + const args = []; + const builderNames = t.BUILDER_KEYS[type]; + + Object.keys(t.NODE_FIELDS[type]) + .sort((fieldA, fieldB) => { + const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }) + .forEach(fieldName => { + const field = fields[fieldName]; + + let suffix = ""; + if (field.optional || field.default != null) suffix += "?"; + + let typeAnnotation = "any"; + + const validate = field.validate; + if (validate) { + typeAnnotation = stringifyValidator(validate, NODE_PREFIX); + } + + if (typeAnnotation) { + suffix += ": " + typeAnnotation; + } + if (builderNames.includes(fieldName)) { + args.push(t.toBindingIdentifierName(fieldName) + suffix); + } + + if (t.isValidIdentifier(fieldName)) { + struct.push(fieldName + suffix + ";"); + } + }); + + code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} { + ${struct.join("\n ").trim()} +}\n\n`; + + // Flow chokes on super() and import() :/ + if (type !== "Super" && type !== "Import") { + lines.push( + `declare export function ${toFunctionName(type)}(${args.join( + ", " + )}): ${NODE_PREFIX}${type};` + ); + } else { + const functionName = toFunctionName(type); + lines.push( + `declare function _${functionName}(${args.join( + ", " + )}): ${NODE_PREFIX}${type};`, + `declare export { _${functionName} as ${functionName} }` + ); + } +} + +for (const typeName of t.TYPES) { + const isDeprecated = !!t.DEPRECATED_KEYS[typeName]; + const realName = isDeprecated ? t.DEPRECATED_KEYS[typeName] : typeName; + + let decl = `declare export function is${typeName}(node: ?Object, opts?: ?Object): boolean`; + if (t.NODE_FIELDS[realName]) { + decl += ` %checks (node instanceof ${NODE_PREFIX}${realName})`; + } + lines.push(decl); + + lines.push( + `declare export function assert${typeName}(node: ?Object, opts?: ?Object): void` + ); +} + +lines.push( + `declare export var VISITOR_KEYS: { [type: string]: string[] }`, + + // assert/ + `declare export function assertNode(obj: any): void`, + + // builders/ + // eslint-disable-next-line max-len + `declare export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): ${NODE_PREFIX}TypeAnnotation`, + // eslint-disable-next-line max-len + `declare export function createUnionTypeAnnotation(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`, + // eslint-disable-next-line max-len + `declare export function createFlowUnionType(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`, + // this smells like "internal API" + // eslint-disable-next-line max-len + `declare export function buildChildren(node: { children: Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment | ${NODE_PREFIX}JSXEmptyExpression> }): Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment>`, + + // clone/ + `declare export function clone<T>(n: T): T;`, + `declare export function cloneDeep<T>(n: T): T;`, + `declare export function cloneDeepWithoutLoc<T>(n: T): T;`, + `declare export function cloneNode<T>(n: T, deep?: boolean, withoutLoc?: boolean): T;`, + `declare export function cloneWithoutLoc<T>(n: T): T;`, + + // comments/ + `declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`, + // eslint-disable-next-line max-len + `declare export function addComment<T: BabelNode>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`, + // eslint-disable-next-line max-len + `declare export function addComments<T: BabelNode>(node: T, type: CommentTypeShorthand, comments: Array<Comment>): T`, + `declare export function inheritInnerComments(node: BabelNode, parent: BabelNode): void`, + `declare export function inheritLeadingComments(node: BabelNode, parent: BabelNode): void`, + `declare export function inheritsComments<T: BabelNode>(node: T, parent: BabelNode): void`, + `declare export function inheritTrailingComments(node: BabelNode, parent: BabelNode): void`, + `declare export function removeComments<T: BabelNode>(node: T): T`, + + // converters/ + `declare export function ensureBlock(node: ${NODE_PREFIX}, key: string): ${NODE_PREFIX}BlockStatement`, + `declare export function toBindingIdentifierName(name?: ?string): string`, + // eslint-disable-next-line max-len + `declare export function toBlock(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Expression, parent?: ${NODE_PREFIX}Function | null): ${NODE_PREFIX}BlockStatement`, + // eslint-disable-next-line max-len + `declare export function toComputedKey(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}Expression | ${NODE_PREFIX}Identifier): ${NODE_PREFIX}Expression`, + // eslint-disable-next-line max-len + `declare export function toExpression(node: ${NODE_PREFIX}ExpressionStatement | ${NODE_PREFIX}Expression | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function): ${NODE_PREFIX}Expression`, + `declare export function toIdentifier(name?: ?string): string`, + // eslint-disable-next-line max-len + `declare export function toKeyAlias(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}): string`, + // toSequenceExpression relies on types that aren't declared in flow + // eslint-disable-next-line max-len + `declare export function toStatement(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function | ${NODE_PREFIX}AssignmentExpression, ignore?: boolean): ${NODE_PREFIX}Statement | void`, + `declare export function valueToNode(value: any): ${NODE_PREFIX}Expression`, + + // modifications/ + // eslint-disable-next-line max-len + `declare export function removeTypeDuplicates(types: Array<${NODE_PREFIX}FlowType>): Array<${NODE_PREFIX}FlowType>`, + // eslint-disable-next-line max-len + `declare export function appendToMemberExpression(member: ${NODE_PREFIX}MemberExpression, append: ${NODE_PREFIX}, computed?: boolean): ${NODE_PREFIX}MemberExpression`, + // eslint-disable-next-line max-len + `declare export function inherits<T: BabelNode>(child: T, parent: ${NODE_PREFIX} | null | void): T`, + // eslint-disable-next-line max-len + `declare export function prependToMemberExpression(member: ${NODE_PREFIX}MemberExpression, prepend: ${NODE_PREFIX}Expression): ${NODE_PREFIX}MemberExpression`, + `declare export function removeProperties<T>(n: T, opts: ?{}): void;`, + `declare export function removePropertiesDeep<T>(n: T, opts: ?{}): T;`, + + // retrievers/ + // eslint-disable-next-line max-len + `declare export var getBindingIdentifiers: { + (node: ${NODE_PREFIX}, duplicates?: boolean, outerOnly?: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }, + keys: { [type: string]: string[] } + }`, + // eslint-disable-next-line max-len + `declare export function getOuterBindingIdentifiers(node: BabelNode, duplicates?: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }`, + + // traverse/ + `declare type TraversalAncestors = Array<{ + node: BabelNode, + key: string, + index?: number, + }>; + declare type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void; + declare type TraversalHandlers<T> = { + enter?: TraversalHandler<T>, + exit?: TraversalHandler<T>, + };`.replace(/(^|\n) {2}/g, "$1"), + // eslint-disable-next-line + `declare export function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;`, + `declare export function traverseFast<T>(n: BabelNode, h: TraversalHandler<T>, state?: T): void;`, + + // utils/ + // cleanJSXElementLiteralChild is not exported + // inherit is not exported + `declare export function shallowEqual(actual: Object, expected: Object): boolean`, + + // validators/ + // eslint-disable-next-line max-len + `declare export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean`, + `declare export function is(type: string, n: BabelNode, opts: Object): boolean;`, + `declare export function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`, + `declare export function isBlockScoped(node: BabelNode): boolean`, + `declare export function isImmutable(node: BabelNode): boolean`, + `declare export function isLet(node: BabelNode): boolean`, + `declare export function isNode(node: ?Object): boolean`, + `declare export function isNodesEquivalent(a: any, b: any): boolean`, + `declare export function isPlaceholderType(placeholderType: string, targetType: string): boolean`, + `declare export function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`, + `declare export function isScope(node: BabelNode, parent: BabelNode): boolean`, + `declare export function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean`, + `declare export function isType(nodetype: ?string, targetType: string): boolean`, + `declare export function isValidES3Identifier(name: string): boolean`, + `declare export function isValidES3Identifier(name: string): boolean`, + `declare export function isValidIdentifier(name: string): boolean`, + `declare export function isVar(node: BabelNode): boolean`, + // eslint-disable-next-line max-len + `declare export function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean`, + `declare export function validate(n: BabelNode, key: string, value: mixed): void;` +); + +for (const type in t.FLIPPED_ALIAS_KEYS) { + const types = t.FLIPPED_ALIAS_KEYS[type]; + code += `type ${NODE_PREFIX}${type} = ${types + .map(type => `${NODE_PREFIX}${type}`) + .join(" | ")};\n`; +} + +code += `\ndeclare module "@babel/types" { + ${lines.join("\n").replace(/\n/g, "\n ").trim()} +}\n`; + +// + +process.stdout.write(code); diff --git a/node_modules/@babel/types/scripts/generators/typescript-legacy.js b/node_modules/@babel/types/scripts/generators/typescript-legacy.js new file mode 100644 index 0000000..40da48f --- /dev/null +++ b/node_modules/@babel/types/scripts/generators/typescript-legacy.js @@ -0,0 +1,369 @@ +import t from "../../lib/index.js"; +import stringifyValidator from "../utils/stringifyValidator.js"; +import toFunctionName from "../utils/toFunctionName.js"; + +let code = `// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/typescript-legacy.js for script used. + +interface BaseComment { + value: string; + start: number; + end: number; + loc: SourceLocation; + type: "CommentBlock" | "CommentLine"; +} + +export interface CommentBlock extends BaseComment { + type: "CommentBlock"; +} + +export interface CommentLine extends BaseComment { + type: "CommentLine"; +} + +export type Comment = CommentBlock | CommentLine; + +export interface SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +interface BaseNode { + leadingComments: ReadonlyArray<Comment> | null; + innerComments: ReadonlyArray<Comment> | null; + trailingComments: ReadonlyArray<Comment> | null; + start: number | null; + end: number | null; + loc: SourceLocation | null; + type: Node["type"]; + extra?: Record<string, unknown>; +} + +export type Node = ${t.TYPES.sort().join(" | ")};\n\n`; + +// + +const lines = []; + +for (const type in t.NODE_FIELDS) { + const fields = t.NODE_FIELDS[type]; + const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type); + const builderNames = t.BUILDER_KEYS[type]; + + const struct = ['type: "' + type + '";']; + const args = []; + + fieldNames.forEach(fieldName => { + const field = fields[fieldName]; + // Future / annoying TODO: + // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either: + // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key, + // - declare an alias type for valid keys, detect the case and reuse it here, + // - declare a disjoint union with, for example, ObjectPropertyBase, + // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty + // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)" + let typeAnnotation = stringifyValidator(field.validate, ""); + + if (isNullable(field) && !hasDefault(field)) { + typeAnnotation += " | null"; + } + + if (builderNames.includes(fieldName)) { + if (areAllRemainingFieldsNullable(fieldName, builderNames, fields)) { + args.push( + `${t.toBindingIdentifierName(fieldName)}${ + isNullable(field) ? "?:" : ":" + } ${typeAnnotation}` + ); + } else { + args.push( + `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${ + isNullable(field) ? " | undefined" : "" + }` + ); + } + } + + const alphaNumeric = /^\w+$/; + + if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) { + struct.push(`${fieldName}: ${typeAnnotation};`); + } else { + struct.push(`"${fieldName}": ${typeAnnotation};`); + } + }); + + code += `export interface ${type} extends BaseNode { + ${struct.join("\n ").trim()} +}\n\n`; + + // super and import are reserved words in JavaScript + if (type !== "Super" && type !== "Import") { + lines.push( + `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};` + ); + } else { + const functionName = toFunctionName(type); + lines.push( + `declare function _${functionName}(${args.join(", ")}): ${type};`, + `export { _${functionName} as ${functionName}}` + ); + } +} + +for (const typeName of t.TYPES) { + const isDeprecated = !!t.DEPRECATED_KEYS[typeName]; + const realName = isDeprecated ? t.DEPRECATED_KEYS[typeName] : typeName; + + const result = + t.NODE_FIELDS[realName] || t.FLIPPED_ALIAS_KEYS[realName] + ? `node is ${realName}` + : "boolean"; + + if (isDeprecated) { + lines.push(`/** @deprecated Use \`is${realName}\` */`); + } + lines.push( + `export function is${typeName}(node: object | null | undefined, opts?: object | null): ${result};` + ); + + if (isDeprecated) { + lines.push(`/** @deprecated Use \`assert${realName}\` */`); + } + lines.push( + `export function assert${typeName}(node: object | null | undefined, opts?: object | null): void;` + ); +} + +lines.push( + // assert/ + `export function assertNode(obj: any): void`, + + // builders/ + // eslint-disable-next-line max-len + `export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation`, + `export function createUnionTypeAnnotation<T extends FlowType>(types: [T]): T`, + `export function createFlowUnionType<T extends FlowType>(types: [T]): T`, + // this probably misbehaves if there are 0 elements, and it's not a UnionTypeAnnotation if there's only 1 + // it is possible to require "2 or more" for this overload ([T, T, ...T[]]) but it requires typescript 3.0 + `export function createUnionTypeAnnotation(types: ReadonlyArray<FlowType>): UnionTypeAnnotation`, + `export function createFlowUnionType(types: ReadonlyArray<FlowType>): UnionTypeAnnotation`, + // this smells like "internal API" + // eslint-disable-next-line max-len + `export function buildChildren(node: { children: ReadonlyArray<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment | JSXEmptyExpression> }): JSXElement['children']`, + + // clone/ + `export function clone<T extends Node>(n: T): T;`, + `export function cloneDeep<T extends Node>(n: T): T;`, + `export function cloneDeepWithoutLoc<T extends Node>(n: T): T;`, + `export function cloneNode<T extends Node>(n: T, deep?: boolean, withoutLoc?: boolean): T;`, + `export function cloneWithoutLoc<T extends Node>(n: T): T;`, + + // comments/ + `export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`, + // eslint-disable-next-line max-len + `export function addComment<T extends Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`, + // eslint-disable-next-line max-len + `export function addComments<T extends Node>(node: T, type: CommentTypeShorthand, comments: ReadonlyArray<Comment>): T`, + `export function inheritInnerComments(node: Node, parent: Node): void`, + `export function inheritLeadingComments(node: Node, parent: Node): void`, + `export function inheritsComments<T extends Node>(node: T, parent: Node): void`, + `export function inheritTrailingComments(node: Node, parent: Node): void`, + `export function removeComments<T extends Node>(node: T): T`, + + // converters/ + // eslint-disable-next-line max-len + `export function ensureBlock(node: Extract<Node, { body: BlockStatement | Statement | Expression }>): BlockStatement`, + // too complex? + // eslint-disable-next-line max-len + `export function ensureBlock<K extends keyof Extract<Node, { body: BlockStatement | Statement | Expression }> = 'body'>(node: Extract<Node, Record<K, BlockStatement | Statement | Expression>>, key: K): BlockStatement`, + // gatherSequenceExpressions is not exported + `export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string`, + `export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement`, + // it is possible for `node` to be an arbitrary object if `key` is always provided, + // but that doesn't look like intended API + // eslint-disable-next-line max-len + `export function toComputedKey<T extends Extract<Node, { computed: boolean | null }>>(node: T, key?: Expression | Identifier): Expression`, + `export function toExpression(node: Function): FunctionExpression`, + `export function toExpression(node: Class): ClassExpression`, + `export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression`, + `export function toIdentifier(name: { toString(): string } | null | undefined): string`, + `export function toKeyAlias(node: Method | Property, key?: Node): string`, + // NOTE: this actually uses Scope from @babel/traverse, but we can't add a dependency on its types, + // as they live in @types. Declare the structural subset that is required. + // eslint-disable-next-line max-len + `export function toSequenceExpression(nodes: ReadonlyArray<Node>, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined`, + `export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement`, + `export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement`, + `export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined`, + `export function toStatement(node: Class, ignore?: boolean): ClassDeclaration`, + `export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined`, + `export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration`, + // eslint-disable-next-line max-len + `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined`, + // eslint-disable-next-line max-len + `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement`, + // eslint-disable-next-line max-len + `export function valueToNode(value: undefined): Identifier`, // (should this not be a UnaryExpression to avoid shadowing?) + `export function valueToNode(value: boolean): BooleanLiteral`, + `export function valueToNode(value: null): NullLiteral`, + `export function valueToNode(value: string): StringLiteral`, + // Infinities and NaN need to use a BinaryExpression; negative values must be wrapped in UnaryExpression + `export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression`, + `export function valueToNode(value: RegExp): RegExpLiteral`, + // eslint-disable-next-line max-len + `export function valueToNode(value: ReadonlyArray<undefined | boolean | null | string | number | RegExp | object>): ArrayExpression`, + // this throws with objects that are not PlainObject according to lodash, + // or if there are non-valueToNode-able values + `export function valueToNode(value: object): ObjectExpression`, + // eslint-disable-next-line max-len + `export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression`, + + // modifications/ + // eslint-disable-next-line max-len + `export function removeTypeDuplicates(types: ReadonlyArray<FlowType | false | null | undefined>): FlowType[]`, + // eslint-disable-next-line max-len + `export function appendToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, append: MemberExpression['property'], computed?: boolean): T`, + // eslint-disable-next-line max-len + `export function inherits<T extends Node | null | undefined>(child: T, parent: Node | null | undefined): T`, + // eslint-disable-next-line max-len + `export function prependToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, prepend: MemberExpression['object']): T`, + `export function removeProperties( + n: Node, + opts?: { preserveComments: boolean } | null +): void;`, + `export function removePropertiesDeep<T extends Node>( + n: T, + opts?: { preserveComments: boolean } | null +): T;`, + + // retrievers/ + // eslint-disable-next-line max-len + `export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record<string, Array<Identifier>>`, + // eslint-disable-next-line max-len + `export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record<string, Identifier>`, + // eslint-disable-next-line max-len + `export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record<string, Identifier | Array<Identifier>>`, + // eslint-disable-next-line max-len + `export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record<string, Array<Identifier>>`, + `export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record<string, Identifier>`, + // eslint-disable-next-line max-len + `export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record<string, Identifier | Array<Identifier>>`, + + // traverse/ + `export type TraversalAncestors = ReadonlyArray<{ + node: Node, + key: string, + index?: number, + }>; + export type TraversalHandler<T> = ( + this: undefined, node: Node, parent: TraversalAncestors, type: T + ) => void; + export type TraversalHandlers<T> = { + enter?: TraversalHandler<T>, + exit?: TraversalHandler<T>, + };`.replace(/(^|\n) {2}/g, "$1"), + // eslint-disable-next-line + `export function traverse<T>(n: Node, h: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;`, + `export function traverseFast<T>(n: Node, h: TraversalHandler<T>, state?: T): void;`, + + // utils/ + // cleanJSXElementLiteralChild is not exported + // inherit is not exported + `export function shallowEqual<T extends object>(actual: object, expected: T): actual is T`, + + // validators/ + // eslint-disable-next-line max-len + `export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression`, + // eslint-disable-next-line max-len + `export function is<T extends Node['type']>(type: T, n: Node | null | undefined, required?: undefined): n is Extract<Node, { type: T }>`, + // eslint-disable-next-line max-len + `export function is<T extends Node['type'], P extends Extract<Node, { type: T }>>(type: T, n: Node | null | undefined, required: Partial<P>): n is P`, + // eslint-disable-next-line max-len + `export function is<P extends Node>(type: string, n: Node | null | undefined, required: Partial<P>): n is P`, + `export function is(type: string, n: Node | null | undefined, required?: Partial<Node>): n is Node`, + `export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean`, + // eslint-disable-next-line max-len + `export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration`, + `export function isImmutable(node: Node): node is Immutable`, + `export function isLet(node: Node): node is VariableDeclaration`, + `export function isNode(node: object | null | undefined): node is Node`, + `export function isNodesEquivalent<T extends Partial<Node>>(a: T, b: any): b is T`, + `export function isNodesEquivalent(a: any, b: any): boolean`, + `export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean`, + `export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean`, + `export function isScope(node: Node, parent: Node): node is Scopable`, + `export function isSpecifierDefault(specifier: ModuleSpecifier): boolean`, + `export function isType<T extends Node['type']>(nodetype: string, targetType: T): nodetype is T`, + `export function isType(nodetype: string | null | undefined, targetType: string): boolean`, + `export function isValidES3Identifier(name: string): boolean`, + `export function isValidIdentifier(name: string): boolean`, + `export function isVar(node: Node): node is VariableDeclaration`, + // the MemberExpression implication is incidental, but it follows from the implementation + // eslint-disable-next-line max-len + `export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray<string>, allowPartial?: boolean): node is MemberExpression`, + // eslint-disable-next-line max-len + `export function validate<T extends Node, K extends keyof T>(n: Node | null | undefined, key: K, value: T[K]): void;`, + `export function validate(n: Node, key: string, value: any): void;` +); + +for (const type in t.DEPRECATED_KEYS) { + code += `/** + * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\` + */ +export type ${type} = ${t.DEPRECATED_KEYS[type]};\n +`; +} + +for (const type in t.FLIPPED_ALIAS_KEYS) { + const types = t.FLIPPED_ALIAS_KEYS[type]; + code += `export type ${type} = ${types + .map(type => `${type}`) + .join(" | ")};\n`; +} +code += "\n"; + +code += "export interface Aliases {\n"; +for (const type in t.FLIPPED_ALIAS_KEYS) { + code += ` ${type}: ${type};\n`; +} +code += "}\n\n"; + +code += lines.join("\n") + "\n"; + +// + +process.stdout.write(code); + +// + +function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) { + const index = fieldNames.indexOf(fieldName); + return fieldNames.slice(index).every(_ => isNullable(fields[_])); +} + +function hasDefault(field) { + return field.default != null; +} + +function isNullable(field) { + return field.optional || hasDefault(field); +} + +function sortFieldNames(fields, type) { + return fields.sort((fieldA, fieldB) => { + const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }); +} diff --git a/node_modules/@babel/types/scripts/generators/validators.js b/node_modules/@babel/types/scripts/generators/validators.js new file mode 100644 index 0000000..acd6da6 --- /dev/null +++ b/node_modules/@babel/types/scripts/generators/validators.js @@ -0,0 +1,87 @@ +import definitions from "../../lib/definitions/index.js"; + +const has = Function.call.bind(Object.prototype.hasOwnProperty); + +function joinComparisons(leftArr, right) { + return ( + leftArr.map(JSON.stringify).join(` === ${right} || `) + ` === ${right}` + ); +} + +function addIsHelper(type, aliasKeys, deprecated) { + const targetType = JSON.stringify(type); + let aliasSource = ""; + if (aliasKeys) { + aliasSource = joinComparisons(aliasKeys, "nodeType"); + } + + let placeholderSource = ""; + const placeholderTypes = []; + if ( + definitions.PLACEHOLDERS.includes(type) && + has(definitions.FLIPPED_ALIAS_KEYS, type) + ) { + placeholderTypes.push(type); + } + if (has(definitions.PLACEHOLDERS_FLIPPED_ALIAS, type)) { + placeholderTypes.push(...definitions.PLACEHOLDERS_FLIPPED_ALIAS[type]); + } + if (placeholderTypes.length > 0) { + placeholderSource = + ' || nodeType === "Placeholder" && (' + + joinComparisons( + placeholderTypes, + "(node as t.Placeholder).expectedNode" + ) + + ")"; + } + + const result = + definitions.NODE_FIELDS[type] || definitions.FLIPPED_ALIAS_KEYS[type] + ? `node is t.${type}` + : "boolean"; + + return `export function is${type}(node: object | null | undefined, opts?: object | null): ${result} { + ${deprecated || ""} + if (!node) return false; + + const nodeType = (node as t.Node).type; + if (${ + aliasSource ? aliasSource : `nodeType === ${targetType}` + }${placeholderSource}) { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; + } + `; +} + +export default function generateValidators() { + let output = `/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import shallowEqual from "../../utils/shallowEqual"; +import type * as t from "../..";\n\n`; + + Object.keys(definitions.VISITOR_KEYS).forEach(type => { + output += addIsHelper(type); + }); + + Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { + output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]); + }); + + Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { + const newType = definitions.DEPRECATED_KEYS[type]; + const deprecated = `console.trace("The node type ${type} has been renamed to ${newType}");`; + output += addIsHelper(type, null, deprecated); + }); + + return output; +} diff --git a/node_modules/@babel/types/scripts/package.json b/node_modules/@babel/types/scripts/package.json new file mode 100644 index 0000000..5ffd980 --- /dev/null +++ b/node_modules/@babel/types/scripts/package.json @@ -0,0 +1 @@ +{ "type": "module" } diff --git a/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/node_modules/@babel/types/scripts/utils/formatBuilderName.js new file mode 100644 index 0000000..f00a3c4 --- /dev/null +++ b/node_modules/@babel/types/scripts/utils/formatBuilderName.js @@ -0,0 +1,8 @@ +const toLowerCase = Function.call.bind("".toLowerCase); + +export default function formatBuilderName(type) { + // FunctionExpression -> functionExpression + // JSXIdentifier -> jsxIdentifier + // V8IntrinsicIdentifier -> v8IntrinsicIdentifier + return type.replace(/^([A-Z](?=[a-z0-9])|[A-Z]+(?=[A-Z]))/, toLowerCase); +} diff --git a/node_modules/@babel/types/scripts/utils/lowerFirst.js b/node_modules/@babel/types/scripts/utils/lowerFirst.js new file mode 100644 index 0000000..012f252 --- /dev/null +++ b/node_modules/@babel/types/scripts/utils/lowerFirst.js @@ -0,0 +1,3 @@ +export default function lowerFirst(string) { + return string[0].toLowerCase() + string.slice(1); +} diff --git a/node_modules/@babel/types/scripts/utils/stringifyValidator.js b/node_modules/@babel/types/scripts/utils/stringifyValidator.js new file mode 100644 index 0000000..4b8d29c --- /dev/null +++ b/node_modules/@babel/types/scripts/utils/stringifyValidator.js @@ -0,0 +1,66 @@ +export default function stringifyValidator(validator, nodePrefix) { + if (validator === undefined) { + return "any"; + } + + if (validator.each) { + return `Array<${stringifyValidator(validator.each, nodePrefix)}>`; + } + + if (validator.chainOf) { + return stringifyValidator(validator.chainOf[1], nodePrefix); + } + + if (validator.oneOf) { + return validator.oneOf.map(JSON.stringify).join(" | "); + } + + if (validator.oneOfNodeTypes) { + return validator.oneOfNodeTypes.map(_ => nodePrefix + _).join(" | "); + } + + if (validator.oneOfNodeOrValueTypes) { + return validator.oneOfNodeOrValueTypes + .map(_ => { + return isValueType(_) ? _ : nodePrefix + _; + }) + .join(" | "); + } + + if (validator.type) { + return validator.type; + } + + if (validator.shapeOf) { + return ( + "{ " + + Object.keys(validator.shapeOf) + .map(shapeKey => { + const propertyDefinition = validator.shapeOf[shapeKey]; + if (propertyDefinition.validate) { + const isOptional = + propertyDefinition.optional || propertyDefinition.default != null; + return ( + shapeKey + + (isOptional ? "?: " : ": ") + + stringifyValidator(propertyDefinition.validate) + ); + } + return null; + }) + .filter(Boolean) + .join(", ") + + " }" + ); + } + + return ["any"]; +} + +/** + * Heuristic to decide whether or not the given type is a value type (eg. "null") + * or a Node type (eg. "Expression"). + */ +function isValueType(type) { + return type.charAt(0).toLowerCase() === type.charAt(0); +} diff --git a/node_modules/@babel/types/scripts/utils/toFunctionName.js b/node_modules/@babel/types/scripts/utils/toFunctionName.js new file mode 100644 index 0000000..2b64578 --- /dev/null +++ b/node_modules/@babel/types/scripts/utils/toFunctionName.js @@ -0,0 +1,4 @@ +export default function toFunctionName(typeName) { + const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx"); + return _.slice(0, 1).toLowerCase() + _.slice(1); +} |