| | |
| | | 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.interpreterDirective = interpreterDirective; |
| | | exports.directive = directive; |
| | | exports.directiveLiteral = directiveLiteral; |
| | | 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.doWhileStatement = doWhileStatement; |
| | | exports.emptyStatement = emptyStatement; |
| | | exports.expressionStatement = expressionStatement; |
| | | exports.file = file; |
| | | exports.forInStatement = forInStatement; |
| | | exports.forStatement = forStatement; |
| | | exports.functionDeclaration = functionDeclaration; |
| | | exports.functionExpression = functionExpression; |
| | | exports.identifier = identifier; |
| | | exports.ifStatement = ifStatement; |
| | | exports.labeledStatement = labeledStatement; |
| | | exports.stringLiteral = stringLiteral; |
| | | exports.numericLiteral = numericLiteral; |
| | | exports.nullLiteral = nullLiteral; |
| | | exports.booleanLiteral = booleanLiteral; |
| | | exports.regExpLiteral = regExpLiteral; |
| | | exports.logicalExpression = logicalExpression; |
| | | exports.memberExpression = memberExpression; |
| | | exports.newExpression = newExpression; |
| | | exports.program = program; |
| | | exports.objectExpression = objectExpression; |
| | | exports.objectMethod = objectMethod; |
| | | exports.objectProperty = objectProperty; |
| | | exports.restElement = restElement; |
| | | exports.returnStatement = returnStatement; |
| | | exports.sequenceExpression = sequenceExpression; |
| | | exports.parenthesizedExpression = parenthesizedExpression; |
| | | exports.switchCase = switchCase; |
| | | exports.switchStatement = switchStatement; |
| | | exports.thisExpression = thisExpression; |
| | | exports.throwStatement = throwStatement; |
| | | exports.tryStatement = tryStatement; |
| | | exports.unaryExpression = unaryExpression; |
| | | exports.updateExpression = updateExpression; |
| | | exports.variableDeclaration = variableDeclaration; |
| | | exports.variableDeclarator = variableDeclarator; |
| | | exports.whileStatement = whileStatement; |
| | | exports.withStatement = withStatement; |
| | | exports.assignmentPattern = assignmentPattern; |
| | | exports.arrayPattern = arrayPattern; |
| | | exports.arrowFunctionExpression = arrowFunctionExpression; |
| | | exports.classBody = classBody; |
| | | exports.classExpression = classExpression; |
| | | exports.classDeclaration = classDeclaration; |
| | | exports.exportAllDeclaration = exportAllDeclaration; |
| | | exports.exportDefaultDeclaration = exportDefaultDeclaration; |
| | | exports.exportNamedDeclaration = exportNamedDeclaration; |
| | | exports.exportSpecifier = exportSpecifier; |
| | | exports.forOfStatement = forOfStatement; |
| | | exports.importDeclaration = importDeclaration; |
| | | exports.importDefaultSpecifier = importDefaultSpecifier; |
| | | exports.importNamespaceSpecifier = importNamespaceSpecifier; |
| | | exports.importSpecifier = importSpecifier; |
| | | exports.metaProperty = metaProperty; |
| | | exports.classMethod = classMethod; |
| | | exports.objectPattern = objectPattern; |
| | | exports.spreadElement = spreadElement; |
| | | exports.super = _super; |
| | | exports.taggedTemplateExpression = taggedTemplateExpression; |
| | | exports.templateElement = templateElement; |
| | | exports.templateLiteral = templateLiteral; |
| | | exports.yieldExpression = yieldExpression; |
| | | exports.awaitExpression = awaitExpression; |
| | | exports.import = _import; |
| | | exports.bigIntLiteral = bigIntLiteral; |
| | | exports.exportNamespaceSpecifier = exportNamespaceSpecifier; |
| | | exports.optionalMemberExpression = optionalMemberExpression; |
| | | exports.optionalCallExpression = optionalCallExpression; |
| | | exports.classProperty = classProperty; |
| | | exports.classPrivateProperty = classPrivateProperty; |
| | | exports.classPrivateMethod = classPrivateMethod; |
| | | exports.privateName = privateName; |
| | | exports.anyTypeAnnotation = anyTypeAnnotation; |
| | | exports.arrayTypeAnnotation = arrayTypeAnnotation; |
| | | exports.booleanTypeAnnotation = booleanTypeAnnotation; |
| | | exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation; |
| | | exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation; |
| | | exports.classImplements = classImplements; |
| | | 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.declareTypeAlias = declareTypeAlias; |
| | | exports.declareOpaqueType = declareOpaqueType; |
| | | exports.declareTypeAlias = declareTypeAlias; |
| | | exports.declareVariable = declareVariable; |
| | | exports.declareExportDeclaration = declareExportDeclaration; |
| | | exports.declareExportAllDeclaration = declareExportAllDeclaration; |
| | | 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.interfaceExtends = interfaceExtends; |
| | | 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.emptyTypeAnnotation = emptyTypeAnnotation; |
| | | 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.objectTypeInternalSlot = objectTypeInternalSlot; |
| | | 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.typeofTypeAnnotation = typeofTypeAnnotation; |
| | | 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.enumDeclaration = enumDeclaration; |
| | | exports.enumBooleanBody = enumBooleanBody; |
| | | exports.enumNumberBody = enumNumberBody; |
| | | exports.enumStringBody = enumStringBody; |
| | | exports.enumSymbolBody = enumSymbolBody; |
| | | exports.enumBooleanMember = enumBooleanMember; |
| | | exports.enumNumberMember = enumNumberMember; |
| | | exports.enumStringMember = enumStringMember; |
| | | exports.enumDefaultedMember = enumDefaultedMember; |
| | | exports.indexedAccessType = indexedAccessType; |
| | | exports.optionalIndexedAccessType = optionalIndexedAccessType; |
| | | exports.jSXAttribute = exports.jsxAttribute = jsxAttribute; |
| | | exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement; |
| | | exports.jSXElement = exports.jsxElement = jsxElement; |
| | | exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression; |
| | | exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer; |
| | | exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild; |
| | | exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier; |
| | | exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression; |
| | | exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName; |
| | | exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement; |
| | | exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute; |
| | | exports.jSXText = exports.jsxText = jsxText; |
| | | exports.jSXFragment = exports.jsxFragment = jsxFragment; |
| | | exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment; |
| | | exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment; |
| | | exports.noop = noop; |
| | | exports.placeholder = placeholder; |
| | | exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier; |
| | | exports.argumentPlaceholder = argumentPlaceholder; |
| | | exports.bindExpression = bindExpression; |
| | | exports.importAttribute = importAttribute; |
| | | exports.decorator = decorator; |
| | | exports.doExpression = doExpression; |
| | | exports.exportDefaultSpecifier = exportDefaultSpecifier; |
| | | exports.recordExpression = recordExpression; |
| | | exports.tupleExpression = tupleExpression; |
| | | exports.decimalLiteral = decimalLiteral; |
| | | exports.staticBlock = staticBlock; |
| | | exports.moduleExpression = moduleExpression; |
| | | exports.topicReference = topicReference; |
| | | exports.pipelineTopicExpression = pipelineTopicExpression; |
| | | exports.pipelineBareFunction = pipelineBareFunction; |
| | | exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference; |
| | | exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty; |
| | | exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction; |
| | | exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod; |
| | | exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName; |
| | | exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration; |
| | | exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration; |
| | | exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature; |
| | | exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature; |
| | | exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature; |
| | | exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword; |
| | | exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword; |
| | | exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword; |
| | | exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword; |
| | | exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword; |
| | | exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword; |
| | | exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword; |
| | | exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword; |
| | | exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword; |
| | | exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword; |
| | | exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword; |
| | | exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword; |
| | | exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword; |
| | | exports.tSThisType = exports.tsThisType = tsThisType; |
| | | exports.tSFunctionType = exports.tsFunctionType = tsFunctionType; |
| | | exports.tSConstructorType = exports.tsConstructorType = tsConstructorType; |
| | | exports.tSTypeReference = exports.tsTypeReference = tsTypeReference; |
| | | exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate; |
| | | exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery; |
| | | exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral; |
| | | exports.tSArrayType = exports.tsArrayType = tsArrayType; |
| | | exports.tSTupleType = exports.tsTupleType = tsTupleType; |
| | | exports.tSOptionalType = exports.tsOptionalType = tsOptionalType; |
| | | exports.tSRestType = exports.tsRestType = tsRestType; |
| | | exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember; |
| | | exports.tSUnionType = exports.tsUnionType = tsUnionType; |
| | | exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType; |
| | | exports.tSConditionalType = exports.tsConditionalType = tsConditionalType; |
| | | exports.tSInferType = exports.tsInferType = tsInferType; |
| | | exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType; |
| | | exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator; |
| | | exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType; |
| | | exports.tSMappedType = exports.tsMappedType = tsMappedType; |
| | | exports.tSLiteralType = exports.tsLiteralType = tsLiteralType; |
| | | exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments; |
| | | exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration; |
| | | exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody; |
| | | exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration; |
| | | exports.tSAsExpression = exports.tsAsExpression = tsAsExpression; |
| | | exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion; |
| | | exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration; |
| | | exports.tSEnumMember = exports.tsEnumMember = tsEnumMember; |
| | | exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration; |
| | | exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock; |
| | | exports.tSImportType = exports.tsImportType = tsImportType; |
| | | exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration; |
| | | exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference; |
| | | exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression; |
| | | exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment; |
| | | exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration; |
| | | exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation; |
| | | exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation; |
| | | exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration; |
| | | exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter; |
| | | exports.numberLiteral = NumberLiteral; |
| | | exports.regexLiteral = RegexLiteral; |
| | | exports.restProperty = RestProperty; |
| | | exports.spreadProperty = SpreadProperty; |
| | | exports.whileStatement = whileStatement; |
| | | exports.withStatement = withStatement; |
| | | exports.yieldExpression = yieldExpression; |
| | | |
| | | var _builder = require("../builder"); |
| | | var _validateNode = require("../validateNode"); |
| | | |
| | | function arrayExpression(elements) { |
| | | return (0, _builder.default)("ArrayExpression", ...arguments); |
| | | function arrayExpression(elements = []) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ArrayExpression", |
| | | elements |
| | | }); |
| | | } |
| | | |
| | | function assignmentExpression(operator, left, right) { |
| | | return (0, _builder.default)("AssignmentExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "AssignmentExpression", |
| | | operator, |
| | | left, |
| | | right |
| | | }); |
| | | } |
| | | |
| | | function binaryExpression(operator, left, right) { |
| | | return (0, _builder.default)("BinaryExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "BinaryExpression", |
| | | operator, |
| | | left, |
| | | right |
| | | }); |
| | | } |
| | | |
| | | function interpreterDirective(value) { |
| | | return (0, _builder.default)("InterpreterDirective", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "InterpreterDirective", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function directive(value) { |
| | | return (0, _builder.default)("Directive", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "Directive", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function directiveLiteral(value) { |
| | | return (0, _builder.default)("DirectiveLiteral", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "DirectiveLiteral", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function blockStatement(body, directives) { |
| | | return (0, _builder.default)("BlockStatement", ...arguments); |
| | | function blockStatement(body, directives = []) { |
| | | return (0, _validateNode.default)({ |
| | | type: "BlockStatement", |
| | | body, |
| | | directives |
| | | }); |
| | | } |
| | | |
| | | function breakStatement(label) { |
| | | return (0, _builder.default)("BreakStatement", ...arguments); |
| | | function breakStatement(label = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "BreakStatement", |
| | | label |
| | | }); |
| | | } |
| | | |
| | | function callExpression(callee, _arguments) { |
| | | return (0, _builder.default)("CallExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "CallExpression", |
| | | callee, |
| | | arguments: _arguments |
| | | }); |
| | | } |
| | | |
| | | function catchClause(param, body) { |
| | | return (0, _builder.default)("CatchClause", ...arguments); |
| | | function catchClause(param = null, body) { |
| | | return (0, _validateNode.default)({ |
| | | type: "CatchClause", |
| | | param, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function conditionalExpression(test, consequent, alternate) { |
| | | return (0, _builder.default)("ConditionalExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ConditionalExpression", |
| | | test, |
| | | consequent, |
| | | alternate |
| | | }); |
| | | } |
| | | |
| | | function continueStatement(label) { |
| | | return (0, _builder.default)("ContinueStatement", ...arguments); |
| | | function continueStatement(label = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ContinueStatement", |
| | | label |
| | | }); |
| | | } |
| | | |
| | | function debuggerStatement() { |
| | | return (0, _builder.default)("DebuggerStatement", ...arguments); |
| | | return { |
| | | type: "DebuggerStatement" |
| | | }; |
| | | } |
| | | |
| | | function doWhileStatement(test, body) { |
| | | return (0, _builder.default)("DoWhileStatement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "DoWhileStatement", |
| | | test, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function emptyStatement() { |
| | | return (0, _builder.default)("EmptyStatement", ...arguments); |
| | | return { |
| | | type: "EmptyStatement" |
| | | }; |
| | | } |
| | | |
| | | function expressionStatement(expression) { |
| | | return (0, _builder.default)("ExpressionStatement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ExpressionStatement", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function file(program, comments, tokens) { |
| | | return (0, _builder.default)("File", ...arguments); |
| | | function file(program, comments = null, tokens = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "File", |
| | | program, |
| | | comments, |
| | | tokens |
| | | }); |
| | | } |
| | | |
| | | function forInStatement(left, right, body) { |
| | | return (0, _builder.default)("ForInStatement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ForInStatement", |
| | | left, |
| | | right, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function forStatement(init, test, update, body) { |
| | | return (0, _builder.default)("ForStatement", ...arguments); |
| | | function forStatement(init = null, test = null, update = null, body) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ForStatement", |
| | | init, |
| | | test, |
| | | update, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function functionDeclaration(id, params, body, generator, async) { |
| | | return (0, _builder.default)("FunctionDeclaration", ...arguments); |
| | | function functionDeclaration(id = null, params, body, generator = false, async = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "FunctionDeclaration", |
| | | id, |
| | | params, |
| | | body, |
| | | generator, |
| | | async |
| | | }); |
| | | } |
| | | |
| | | function functionExpression(id, params, body, generator, async) { |
| | | return (0, _builder.default)("FunctionExpression", ...arguments); |
| | | function functionExpression(id = null, params, body, generator = false, async = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "FunctionExpression", |
| | | id, |
| | | params, |
| | | body, |
| | | generator, |
| | | async |
| | | }); |
| | | } |
| | | |
| | | function identifier(name) { |
| | | return (0, _builder.default)("Identifier", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "Identifier", |
| | | name |
| | | }); |
| | | } |
| | | |
| | | function ifStatement(test, consequent, alternate) { |
| | | return (0, _builder.default)("IfStatement", ...arguments); |
| | | function ifStatement(test, consequent, alternate = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "IfStatement", |
| | | test, |
| | | consequent, |
| | | alternate |
| | | }); |
| | | } |
| | | |
| | | function labeledStatement(label, body) { |
| | | return (0, _builder.default)("LabeledStatement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "LabeledStatement", |
| | | label, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function stringLiteral(value) { |
| | | return (0, _builder.default)("StringLiteral", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "StringLiteral", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function numericLiteral(value) { |
| | | return (0, _builder.default)("NumericLiteral", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "NumericLiteral", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function nullLiteral() { |
| | | return (0, _builder.default)("NullLiteral", ...arguments); |
| | | return { |
| | | type: "NullLiteral" |
| | | }; |
| | | } |
| | | |
| | | function booleanLiteral(value) { |
| | | return (0, _builder.default)("BooleanLiteral", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "BooleanLiteral", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function regExpLiteral(pattern, flags) { |
| | | return (0, _builder.default)("RegExpLiteral", ...arguments); |
| | | function regExpLiteral(pattern, flags = "") { |
| | | return (0, _validateNode.default)({ |
| | | type: "RegExpLiteral", |
| | | pattern, |
| | | flags |
| | | }); |
| | | } |
| | | |
| | | function logicalExpression(operator, left, right) { |
| | | return (0, _builder.default)("LogicalExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "LogicalExpression", |
| | | operator, |
| | | left, |
| | | right |
| | | }); |
| | | } |
| | | |
| | | function memberExpression(object, property, computed, optional) { |
| | | return (0, _builder.default)("MemberExpression", ...arguments); |
| | | function memberExpression(object, property, computed = false, optional = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "MemberExpression", |
| | | object, |
| | | property, |
| | | computed, |
| | | optional |
| | | }); |
| | | } |
| | | |
| | | function newExpression(callee, _arguments) { |
| | | return (0, _builder.default)("NewExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "NewExpression", |
| | | callee, |
| | | arguments: _arguments |
| | | }); |
| | | } |
| | | |
| | | function program(body, directives, sourceType, interpreter) { |
| | | return (0, _builder.default)("Program", ...arguments); |
| | | function program(body, directives = [], sourceType = "script", interpreter = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "Program", |
| | | body, |
| | | directives, |
| | | sourceType, |
| | | interpreter, |
| | | sourceFile: null |
| | | }); |
| | | } |
| | | |
| | | function objectExpression(properties) { |
| | | return (0, _builder.default)("ObjectExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectExpression", |
| | | properties |
| | | }); |
| | | } |
| | | |
| | | function objectMethod(kind, key, params, body, computed, generator, async) { |
| | | return (0, _builder.default)("ObjectMethod", ...arguments); |
| | | function objectMethod(kind = "method", key, params, body, computed = false, generator = false, async = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectMethod", |
| | | kind, |
| | | key, |
| | | params, |
| | | body, |
| | | computed, |
| | | generator, |
| | | async |
| | | }); |
| | | } |
| | | |
| | | function objectProperty(key, value, computed, shorthand, decorators) { |
| | | return (0, _builder.default)("ObjectProperty", ...arguments); |
| | | function objectProperty(key, value, computed = false, shorthand = false, decorators = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectProperty", |
| | | key, |
| | | value, |
| | | computed, |
| | | shorthand, |
| | | decorators |
| | | }); |
| | | } |
| | | |
| | | function restElement(argument) { |
| | | return (0, _builder.default)("RestElement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "RestElement", |
| | | argument |
| | | }); |
| | | } |
| | | |
| | | function returnStatement(argument) { |
| | | return (0, _builder.default)("ReturnStatement", ...arguments); |
| | | function returnStatement(argument = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ReturnStatement", |
| | | argument |
| | | }); |
| | | } |
| | | |
| | | function sequenceExpression(expressions) { |
| | | return (0, _builder.default)("SequenceExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "SequenceExpression", |
| | | expressions |
| | | }); |
| | | } |
| | | |
| | | function parenthesizedExpression(expression) { |
| | | return (0, _builder.default)("ParenthesizedExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ParenthesizedExpression", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function switchCase(test, consequent) { |
| | | return (0, _builder.default)("SwitchCase", ...arguments); |
| | | function switchCase(test = null, consequent) { |
| | | return (0, _validateNode.default)({ |
| | | type: "SwitchCase", |
| | | test, |
| | | consequent |
| | | }); |
| | | } |
| | | |
| | | function switchStatement(discriminant, cases) { |
| | | return (0, _builder.default)("SwitchStatement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "SwitchStatement", |
| | | discriminant, |
| | | cases |
| | | }); |
| | | } |
| | | |
| | | function thisExpression() { |
| | | return (0, _builder.default)("ThisExpression", ...arguments); |
| | | return { |
| | | type: "ThisExpression" |
| | | }; |
| | | } |
| | | |
| | | function throwStatement(argument) { |
| | | return (0, _builder.default)("ThrowStatement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ThrowStatement", |
| | | argument |
| | | }); |
| | | } |
| | | |
| | | function tryStatement(block, handler, finalizer) { |
| | | return (0, _builder.default)("TryStatement", ...arguments); |
| | | function tryStatement(block, handler = null, finalizer = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TryStatement", |
| | | block, |
| | | handler, |
| | | finalizer |
| | | }); |
| | | } |
| | | |
| | | function unaryExpression(operator, argument, prefix) { |
| | | return (0, _builder.default)("UnaryExpression", ...arguments); |
| | | function unaryExpression(operator, argument, prefix = true) { |
| | | return (0, _validateNode.default)({ |
| | | type: "UnaryExpression", |
| | | operator, |
| | | argument, |
| | | prefix |
| | | }); |
| | | } |
| | | |
| | | function updateExpression(operator, argument, prefix) { |
| | | return (0, _builder.default)("UpdateExpression", ...arguments); |
| | | function updateExpression(operator, argument, prefix = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "UpdateExpression", |
| | | operator, |
| | | argument, |
| | | prefix |
| | | }); |
| | | } |
| | | |
| | | function variableDeclaration(kind, declarations) { |
| | | return (0, _builder.default)("VariableDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "VariableDeclaration", |
| | | kind, |
| | | declarations |
| | | }); |
| | | } |
| | | |
| | | function variableDeclarator(id, init) { |
| | | return (0, _builder.default)("VariableDeclarator", ...arguments); |
| | | function variableDeclarator(id, init = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "VariableDeclarator", |
| | | id, |
| | | init |
| | | }); |
| | | } |
| | | |
| | | function whileStatement(test, body) { |
| | | return (0, _builder.default)("WhileStatement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "WhileStatement", |
| | | test, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function withStatement(object, body) { |
| | | return (0, _builder.default)("WithStatement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "WithStatement", |
| | | object, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function assignmentPattern(left, right) { |
| | | return (0, _builder.default)("AssignmentPattern", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "AssignmentPattern", |
| | | left, |
| | | right |
| | | }); |
| | | } |
| | | |
| | | function arrayPattern(elements) { |
| | | return (0, _builder.default)("ArrayPattern", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ArrayPattern", |
| | | elements |
| | | }); |
| | | } |
| | | |
| | | function arrowFunctionExpression(params, body, async) { |
| | | return (0, _builder.default)("ArrowFunctionExpression", ...arguments); |
| | | function arrowFunctionExpression(params, body, async = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ArrowFunctionExpression", |
| | | params, |
| | | body, |
| | | async, |
| | | expression: null |
| | | }); |
| | | } |
| | | |
| | | function classBody(body) { |
| | | return (0, _builder.default)("ClassBody", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassBody", |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function classExpression(id, superClass, body, decorators) { |
| | | return (0, _builder.default)("ClassExpression", ...arguments); |
| | | function classExpression(id = null, superClass = null, body, decorators = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassExpression", |
| | | id, |
| | | superClass, |
| | | body, |
| | | decorators |
| | | }); |
| | | } |
| | | |
| | | function classDeclaration(id, superClass, body, decorators) { |
| | | return (0, _builder.default)("ClassDeclaration", ...arguments); |
| | | function classDeclaration(id, superClass = null, body, decorators = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassDeclaration", |
| | | id, |
| | | superClass, |
| | | body, |
| | | decorators |
| | | }); |
| | | } |
| | | |
| | | function exportAllDeclaration(source) { |
| | | return (0, _builder.default)("ExportAllDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ExportAllDeclaration", |
| | | source |
| | | }); |
| | | } |
| | | |
| | | function exportDefaultDeclaration(declaration) { |
| | | return (0, _builder.default)("ExportDefaultDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ExportDefaultDeclaration", |
| | | declaration |
| | | }); |
| | | } |
| | | |
| | | function exportNamedDeclaration(declaration, specifiers, source) { |
| | | return (0, _builder.default)("ExportNamedDeclaration", ...arguments); |
| | | function exportNamedDeclaration(declaration = null, specifiers = [], source = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ExportNamedDeclaration", |
| | | declaration, |
| | | specifiers, |
| | | source |
| | | }); |
| | | } |
| | | |
| | | function exportSpecifier(local, exported) { |
| | | return (0, _builder.default)("ExportSpecifier", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ExportSpecifier", |
| | | local, |
| | | exported |
| | | }); |
| | | } |
| | | |
| | | function forOfStatement(left, right, body, _await) { |
| | | return (0, _builder.default)("ForOfStatement", ...arguments); |
| | | function forOfStatement(left, right, body, _await = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ForOfStatement", |
| | | left, |
| | | right, |
| | | body, |
| | | await: _await |
| | | }); |
| | | } |
| | | |
| | | function importDeclaration(specifiers, source) { |
| | | return (0, _builder.default)("ImportDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ImportDeclaration", |
| | | specifiers, |
| | | source |
| | | }); |
| | | } |
| | | |
| | | function importDefaultSpecifier(local) { |
| | | return (0, _builder.default)("ImportDefaultSpecifier", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ImportDefaultSpecifier", |
| | | local |
| | | }); |
| | | } |
| | | |
| | | function importNamespaceSpecifier(local) { |
| | | return (0, _builder.default)("ImportNamespaceSpecifier", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ImportNamespaceSpecifier", |
| | | local |
| | | }); |
| | | } |
| | | |
| | | function importSpecifier(local, imported) { |
| | | return (0, _builder.default)("ImportSpecifier", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ImportSpecifier", |
| | | local, |
| | | imported |
| | | }); |
| | | } |
| | | |
| | | function metaProperty(meta, property) { |
| | | return (0, _builder.default)("MetaProperty", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "MetaProperty", |
| | | meta, |
| | | property |
| | | }); |
| | | } |
| | | |
| | | function classMethod(kind, key, params, body, computed, _static, generator, async) { |
| | | return (0, _builder.default)("ClassMethod", ...arguments); |
| | | function classMethod(kind = "method", key, params, body, computed = false, _static = false, generator = false, async = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassMethod", |
| | | kind, |
| | | key, |
| | | params, |
| | | body, |
| | | computed, |
| | | static: _static, |
| | | generator, |
| | | async |
| | | }); |
| | | } |
| | | |
| | | function objectPattern(properties) { |
| | | return (0, _builder.default)("ObjectPattern", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectPattern", |
| | | properties |
| | | }); |
| | | } |
| | | |
| | | function spreadElement(argument) { |
| | | return (0, _builder.default)("SpreadElement", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "SpreadElement", |
| | | argument |
| | | }); |
| | | } |
| | | |
| | | function _super() { |
| | | return (0, _builder.default)("Super", ...arguments); |
| | | return { |
| | | type: "Super" |
| | | }; |
| | | } |
| | | |
| | | function taggedTemplateExpression(tag, quasi) { |
| | | return (0, _builder.default)("TaggedTemplateExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TaggedTemplateExpression", |
| | | tag, |
| | | quasi |
| | | }); |
| | | } |
| | | |
| | | function templateElement(value, tail) { |
| | | return (0, _builder.default)("TemplateElement", ...arguments); |
| | | function templateElement(value, tail = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TemplateElement", |
| | | value, |
| | | tail |
| | | }); |
| | | } |
| | | |
| | | function templateLiteral(quasis, expressions) { |
| | | return (0, _builder.default)("TemplateLiteral", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TemplateLiteral", |
| | | quasis, |
| | | expressions |
| | | }); |
| | | } |
| | | |
| | | function yieldExpression(argument, delegate) { |
| | | return (0, _builder.default)("YieldExpression", ...arguments); |
| | | function yieldExpression(argument = null, delegate = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "YieldExpression", |
| | | argument, |
| | | delegate |
| | | }); |
| | | } |
| | | |
| | | function awaitExpression(argument) { |
| | | return (0, _builder.default)("AwaitExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "AwaitExpression", |
| | | argument |
| | | }); |
| | | } |
| | | |
| | | function _import() { |
| | | return (0, _builder.default)("Import", ...arguments); |
| | | return { |
| | | type: "Import" |
| | | }; |
| | | } |
| | | |
| | | function bigIntLiteral(value) { |
| | | return (0, _builder.default)("BigIntLiteral", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "BigIntLiteral", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function exportNamespaceSpecifier(exported) { |
| | | return (0, _builder.default)("ExportNamespaceSpecifier", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ExportNamespaceSpecifier", |
| | | exported |
| | | }); |
| | | } |
| | | |
| | | function optionalMemberExpression(object, property, computed, optional) { |
| | | return (0, _builder.default)("OptionalMemberExpression", ...arguments); |
| | | function optionalMemberExpression(object, property, computed = false, optional) { |
| | | return (0, _validateNode.default)({ |
| | | type: "OptionalMemberExpression", |
| | | object, |
| | | property, |
| | | computed, |
| | | optional |
| | | }); |
| | | } |
| | | |
| | | function optionalCallExpression(callee, _arguments, optional) { |
| | | return (0, _builder.default)("OptionalCallExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "OptionalCallExpression", |
| | | callee, |
| | | arguments: _arguments, |
| | | optional |
| | | }); |
| | | } |
| | | |
| | | function classProperty(key, value, typeAnnotation, decorators, computed, _static) { |
| | | return (0, _builder.default)("ClassProperty", ...arguments); |
| | | function classProperty(key, value = null, typeAnnotation = null, decorators = null, computed = false, _static = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassProperty", |
| | | key, |
| | | value, |
| | | typeAnnotation, |
| | | decorators, |
| | | computed, |
| | | static: _static |
| | | }); |
| | | } |
| | | |
| | | function classPrivateProperty(key, value, decorators, _static) { |
| | | return (0, _builder.default)("ClassPrivateProperty", ...arguments); |
| | | function classAccessorProperty(key, value = null, typeAnnotation = null, decorators = null, computed = false, _static = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassAccessorProperty", |
| | | key, |
| | | value, |
| | | typeAnnotation, |
| | | decorators, |
| | | computed, |
| | | static: _static |
| | | }); |
| | | } |
| | | |
| | | function classPrivateMethod(kind, key, params, body, _static) { |
| | | return (0, _builder.default)("ClassPrivateMethod", ...arguments); |
| | | function classPrivateProperty(key, value = null, decorators = null, _static) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassPrivateProperty", |
| | | key, |
| | | value, |
| | | decorators, |
| | | static: _static |
| | | }); |
| | | } |
| | | |
| | | function classPrivateMethod(kind = "method", key, params, body, _static = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassPrivateMethod", |
| | | kind, |
| | | key, |
| | | params, |
| | | body, |
| | | static: _static |
| | | }); |
| | | } |
| | | |
| | | function privateName(id) { |
| | | return (0, _builder.default)("PrivateName", ...arguments); |
| | | } |
| | | |
| | | function anyTypeAnnotation() { |
| | | return (0, _builder.default)("AnyTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function arrayTypeAnnotation(elementType) { |
| | | return (0, _builder.default)("ArrayTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function booleanTypeAnnotation() { |
| | | return (0, _builder.default)("BooleanTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function booleanLiteralTypeAnnotation(value) { |
| | | return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function nullLiteralTypeAnnotation() { |
| | | return (0, _builder.default)("NullLiteralTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function classImplements(id, typeParameters) { |
| | | return (0, _builder.default)("ClassImplements", ...arguments); |
| | | } |
| | | |
| | | function declareClass(id, typeParameters, _extends, body) { |
| | | return (0, _builder.default)("DeclareClass", ...arguments); |
| | | } |
| | | |
| | | function declareFunction(id) { |
| | | return (0, _builder.default)("DeclareFunction", ...arguments); |
| | | } |
| | | |
| | | function declareInterface(id, typeParameters, _extends, body) { |
| | | return (0, _builder.default)("DeclareInterface", ...arguments); |
| | | } |
| | | |
| | | function declareModule(id, body, kind) { |
| | | return (0, _builder.default)("DeclareModule", ...arguments); |
| | | } |
| | | |
| | | function declareModuleExports(typeAnnotation) { |
| | | return (0, _builder.default)("DeclareModuleExports", ...arguments); |
| | | } |
| | | |
| | | function declareTypeAlias(id, typeParameters, right) { |
| | | return (0, _builder.default)("DeclareTypeAlias", ...arguments); |
| | | } |
| | | |
| | | function declareOpaqueType(id, typeParameters, supertype) { |
| | | return (0, _builder.default)("DeclareOpaqueType", ...arguments); |
| | | } |
| | | |
| | | function declareVariable(id) { |
| | | return (0, _builder.default)("DeclareVariable", ...arguments); |
| | | } |
| | | |
| | | function declareExportDeclaration(declaration, specifiers, source) { |
| | | return (0, _builder.default)("DeclareExportDeclaration", ...arguments); |
| | | } |
| | | |
| | | function declareExportAllDeclaration(source) { |
| | | return (0, _builder.default)("DeclareExportAllDeclaration", ...arguments); |
| | | } |
| | | |
| | | function declaredPredicate(value) { |
| | | return (0, _builder.default)("DeclaredPredicate", ...arguments); |
| | | } |
| | | |
| | | function existsTypeAnnotation() { |
| | | return (0, _builder.default)("ExistsTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function functionTypeAnnotation(typeParameters, params, rest, returnType) { |
| | | return (0, _builder.default)("FunctionTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function functionTypeParam(name, typeAnnotation) { |
| | | return (0, _builder.default)("FunctionTypeParam", ...arguments); |
| | | } |
| | | |
| | | function genericTypeAnnotation(id, typeParameters) { |
| | | return (0, _builder.default)("GenericTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function inferredPredicate() { |
| | | return (0, _builder.default)("InferredPredicate", ...arguments); |
| | | } |
| | | |
| | | function interfaceExtends(id, typeParameters) { |
| | | return (0, _builder.default)("InterfaceExtends", ...arguments); |
| | | } |
| | | |
| | | function interfaceDeclaration(id, typeParameters, _extends, body) { |
| | | return (0, _builder.default)("InterfaceDeclaration", ...arguments); |
| | | } |
| | | |
| | | function interfaceTypeAnnotation(_extends, body) { |
| | | return (0, _builder.default)("InterfaceTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function intersectionTypeAnnotation(types) { |
| | | return (0, _builder.default)("IntersectionTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function mixedTypeAnnotation() { |
| | | return (0, _builder.default)("MixedTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function emptyTypeAnnotation() { |
| | | return (0, _builder.default)("EmptyTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function nullableTypeAnnotation(typeAnnotation) { |
| | | return (0, _builder.default)("NullableTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function numberLiteralTypeAnnotation(value) { |
| | | return (0, _builder.default)("NumberLiteralTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function numberTypeAnnotation() { |
| | | return (0, _builder.default)("NumberTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) { |
| | | return (0, _builder.default)("ObjectTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function objectTypeInternalSlot(id, value, optional, _static, method) { |
| | | return (0, _builder.default)("ObjectTypeInternalSlot", ...arguments); |
| | | } |
| | | |
| | | function objectTypeCallProperty(value) { |
| | | return (0, _builder.default)("ObjectTypeCallProperty", ...arguments); |
| | | } |
| | | |
| | | function objectTypeIndexer(id, key, value, variance) { |
| | | return (0, _builder.default)("ObjectTypeIndexer", ...arguments); |
| | | } |
| | | |
| | | function objectTypeProperty(key, value, variance) { |
| | | return (0, _builder.default)("ObjectTypeProperty", ...arguments); |
| | | } |
| | | |
| | | function objectTypeSpreadProperty(argument) { |
| | | return (0, _builder.default)("ObjectTypeSpreadProperty", ...arguments); |
| | | } |
| | | |
| | | function opaqueType(id, typeParameters, supertype, impltype) { |
| | | return (0, _builder.default)("OpaqueType", ...arguments); |
| | | } |
| | | |
| | | function qualifiedTypeIdentifier(id, qualification) { |
| | | return (0, _builder.default)("QualifiedTypeIdentifier", ...arguments); |
| | | } |
| | | |
| | | function stringLiteralTypeAnnotation(value) { |
| | | return (0, _builder.default)("StringLiteralTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function stringTypeAnnotation() { |
| | | return (0, _builder.default)("StringTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function symbolTypeAnnotation() { |
| | | return (0, _builder.default)("SymbolTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function thisTypeAnnotation() { |
| | | return (0, _builder.default)("ThisTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function tupleTypeAnnotation(types) { |
| | | return (0, _builder.default)("TupleTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function typeofTypeAnnotation(argument) { |
| | | return (0, _builder.default)("TypeofTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function typeAlias(id, typeParameters, right) { |
| | | return (0, _builder.default)("TypeAlias", ...arguments); |
| | | } |
| | | |
| | | function typeAnnotation(typeAnnotation) { |
| | | return (0, _builder.default)("TypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function typeCastExpression(expression, typeAnnotation) { |
| | | return (0, _builder.default)("TypeCastExpression", ...arguments); |
| | | } |
| | | |
| | | function typeParameter(bound, _default, variance) { |
| | | return (0, _builder.default)("TypeParameter", ...arguments); |
| | | } |
| | | |
| | | function typeParameterDeclaration(params) { |
| | | return (0, _builder.default)("TypeParameterDeclaration", ...arguments); |
| | | } |
| | | |
| | | function typeParameterInstantiation(params) { |
| | | return (0, _builder.default)("TypeParameterInstantiation", ...arguments); |
| | | } |
| | | |
| | | function unionTypeAnnotation(types) { |
| | | return (0, _builder.default)("UnionTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function variance(kind) { |
| | | return (0, _builder.default)("Variance", ...arguments); |
| | | } |
| | | |
| | | function voidTypeAnnotation() { |
| | | return (0, _builder.default)("VoidTypeAnnotation", ...arguments); |
| | | } |
| | | |
| | | function enumDeclaration(id, body) { |
| | | return (0, _builder.default)("EnumDeclaration", ...arguments); |
| | | } |
| | | |
| | | function enumBooleanBody(members) { |
| | | return (0, _builder.default)("EnumBooleanBody", ...arguments); |
| | | } |
| | | |
| | | function enumNumberBody(members) { |
| | | return (0, _builder.default)("EnumNumberBody", ...arguments); |
| | | } |
| | | |
| | | function enumStringBody(members) { |
| | | return (0, _builder.default)("EnumStringBody", ...arguments); |
| | | } |
| | | |
| | | function enumSymbolBody(members) { |
| | | return (0, _builder.default)("EnumSymbolBody", ...arguments); |
| | | } |
| | | |
| | | function enumBooleanMember(id) { |
| | | return (0, _builder.default)("EnumBooleanMember", ...arguments); |
| | | } |
| | | |
| | | function enumNumberMember(id, init) { |
| | | return (0, _builder.default)("EnumNumberMember", ...arguments); |
| | | } |
| | | |
| | | function enumStringMember(id, init) { |
| | | return (0, _builder.default)("EnumStringMember", ...arguments); |
| | | } |
| | | |
| | | function enumDefaultedMember(id) { |
| | | return (0, _builder.default)("EnumDefaultedMember", ...arguments); |
| | | } |
| | | |
| | | function indexedAccessType(objectType, indexType) { |
| | | return (0, _builder.default)("IndexedAccessType", ...arguments); |
| | | } |
| | | |
| | | function optionalIndexedAccessType(objectType, indexType) { |
| | | return (0, _builder.default)("OptionalIndexedAccessType", ...arguments); |
| | | } |
| | | |
| | | function jsxAttribute(name, value) { |
| | | return (0, _builder.default)("JSXAttribute", ...arguments); |
| | | } |
| | | |
| | | function jsxClosingElement(name) { |
| | | return (0, _builder.default)("JSXClosingElement", ...arguments); |
| | | } |
| | | |
| | | function jsxElement(openingElement, closingElement, children, selfClosing) { |
| | | return (0, _builder.default)("JSXElement", ...arguments); |
| | | } |
| | | |
| | | function jsxEmptyExpression() { |
| | | return (0, _builder.default)("JSXEmptyExpression", ...arguments); |
| | | } |
| | | |
| | | function jsxExpressionContainer(expression) { |
| | | return (0, _builder.default)("JSXExpressionContainer", ...arguments); |
| | | } |
| | | |
| | | function jsxSpreadChild(expression) { |
| | | return (0, _builder.default)("JSXSpreadChild", ...arguments); |
| | | } |
| | | |
| | | function jsxIdentifier(name) { |
| | | return (0, _builder.default)("JSXIdentifier", ...arguments); |
| | | } |
| | | |
| | | function jsxMemberExpression(object, property) { |
| | | return (0, _builder.default)("JSXMemberExpression", ...arguments); |
| | | } |
| | | |
| | | function jsxNamespacedName(namespace, name) { |
| | | return (0, _builder.default)("JSXNamespacedName", ...arguments); |
| | | } |
| | | |
| | | function jsxOpeningElement(name, attributes, selfClosing) { |
| | | return (0, _builder.default)("JSXOpeningElement", ...arguments); |
| | | } |
| | | |
| | | function jsxSpreadAttribute(argument) { |
| | | return (0, _builder.default)("JSXSpreadAttribute", ...arguments); |
| | | } |
| | | |
| | | function jsxText(value) { |
| | | return (0, _builder.default)("JSXText", ...arguments); |
| | | } |
| | | |
| | | function jsxFragment(openingFragment, closingFragment, children) { |
| | | return (0, _builder.default)("JSXFragment", ...arguments); |
| | | } |
| | | |
| | | function jsxOpeningFragment() { |
| | | return (0, _builder.default)("JSXOpeningFragment", ...arguments); |
| | | } |
| | | |
| | | function jsxClosingFragment() { |
| | | return (0, _builder.default)("JSXClosingFragment", ...arguments); |
| | | } |
| | | |
| | | function noop() { |
| | | return (0, _builder.default)("Noop", ...arguments); |
| | | } |
| | | |
| | | function placeholder(expectedNode, name) { |
| | | return (0, _builder.default)("Placeholder", ...arguments); |
| | | } |
| | | |
| | | function v8IntrinsicIdentifier(name) { |
| | | return (0, _builder.default)("V8IntrinsicIdentifier", ...arguments); |
| | | } |
| | | |
| | | function argumentPlaceholder() { |
| | | return (0, _builder.default)("ArgumentPlaceholder", ...arguments); |
| | | } |
| | | |
| | | function bindExpression(object, callee) { |
| | | return (0, _builder.default)("BindExpression", ...arguments); |
| | | } |
| | | |
| | | function importAttribute(key, value) { |
| | | return (0, _builder.default)("ImportAttribute", ...arguments); |
| | | } |
| | | |
| | | function decorator(expression) { |
| | | return (0, _builder.default)("Decorator", ...arguments); |
| | | } |
| | | |
| | | function doExpression(body, async) { |
| | | return (0, _builder.default)("DoExpression", ...arguments); |
| | | } |
| | | |
| | | function exportDefaultSpecifier(exported) { |
| | | return (0, _builder.default)("ExportDefaultSpecifier", ...arguments); |
| | | } |
| | | |
| | | function recordExpression(properties) { |
| | | return (0, _builder.default)("RecordExpression", ...arguments); |
| | | } |
| | | |
| | | function tupleExpression(elements) { |
| | | return (0, _builder.default)("TupleExpression", ...arguments); |
| | | } |
| | | |
| | | function decimalLiteral(value) { |
| | | return (0, _builder.default)("DecimalLiteral", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "PrivateName", |
| | | id |
| | | }); |
| | | } |
| | | |
| | | function staticBlock(body) { |
| | | return (0, _builder.default)("StaticBlock", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "StaticBlock", |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function anyTypeAnnotation() { |
| | | return { |
| | | type: "AnyTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function arrayTypeAnnotation(elementType) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ArrayTypeAnnotation", |
| | | elementType |
| | | }); |
| | | } |
| | | |
| | | function booleanTypeAnnotation() { |
| | | return { |
| | | type: "BooleanTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function booleanLiteralTypeAnnotation(value) { |
| | | return (0, _validateNode.default)({ |
| | | type: "BooleanLiteralTypeAnnotation", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function nullLiteralTypeAnnotation() { |
| | | return { |
| | | type: "NullLiteralTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function classImplements(id, typeParameters = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ClassImplements", |
| | | id, |
| | | typeParameters |
| | | }); |
| | | } |
| | | |
| | | function declareClass(id, typeParameters = null, _extends = null, body) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareClass", |
| | | id, |
| | | typeParameters, |
| | | extends: _extends, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function declareFunction(id) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareFunction", |
| | | id |
| | | }); |
| | | } |
| | | |
| | | function declareInterface(id, typeParameters = null, _extends = null, body) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareInterface", |
| | | id, |
| | | typeParameters, |
| | | extends: _extends, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function declareModule(id, body, kind = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareModule", |
| | | id, |
| | | body, |
| | | kind |
| | | }); |
| | | } |
| | | |
| | | function declareModuleExports(typeAnnotation) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareModuleExports", |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function declareTypeAlias(id, typeParameters = null, right) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareTypeAlias", |
| | | id, |
| | | typeParameters, |
| | | right |
| | | }); |
| | | } |
| | | |
| | | function declareOpaqueType(id, typeParameters = null, supertype = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareOpaqueType", |
| | | id, |
| | | typeParameters, |
| | | supertype |
| | | }); |
| | | } |
| | | |
| | | function declareVariable(id) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareVariable", |
| | | id |
| | | }); |
| | | } |
| | | |
| | | function declareExportDeclaration(declaration = null, specifiers = null, source = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareExportDeclaration", |
| | | declaration, |
| | | specifiers, |
| | | source |
| | | }); |
| | | } |
| | | |
| | | function declareExportAllDeclaration(source) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclareExportAllDeclaration", |
| | | source |
| | | }); |
| | | } |
| | | |
| | | function declaredPredicate(value) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DeclaredPredicate", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function existsTypeAnnotation() { |
| | | return { |
| | | type: "ExistsTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function functionTypeAnnotation(typeParameters = null, params, rest = null, returnType) { |
| | | return (0, _validateNode.default)({ |
| | | type: "FunctionTypeAnnotation", |
| | | typeParameters, |
| | | params, |
| | | rest, |
| | | returnType |
| | | }); |
| | | } |
| | | |
| | | function functionTypeParam(name = null, typeAnnotation) { |
| | | return (0, _validateNode.default)({ |
| | | type: "FunctionTypeParam", |
| | | name, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function genericTypeAnnotation(id, typeParameters = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "GenericTypeAnnotation", |
| | | id, |
| | | typeParameters |
| | | }); |
| | | } |
| | | |
| | | function inferredPredicate() { |
| | | return { |
| | | type: "InferredPredicate" |
| | | }; |
| | | } |
| | | |
| | | function interfaceExtends(id, typeParameters = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "InterfaceExtends", |
| | | id, |
| | | typeParameters |
| | | }); |
| | | } |
| | | |
| | | function interfaceDeclaration(id, typeParameters = null, _extends = null, body) { |
| | | return (0, _validateNode.default)({ |
| | | type: "InterfaceDeclaration", |
| | | id, |
| | | typeParameters, |
| | | extends: _extends, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function interfaceTypeAnnotation(_extends = null, body) { |
| | | return (0, _validateNode.default)({ |
| | | type: "InterfaceTypeAnnotation", |
| | | extends: _extends, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function intersectionTypeAnnotation(types) { |
| | | return (0, _validateNode.default)({ |
| | | type: "IntersectionTypeAnnotation", |
| | | types |
| | | }); |
| | | } |
| | | |
| | | function mixedTypeAnnotation() { |
| | | return { |
| | | type: "MixedTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function emptyTypeAnnotation() { |
| | | return { |
| | | type: "EmptyTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function nullableTypeAnnotation(typeAnnotation) { |
| | | return (0, _validateNode.default)({ |
| | | type: "NullableTypeAnnotation", |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function numberLiteralTypeAnnotation(value) { |
| | | return (0, _validateNode.default)({ |
| | | type: "NumberLiteralTypeAnnotation", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function numberTypeAnnotation() { |
| | | return { |
| | | type: "NumberTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function objectTypeAnnotation(properties, indexers = [], callProperties = [], internalSlots = [], exact = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectTypeAnnotation", |
| | | properties, |
| | | indexers, |
| | | callProperties, |
| | | internalSlots, |
| | | exact |
| | | }); |
| | | } |
| | | |
| | | function objectTypeInternalSlot(id, value, optional, _static, method) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectTypeInternalSlot", |
| | | id, |
| | | value, |
| | | optional, |
| | | static: _static, |
| | | method |
| | | }); |
| | | } |
| | | |
| | | function objectTypeCallProperty(value) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectTypeCallProperty", |
| | | value, |
| | | static: null |
| | | }); |
| | | } |
| | | |
| | | function objectTypeIndexer(id = null, key, value, variance = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectTypeIndexer", |
| | | id, |
| | | key, |
| | | value, |
| | | variance, |
| | | static: null |
| | | }); |
| | | } |
| | | |
| | | function objectTypeProperty(key, value, variance = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectTypeProperty", |
| | | key, |
| | | value, |
| | | variance, |
| | | kind: null, |
| | | method: null, |
| | | optional: null, |
| | | proto: null, |
| | | static: null |
| | | }); |
| | | } |
| | | |
| | | function objectTypeSpreadProperty(argument) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ObjectTypeSpreadProperty", |
| | | argument |
| | | }); |
| | | } |
| | | |
| | | function opaqueType(id, typeParameters = null, supertype = null, impltype) { |
| | | return (0, _validateNode.default)({ |
| | | type: "OpaqueType", |
| | | id, |
| | | typeParameters, |
| | | supertype, |
| | | impltype |
| | | }); |
| | | } |
| | | |
| | | function qualifiedTypeIdentifier(id, qualification) { |
| | | return (0, _validateNode.default)({ |
| | | type: "QualifiedTypeIdentifier", |
| | | id, |
| | | qualification |
| | | }); |
| | | } |
| | | |
| | | function stringLiteralTypeAnnotation(value) { |
| | | return (0, _validateNode.default)({ |
| | | type: "StringLiteralTypeAnnotation", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function stringTypeAnnotation() { |
| | | return { |
| | | type: "StringTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function symbolTypeAnnotation() { |
| | | return { |
| | | type: "SymbolTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function thisTypeAnnotation() { |
| | | return { |
| | | type: "ThisTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function tupleTypeAnnotation(types) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TupleTypeAnnotation", |
| | | types |
| | | }); |
| | | } |
| | | |
| | | function typeofTypeAnnotation(argument) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TypeofTypeAnnotation", |
| | | argument |
| | | }); |
| | | } |
| | | |
| | | function typeAlias(id, typeParameters = null, right) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TypeAlias", |
| | | id, |
| | | typeParameters, |
| | | right |
| | | }); |
| | | } |
| | | |
| | | function typeAnnotation(typeAnnotation) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TypeAnnotation", |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function typeCastExpression(expression, typeAnnotation) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TypeCastExpression", |
| | | expression, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function typeParameter(bound = null, _default = null, variance = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TypeParameter", |
| | | bound, |
| | | default: _default, |
| | | variance, |
| | | name: null |
| | | }); |
| | | } |
| | | |
| | | function typeParameterDeclaration(params) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TypeParameterDeclaration", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | function typeParameterInstantiation(params) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TypeParameterInstantiation", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | function unionTypeAnnotation(types) { |
| | | return (0, _validateNode.default)({ |
| | | type: "UnionTypeAnnotation", |
| | | types |
| | | }); |
| | | } |
| | | |
| | | function variance(kind) { |
| | | return (0, _validateNode.default)({ |
| | | type: "Variance", |
| | | kind |
| | | }); |
| | | } |
| | | |
| | | function voidTypeAnnotation() { |
| | | return { |
| | | type: "VoidTypeAnnotation" |
| | | }; |
| | | } |
| | | |
| | | function enumDeclaration(id, body) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumDeclaration", |
| | | id, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function enumBooleanBody(members) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumBooleanBody", |
| | | members, |
| | | explicitType: null, |
| | | hasUnknownMembers: null |
| | | }); |
| | | } |
| | | |
| | | function enumNumberBody(members) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumNumberBody", |
| | | members, |
| | | explicitType: null, |
| | | hasUnknownMembers: null |
| | | }); |
| | | } |
| | | |
| | | function enumStringBody(members) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumStringBody", |
| | | members, |
| | | explicitType: null, |
| | | hasUnknownMembers: null |
| | | }); |
| | | } |
| | | |
| | | function enumSymbolBody(members) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumSymbolBody", |
| | | members, |
| | | hasUnknownMembers: null |
| | | }); |
| | | } |
| | | |
| | | function enumBooleanMember(id) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumBooleanMember", |
| | | id, |
| | | init: null |
| | | }); |
| | | } |
| | | |
| | | function enumNumberMember(id, init) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumNumberMember", |
| | | id, |
| | | init |
| | | }); |
| | | } |
| | | |
| | | function enumStringMember(id, init) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumStringMember", |
| | | id, |
| | | init |
| | | }); |
| | | } |
| | | |
| | | function enumDefaultedMember(id) { |
| | | return (0, _validateNode.default)({ |
| | | type: "EnumDefaultedMember", |
| | | id |
| | | }); |
| | | } |
| | | |
| | | function indexedAccessType(objectType, indexType) { |
| | | return (0, _validateNode.default)({ |
| | | type: "IndexedAccessType", |
| | | objectType, |
| | | indexType |
| | | }); |
| | | } |
| | | |
| | | function optionalIndexedAccessType(objectType, indexType) { |
| | | return (0, _validateNode.default)({ |
| | | type: "OptionalIndexedAccessType", |
| | | objectType, |
| | | indexType, |
| | | optional: null |
| | | }); |
| | | } |
| | | |
| | | function jsxAttribute(name, value = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXAttribute", |
| | | name, |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function jsxClosingElement(name) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXClosingElement", |
| | | name |
| | | }); |
| | | } |
| | | |
| | | function jsxElement(openingElement, closingElement = null, children, selfClosing = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXElement", |
| | | openingElement, |
| | | closingElement, |
| | | children, |
| | | selfClosing |
| | | }); |
| | | } |
| | | |
| | | function jsxEmptyExpression() { |
| | | return { |
| | | type: "JSXEmptyExpression" |
| | | }; |
| | | } |
| | | |
| | | function jsxExpressionContainer(expression) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXExpressionContainer", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function jsxSpreadChild(expression) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXSpreadChild", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function jsxIdentifier(name) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXIdentifier", |
| | | name |
| | | }); |
| | | } |
| | | |
| | | function jsxMemberExpression(object, property) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXMemberExpression", |
| | | object, |
| | | property |
| | | }); |
| | | } |
| | | |
| | | function jsxNamespacedName(namespace, name) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXNamespacedName", |
| | | namespace, |
| | | name |
| | | }); |
| | | } |
| | | |
| | | function jsxOpeningElement(name, attributes, selfClosing = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXOpeningElement", |
| | | name, |
| | | attributes, |
| | | selfClosing |
| | | }); |
| | | } |
| | | |
| | | function jsxSpreadAttribute(argument) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXSpreadAttribute", |
| | | argument |
| | | }); |
| | | } |
| | | |
| | | function jsxText(value) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXText", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function jsxFragment(openingFragment, closingFragment, children) { |
| | | return (0, _validateNode.default)({ |
| | | type: "JSXFragment", |
| | | openingFragment, |
| | | closingFragment, |
| | | children |
| | | }); |
| | | } |
| | | |
| | | function jsxOpeningFragment() { |
| | | return { |
| | | type: "JSXOpeningFragment" |
| | | }; |
| | | } |
| | | |
| | | function jsxClosingFragment() { |
| | | return { |
| | | type: "JSXClosingFragment" |
| | | }; |
| | | } |
| | | |
| | | function noop() { |
| | | return { |
| | | type: "Noop" |
| | | }; |
| | | } |
| | | |
| | | function placeholder(expectedNode, name) { |
| | | return (0, _validateNode.default)({ |
| | | type: "Placeholder", |
| | | expectedNode, |
| | | name |
| | | }); |
| | | } |
| | | |
| | | function v8IntrinsicIdentifier(name) { |
| | | return (0, _validateNode.default)({ |
| | | type: "V8IntrinsicIdentifier", |
| | | name |
| | | }); |
| | | } |
| | | |
| | | function argumentPlaceholder() { |
| | | return { |
| | | type: "ArgumentPlaceholder" |
| | | }; |
| | | } |
| | | |
| | | function bindExpression(object, callee) { |
| | | return (0, _validateNode.default)({ |
| | | type: "BindExpression", |
| | | object, |
| | | callee |
| | | }); |
| | | } |
| | | |
| | | function importAttribute(key, value) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ImportAttribute", |
| | | key, |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function decorator(expression) { |
| | | return (0, _validateNode.default)({ |
| | | type: "Decorator", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function doExpression(body, async = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DoExpression", |
| | | body, |
| | | async |
| | | }); |
| | | } |
| | | |
| | | function exportDefaultSpecifier(exported) { |
| | | return (0, _validateNode.default)({ |
| | | type: "ExportDefaultSpecifier", |
| | | exported |
| | | }); |
| | | } |
| | | |
| | | function recordExpression(properties) { |
| | | return (0, _validateNode.default)({ |
| | | type: "RecordExpression", |
| | | properties |
| | | }); |
| | | } |
| | | |
| | | function tupleExpression(elements = []) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TupleExpression", |
| | | elements |
| | | }); |
| | | } |
| | | |
| | | function decimalLiteral(value) { |
| | | return (0, _validateNode.default)({ |
| | | type: "DecimalLiteral", |
| | | value |
| | | }); |
| | | } |
| | | |
| | | function moduleExpression(body) { |
| | | return (0, _builder.default)("ModuleExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "ModuleExpression", |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function topicReference() { |
| | | return (0, _builder.default)("TopicReference", ...arguments); |
| | | return { |
| | | type: "TopicReference" |
| | | }; |
| | | } |
| | | |
| | | function pipelineTopicExpression(expression) { |
| | | return (0, _builder.default)("PipelineTopicExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "PipelineTopicExpression", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function pipelineBareFunction(callee) { |
| | | return (0, _builder.default)("PipelineBareFunction", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "PipelineBareFunction", |
| | | callee |
| | | }); |
| | | } |
| | | |
| | | function pipelinePrimaryTopicReference() { |
| | | return (0, _builder.default)("PipelinePrimaryTopicReference", ...arguments); |
| | | return { |
| | | type: "PipelinePrimaryTopicReference" |
| | | }; |
| | | } |
| | | |
| | | function tsParameterProperty(parameter) { |
| | | return (0, _builder.default)("TSParameterProperty", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSParameterProperty", |
| | | parameter |
| | | }); |
| | | } |
| | | |
| | | function tsDeclareFunction(id, typeParameters, params, returnType) { |
| | | return (0, _builder.default)("TSDeclareFunction", ...arguments); |
| | | function tsDeclareFunction(id = null, typeParameters = null, params, returnType = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSDeclareFunction", |
| | | id, |
| | | typeParameters, |
| | | params, |
| | | returnType |
| | | }); |
| | | } |
| | | |
| | | function tsDeclareMethod(decorators, key, typeParameters, params, returnType) { |
| | | return (0, _builder.default)("TSDeclareMethod", ...arguments); |
| | | function tsDeclareMethod(decorators = null, key, typeParameters = null, params, returnType = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSDeclareMethod", |
| | | decorators, |
| | | key, |
| | | typeParameters, |
| | | params, |
| | | returnType |
| | | }); |
| | | } |
| | | |
| | | function tsQualifiedName(left, right) { |
| | | return (0, _builder.default)("TSQualifiedName", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSQualifiedName", |
| | | left, |
| | | right |
| | | }); |
| | | } |
| | | |
| | | function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation) { |
| | | return (0, _builder.default)("TSCallSignatureDeclaration", ...arguments); |
| | | function tsCallSignatureDeclaration(typeParameters = null, parameters, typeAnnotation = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSCallSignatureDeclaration", |
| | | typeParameters, |
| | | parameters, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation) { |
| | | return (0, _builder.default)("TSConstructSignatureDeclaration", ...arguments); |
| | | function tsConstructSignatureDeclaration(typeParameters = null, parameters, typeAnnotation = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSConstructSignatureDeclaration", |
| | | typeParameters, |
| | | parameters, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsPropertySignature(key, typeAnnotation, initializer) { |
| | | return (0, _builder.default)("TSPropertySignature", ...arguments); |
| | | function tsPropertySignature(key, typeAnnotation = null, initializer = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSPropertySignature", |
| | | key, |
| | | typeAnnotation, |
| | | initializer, |
| | | kind: null |
| | | }); |
| | | } |
| | | |
| | | function tsMethodSignature(key, typeParameters, parameters, typeAnnotation) { |
| | | return (0, _builder.default)("TSMethodSignature", ...arguments); |
| | | function tsMethodSignature(key, typeParameters = null, parameters, typeAnnotation = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSMethodSignature", |
| | | key, |
| | | typeParameters, |
| | | parameters, |
| | | typeAnnotation, |
| | | kind: null |
| | | }); |
| | | } |
| | | |
| | | function tsIndexSignature(parameters, typeAnnotation) { |
| | | return (0, _builder.default)("TSIndexSignature", ...arguments); |
| | | function tsIndexSignature(parameters, typeAnnotation = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSIndexSignature", |
| | | parameters, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsAnyKeyword() { |
| | | return (0, _builder.default)("TSAnyKeyword", ...arguments); |
| | | return { |
| | | type: "TSAnyKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsBooleanKeyword() { |
| | | return (0, _builder.default)("TSBooleanKeyword", ...arguments); |
| | | return { |
| | | type: "TSBooleanKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsBigIntKeyword() { |
| | | return (0, _builder.default)("TSBigIntKeyword", ...arguments); |
| | | return { |
| | | type: "TSBigIntKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsIntrinsicKeyword() { |
| | | return (0, _builder.default)("TSIntrinsicKeyword", ...arguments); |
| | | return { |
| | | type: "TSIntrinsicKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsNeverKeyword() { |
| | | return (0, _builder.default)("TSNeverKeyword", ...arguments); |
| | | return { |
| | | type: "TSNeverKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsNullKeyword() { |
| | | return (0, _builder.default)("TSNullKeyword", ...arguments); |
| | | return { |
| | | type: "TSNullKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsNumberKeyword() { |
| | | return (0, _builder.default)("TSNumberKeyword", ...arguments); |
| | | return { |
| | | type: "TSNumberKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsObjectKeyword() { |
| | | return (0, _builder.default)("TSObjectKeyword", ...arguments); |
| | | return { |
| | | type: "TSObjectKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsStringKeyword() { |
| | | return (0, _builder.default)("TSStringKeyword", ...arguments); |
| | | return { |
| | | type: "TSStringKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsSymbolKeyword() { |
| | | return (0, _builder.default)("TSSymbolKeyword", ...arguments); |
| | | return { |
| | | type: "TSSymbolKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsUndefinedKeyword() { |
| | | return (0, _builder.default)("TSUndefinedKeyword", ...arguments); |
| | | return { |
| | | type: "TSUndefinedKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsUnknownKeyword() { |
| | | return (0, _builder.default)("TSUnknownKeyword", ...arguments); |
| | | return { |
| | | type: "TSUnknownKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsVoidKeyword() { |
| | | return (0, _builder.default)("TSVoidKeyword", ...arguments); |
| | | return { |
| | | type: "TSVoidKeyword" |
| | | }; |
| | | } |
| | | |
| | | function tsThisType() { |
| | | return (0, _builder.default)("TSThisType", ...arguments); |
| | | return { |
| | | type: "TSThisType" |
| | | }; |
| | | } |
| | | |
| | | function tsFunctionType(typeParameters, parameters, typeAnnotation) { |
| | | return (0, _builder.default)("TSFunctionType", ...arguments); |
| | | function tsFunctionType(typeParameters = null, parameters, typeAnnotation = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSFunctionType", |
| | | typeParameters, |
| | | parameters, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsConstructorType(typeParameters, parameters, typeAnnotation) { |
| | | return (0, _builder.default)("TSConstructorType", ...arguments); |
| | | function tsConstructorType(typeParameters = null, parameters, typeAnnotation = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSConstructorType", |
| | | typeParameters, |
| | | parameters, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsTypeReference(typeName, typeParameters) { |
| | | return (0, _builder.default)("TSTypeReference", ...arguments); |
| | | function tsTypeReference(typeName, typeParameters = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeReference", |
| | | typeName, |
| | | typeParameters |
| | | }); |
| | | } |
| | | |
| | | function tsTypePredicate(parameterName, typeAnnotation, asserts) { |
| | | return (0, _builder.default)("TSTypePredicate", ...arguments); |
| | | function tsTypePredicate(parameterName, typeAnnotation = null, asserts = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypePredicate", |
| | | parameterName, |
| | | typeAnnotation, |
| | | asserts |
| | | }); |
| | | } |
| | | |
| | | function tsTypeQuery(exprName) { |
| | | return (0, _builder.default)("TSTypeQuery", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeQuery", |
| | | exprName |
| | | }); |
| | | } |
| | | |
| | | function tsTypeLiteral(members) { |
| | | return (0, _builder.default)("TSTypeLiteral", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeLiteral", |
| | | members |
| | | }); |
| | | } |
| | | |
| | | function tsArrayType(elementType) { |
| | | return (0, _builder.default)("TSArrayType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSArrayType", |
| | | elementType |
| | | }); |
| | | } |
| | | |
| | | function tsTupleType(elementTypes) { |
| | | return (0, _builder.default)("TSTupleType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTupleType", |
| | | elementTypes |
| | | }); |
| | | } |
| | | |
| | | function tsOptionalType(typeAnnotation) { |
| | | return (0, _builder.default)("TSOptionalType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSOptionalType", |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsRestType(typeAnnotation) { |
| | | return (0, _builder.default)("TSRestType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSRestType", |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsNamedTupleMember(label, elementType, optional) { |
| | | return (0, _builder.default)("TSNamedTupleMember", ...arguments); |
| | | function tsNamedTupleMember(label, elementType, optional = false) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSNamedTupleMember", |
| | | label, |
| | | elementType, |
| | | optional |
| | | }); |
| | | } |
| | | |
| | | function tsUnionType(types) { |
| | | return (0, _builder.default)("TSUnionType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSUnionType", |
| | | types |
| | | }); |
| | | } |
| | | |
| | | function tsIntersectionType(types) { |
| | | return (0, _builder.default)("TSIntersectionType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSIntersectionType", |
| | | types |
| | | }); |
| | | } |
| | | |
| | | function tsConditionalType(checkType, extendsType, trueType, falseType) { |
| | | return (0, _builder.default)("TSConditionalType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSConditionalType", |
| | | checkType, |
| | | extendsType, |
| | | trueType, |
| | | falseType |
| | | }); |
| | | } |
| | | |
| | | function tsInferType(typeParameter) { |
| | | return (0, _builder.default)("TSInferType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSInferType", |
| | | typeParameter |
| | | }); |
| | | } |
| | | |
| | | function tsParenthesizedType(typeAnnotation) { |
| | | return (0, _builder.default)("TSParenthesizedType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSParenthesizedType", |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsTypeOperator(typeAnnotation) { |
| | | return (0, _builder.default)("TSTypeOperator", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeOperator", |
| | | typeAnnotation, |
| | | operator: null |
| | | }); |
| | | } |
| | | |
| | | function tsIndexedAccessType(objectType, indexType) { |
| | | return (0, _builder.default)("TSIndexedAccessType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSIndexedAccessType", |
| | | objectType, |
| | | indexType |
| | | }); |
| | | } |
| | | |
| | | function tsMappedType(typeParameter, typeAnnotation, nameType) { |
| | | return (0, _builder.default)("TSMappedType", ...arguments); |
| | | function tsMappedType(typeParameter, typeAnnotation = null, nameType = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSMappedType", |
| | | typeParameter, |
| | | typeAnnotation, |
| | | nameType |
| | | }); |
| | | } |
| | | |
| | | function tsLiteralType(literal) { |
| | | return (0, _builder.default)("TSLiteralType", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSLiteralType", |
| | | literal |
| | | }); |
| | | } |
| | | |
| | | function tsExpressionWithTypeArguments(expression, typeParameters) { |
| | | return (0, _builder.default)("TSExpressionWithTypeArguments", ...arguments); |
| | | function tsExpressionWithTypeArguments(expression, typeParameters = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSExpressionWithTypeArguments", |
| | | expression, |
| | | typeParameters |
| | | }); |
| | | } |
| | | |
| | | function tsInterfaceDeclaration(id, typeParameters, _extends, body) { |
| | | return (0, _builder.default)("TSInterfaceDeclaration", ...arguments); |
| | | function tsInterfaceDeclaration(id, typeParameters = null, _extends = null, body) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSInterfaceDeclaration", |
| | | id, |
| | | typeParameters, |
| | | extends: _extends, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function tsInterfaceBody(body) { |
| | | return (0, _builder.default)("TSInterfaceBody", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSInterfaceBody", |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation) { |
| | | return (0, _builder.default)("TSTypeAliasDeclaration", ...arguments); |
| | | function tsTypeAliasDeclaration(id, typeParameters = null, typeAnnotation) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeAliasDeclaration", |
| | | id, |
| | | typeParameters, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsAsExpression(expression, typeAnnotation) { |
| | | return (0, _builder.default)("TSAsExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSAsExpression", |
| | | expression, |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsTypeAssertion(typeAnnotation, expression) { |
| | | return (0, _builder.default)("TSTypeAssertion", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeAssertion", |
| | | typeAnnotation, |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function tsEnumDeclaration(id, members) { |
| | | return (0, _builder.default)("TSEnumDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSEnumDeclaration", |
| | | id, |
| | | members |
| | | }); |
| | | } |
| | | |
| | | function tsEnumMember(id, initializer) { |
| | | return (0, _builder.default)("TSEnumMember", ...arguments); |
| | | function tsEnumMember(id, initializer = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSEnumMember", |
| | | id, |
| | | initializer |
| | | }); |
| | | } |
| | | |
| | | function tsModuleDeclaration(id, body) { |
| | | return (0, _builder.default)("TSModuleDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSModuleDeclaration", |
| | | id, |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function tsModuleBlock(body) { |
| | | return (0, _builder.default)("TSModuleBlock", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSModuleBlock", |
| | | body |
| | | }); |
| | | } |
| | | |
| | | function tsImportType(argument, qualifier, typeParameters) { |
| | | return (0, _builder.default)("TSImportType", ...arguments); |
| | | function tsImportType(argument, qualifier = null, typeParameters = null) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSImportType", |
| | | argument, |
| | | qualifier, |
| | | typeParameters |
| | | }); |
| | | } |
| | | |
| | | function tsImportEqualsDeclaration(id, moduleReference) { |
| | | return (0, _builder.default)("TSImportEqualsDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSImportEqualsDeclaration", |
| | | id, |
| | | moduleReference, |
| | | isExport: null |
| | | }); |
| | | } |
| | | |
| | | function tsExternalModuleReference(expression) { |
| | | return (0, _builder.default)("TSExternalModuleReference", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSExternalModuleReference", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function tsNonNullExpression(expression) { |
| | | return (0, _builder.default)("TSNonNullExpression", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSNonNullExpression", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function tsExportAssignment(expression) { |
| | | return (0, _builder.default)("TSExportAssignment", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSExportAssignment", |
| | | expression |
| | | }); |
| | | } |
| | | |
| | | function tsNamespaceExportDeclaration(id) { |
| | | return (0, _builder.default)("TSNamespaceExportDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSNamespaceExportDeclaration", |
| | | id |
| | | }); |
| | | } |
| | | |
| | | function tsTypeAnnotation(typeAnnotation) { |
| | | return (0, _builder.default)("TSTypeAnnotation", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeAnnotation", |
| | | typeAnnotation |
| | | }); |
| | | } |
| | | |
| | | function tsTypeParameterInstantiation(params) { |
| | | return (0, _builder.default)("TSTypeParameterInstantiation", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeParameterInstantiation", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | function tsTypeParameterDeclaration(params) { |
| | | return (0, _builder.default)("TSTypeParameterDeclaration", ...arguments); |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeParameterDeclaration", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | function tsTypeParameter(constraint, _default, name) { |
| | | return (0, _builder.default)("TSTypeParameter", ...arguments); |
| | | function tsTypeParameter(constraint = null, _default = null, name) { |
| | | return (0, _validateNode.default)({ |
| | | type: "TSTypeParameter", |
| | | constraint, |
| | | default: _default, |
| | | name |
| | | }); |
| | | } |
| | | |
| | | function NumberLiteral(...args) { |
| | | function NumberLiteral(value) { |
| | | console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); |
| | | return (0, _builder.default)("NumberLiteral", ...args); |
| | | return numericLiteral(value); |
| | | } |
| | | |
| | | function RegexLiteral(...args) { |
| | | function RegexLiteral(pattern, flags = "") { |
| | | console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); |
| | | return (0, _builder.default)("RegexLiteral", ...args); |
| | | return regExpLiteral(pattern, flags); |
| | | } |
| | | |
| | | function RestProperty(...args) { |
| | | function RestProperty(argument) { |
| | | console.trace("The node type RestProperty has been renamed to RestElement"); |
| | | return (0, _builder.default)("RestProperty", ...args); |
| | | return restElement(argument); |
| | | } |
| | | |
| | | function SpreadProperty(...args) { |
| | | function SpreadProperty(argument) { |
| | | console.trace("The node type SpreadProperty has been renamed to SpreadElement"); |
| | | return (0, _builder.default)("SpreadProperty", ...args); |
| | | return spreadElement(argument); |
| | | } |