faster-babel-types
Version:
1,352 lines (1,310 loc) • 115 kB
JavaScript
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
_import: () => _import,
_super: () => _super,
addComment: () => addComment,
addComments: () => addComments,
anyTypeAnnotation: () => anyTypeAnnotation,
argumentPlaceholder: () => argumentPlaceholder,
arrayExpression: () => arrayExpression,
arrayPattern: () => arrayPattern,
arrayTypeAnnotation: () => arrayTypeAnnotation,
arrowFunctionExpression: () => arrowFunctionExpression,
assertAnyTypeAnnotation: () => assertAnyTypeAnnotation,
assertArgumentPlaceholder: () => assertArgumentPlaceholder,
assertArrayExpression: () => assertArrayExpression,
assertArrayPattern: () => assertArrayPattern,
assertArrayTypeAnnotation: () => assertArrayTypeAnnotation,
assertArrowFunctionExpression: () => assertArrowFunctionExpression,
assertAssignmentExpression: () => assertAssignmentExpression,
assertAssignmentPattern: () => assertAssignmentPattern,
assertAwaitExpression: () => assertAwaitExpression,
assertBigIntLiteral: () => assertBigIntLiteral,
assertBinaryExpression: () => assertBinaryExpression,
assertBindExpression: () => assertBindExpression,
assertBlockStatement: () => assertBlockStatement,
assertBooleanLiteral: () => assertBooleanLiteral,
assertBooleanLiteralTypeAnnotation: () => assertBooleanLiteralTypeAnnotation,
assertBooleanTypeAnnotation: () => assertBooleanTypeAnnotation,
assertBreakStatement: () => assertBreakStatement,
assertCallExpression: () => assertCallExpression,
assertCatchClause: () => assertCatchClause,
assertClassAccessorProperty: () => assertClassAccessorProperty,
assertClassBody: () => assertClassBody,
assertClassDeclaration: () => assertClassDeclaration,
assertClassExpression: () => assertClassExpression,
assertClassMethod: () => assertClassMethod,
assertClassPrivateMethod: () => assertClassPrivateMethod,
assertClassPrivateProperty: () => assertClassPrivateProperty,
assertClassProperty: () => assertClassProperty,
assertConditionalExpression: () => assertConditionalExpression,
assertContinueStatement: () => assertContinueStatement,
assertDebuggerStatement: () => assertDebuggerStatement,
assertDecimalLiteral: () => assertDecimalLiteral,
assertDeclareClass: () => assertDeclareClass,
assertDeclareExportAllDeclaration: () => assertDeclareExportAllDeclaration,
assertDeclareExportDeclaration: () => assertDeclareExportDeclaration,
assertDeclareFunction: () => assertDeclareFunction,
assertDeclareInterface: () => assertDeclareInterface,
assertDeclareModule: () => assertDeclareModule,
assertDeclareModuleExports: () => assertDeclareModuleExports,
assertDeclareOpaqueType: () => assertDeclareOpaqueType,
assertDeclareTypeAlias: () => assertDeclareTypeAlias,
assertDeclareVariable: () => assertDeclareVariable,
assertDecorator: () => assertDecorator,
assertDirective: () => assertDirective,
assertDirectiveLiteral: () => assertDirectiveLiteral,
assertDoExpression: () => assertDoExpression,
assertDoWhileStatement: () => assertDoWhileStatement,
assertEmptyStatement: () => assertEmptyStatement,
assertEmptyTypeAnnotation: () => assertEmptyTypeAnnotation,
assertEnumBooleanBody: () => assertEnumBooleanBody,
assertEnumBooleanMember: () => assertEnumBooleanMember,
assertEnumDeclaration: () => assertEnumDeclaration,
assertEnumDefaultedMember: () => assertEnumDefaultedMember,
assertEnumNumberBody: () => assertEnumNumberBody,
assertEnumNumberMember: () => assertEnumNumberMember,
assertEnumStringBody: () => assertEnumStringBody,
assertEnumStringMember: () => assertEnumStringMember,
assertEnumSymbolBody: () => assertEnumSymbolBody,
assertExistsTypeAnnotation: () => assertExistsTypeAnnotation,
assertExportAllDeclaration: () => assertExportAllDeclaration,
assertExportDefaultSpecifier: () => assertExportDefaultSpecifier,
assertExportNamedDeclaration: () => assertExportNamedDeclaration,
assertExportNamespaceSpecifier: () => assertExportNamespaceSpecifier,
assertExportSpecifier: () => assertExportSpecifier,
assertExpressionStatement: () => assertExpressionStatement,
assertForInStatement: () => assertForInStatement,
assertForOfStatement: () => assertForOfStatement,
assertForStatement: () => assertForStatement,
assertFunctionDeclaration: () => assertFunctionDeclaration,
assertFunctionExpression: () => assertFunctionExpression,
assertFunctionTypeAnnotation: () => assertFunctionTypeAnnotation,
assertFunctionTypeParam: () => assertFunctionTypeParam,
assertGenericTypeAnnotation: () => assertGenericTypeAnnotation,
assertIdentifier: () => assertIdentifier,
assertIfStatement: () => assertIfStatement,
assertImport: () => assertImport,
assertImportDeclaration: () => assertImportDeclaration,
assertImportDefaultSpecifier: () => assertImportDefaultSpecifier,
assertImportExpression: () => assertImportExpression,
assertImportNamespaceSpecifier: () => assertImportNamespaceSpecifier,
assertImportSpecifier: () => assertImportSpecifier,
assertIndexedAccessType: () => assertIndexedAccessType,
assertInterfaceDeclaration: () => assertInterfaceDeclaration,
assertInterfaceExtends: () => assertInterfaceExtends,
assertInterfaceTypeAnnotation: () => assertInterfaceTypeAnnotation,
assertIntersectionTypeAnnotation: () => assertIntersectionTypeAnnotation,
assertJSXAttribute: () => assertJSXAttribute,
assertJSXClosingElement: () => assertJSXClosingElement,
assertJSXClosingFragment: () => assertJSXClosingFragment,
assertJSXElement: () => assertJSXElement,
assertJSXEmptyExpression: () => assertJSXEmptyExpression,
assertJSXExpressionContainer: () => assertJSXExpressionContainer,
assertJSXFragment: () => assertJSXFragment,
assertJSXIdentifier: () => assertJSXIdentifier,
assertJSXMemberExpression: () => assertJSXMemberExpression,
assertJSXNamespacedName: () => assertJSXNamespacedName,
assertJSXOpeningElement: () => assertJSXOpeningElement,
assertJSXOpeningFragment: () => assertJSXOpeningFragment,
assertJSXSpreadAttribute: () => assertJSXSpreadAttribute,
assertJSXSpreadChild: () => assertJSXSpreadChild,
assertJSXText: () => assertJSXText,
assertLabeledStatement: () => assertLabeledStatement,
assertLogicalExpression: () => assertLogicalExpression,
assertMemberExpression: () => assertMemberExpression,
assertMetaProperty: () => assertMetaProperty,
assertMixedTypeAnnotation: () => assertMixedTypeAnnotation,
assertModuleExpression: () => assertModuleExpression,
assertNewExpression: () => assertNewExpression,
assertNullLiteral: () => assertNullLiteral,
assertNullLiteralTypeAnnotation: () => assertNullLiteralTypeAnnotation,
assertNullableTypeAnnotation: () => assertNullableTypeAnnotation,
assertNumberLiteralTypeAnnotation: () => assertNumberLiteralTypeAnnotation,
assertNumberTypeAnnotation: () => assertNumberTypeAnnotation,
assertNumericLiteral: () => assertNumericLiteral,
assertObjectExpression: () => assertObjectExpression,
assertObjectMethod: () => assertObjectMethod,
assertObjectPattern: () => assertObjectPattern,
assertObjectProperty: () => assertObjectProperty,
assertObjectTypeAnnotation: () => assertObjectTypeAnnotation,
assertObjectTypeCallProperty: () => assertObjectTypeCallProperty,
assertObjectTypeIndexer: () => assertObjectTypeIndexer,
assertObjectTypeInternalSlot: () => assertObjectTypeInternalSlot,
assertObjectTypeProperty: () => assertObjectTypeProperty,
assertObjectTypeSpreadProperty: () => assertObjectTypeSpreadProperty,
assertOpaqueType: () => assertOpaqueType,
assertOptionalCallExpression: () => assertOptionalCallExpression,
assertOptionalIndexedAccessType: () => assertOptionalIndexedAccessType,
assertOptionalMemberExpression: () => assertOptionalMemberExpression,
assertParenthesizedExpression: () => assertParenthesizedExpression,
assertPipelineBareFunction: () => assertPipelineBareFunction,
assertPipelinePrimaryTopicReference: () => assertPipelinePrimaryTopicReference,
assertPipelineTopicExpression: () => assertPipelineTopicExpression,
assertPrivateName: () => assertPrivateName,
assertQualifiedTypeIdentifier: () => assertQualifiedTypeIdentifier,
assertRecordExpression: () => assertRecordExpression,
assertRegExpLiteral: () => assertRegExpLiteral,
assertRestElement: () => assertRestElement,
assertReturnStatement: () => assertReturnStatement,
assertSequenceExpression: () => assertSequenceExpression,
assertSpreadElement: () => assertSpreadElement,
assertStaticBlock: () => assertStaticBlock,
assertStringLiteral: () => assertStringLiteral,
assertStringLiteralTypeAnnotation: () => assertStringLiteralTypeAnnotation,
assertStringTypeAnnotation: () => assertStringTypeAnnotation,
assertSuper: () => assertSuper,
assertSwitchCase: () => assertSwitchCase,
assertSwitchStatement: () => assertSwitchStatement,
assertSymbolTypeAnnotation: () => assertSymbolTypeAnnotation,
assertTSAnyKeyword: () => assertTSAnyKeyword,
assertTSArrayType: () => assertTSArrayType,
assertTSAsExpression: () => assertTSAsExpression,
assertTSBigIntKeyword: () => assertTSBigIntKeyword,
assertTSBooleanKeyword: () => assertTSBooleanKeyword,
assertTSCallSignatureDeclaration: () => assertTSCallSignatureDeclaration,
assertTSConditionalType: () => assertTSConditionalType,
assertTSConstructSignatureDeclaration: () => assertTSConstructSignatureDeclaration,
assertTSConstructorType: () => assertTSConstructorType,
assertTSDeclareFunction: () => assertTSDeclareFunction,
assertTSDeclareMethod: () => assertTSDeclareMethod,
assertTSEnumDeclaration: () => assertTSEnumDeclaration,
assertTSExportAssignment: () => assertTSExportAssignment,
assertTSExpressionWithTypeArguments: () => assertTSExpressionWithTypeArguments,
assertTSFunctionType: () => assertTSFunctionType,
assertTSImportEqualsDeclaration: () => assertTSImportEqualsDeclaration,
assertTSImportType: () => assertTSImportType,
assertTSIndexSignature: () => assertTSIndexSignature,
assertTSIndexedAccessType: () => assertTSIndexedAccessType,
assertTSInferType: () => assertTSInferType,
assertTSInstantiationExpression: () => assertTSInstantiationExpression,
assertTSInterfaceDeclaration: () => assertTSInterfaceDeclaration,
assertTSIntersectionType: () => assertTSIntersectionType,
assertTSIntrinsicKeyword: () => assertTSIntrinsicKeyword,
assertTSLiteralType: () => assertTSLiteralType,
assertTSMappedType: () => assertTSMappedType,
assertTSMethodSignature: () => assertTSMethodSignature,
assertTSModuleBlock: () => assertTSModuleBlock,
assertTSModuleDeclaration: () => assertTSModuleDeclaration,
assertTSNamedTupleMember: () => assertTSNamedTupleMember,
assertTSNamespaceExportDeclaration: () => assertTSNamespaceExportDeclaration,
assertTSNeverKeyword: () => assertTSNeverKeyword,
assertTSNonNullExpression: () => assertTSNonNullExpression,
assertTSNullKeyword: () => assertTSNullKeyword,
assertTSNumberKeyword: () => assertTSNumberKeyword,
assertTSObjectKeyword: () => assertTSObjectKeyword,
assertTSOptionalType: () => assertTSOptionalType,
assertTSParameterProperty: () => assertTSParameterProperty,
assertTSParenthesizedType: () => assertTSParenthesizedType,
assertTSPropertySignature: () => assertTSPropertySignature,
assertTSQualifiedName: () => assertTSQualifiedName,
assertTSRestType: () => assertTSRestType,
assertTSSatisfiesExpression: () => assertTSSatisfiesExpression,
assertTSStringKeyword: () => assertTSStringKeyword,
assertTSSymbolKeyword: () => assertTSSymbolKeyword,
assertTSThisType: () => assertTSThisType,
assertTSTupleType: () => assertTSTupleType,
assertTSTypeAliasDeclaration: () => assertTSTypeAliasDeclaration,
assertTSTypeAnnotation: () => assertTSTypeAnnotation,
assertTSTypeAssertion: () => assertTSTypeAssertion,
assertTSTypeLiteral: () => assertTSTypeLiteral,
assertTSTypeOperator: () => assertTSTypeOperator,
assertTSTypeParameter: () => assertTSTypeParameter,
assertTSTypeParameterDeclaration: () => assertTSTypeParameterDeclaration,
assertTSTypeParameterInstantiation: () => assertTSTypeParameterInstantiation,
assertTSTypePredicate: () => assertTSTypePredicate,
assertTSTypeQuery: () => assertTSTypeQuery,
assertTSTypeReference: () => assertTSTypeReference,
assertTSUndefinedKeyword: () => assertTSUndefinedKeyword,
assertTSUnionType: () => assertTSUnionType,
assertTSUnknownKeyword: () => assertTSUnknownKeyword,
assertTSVoidKeyword: () => assertTSVoidKeyword,
assertTaggedTemplateExpression: () => assertTaggedTemplateExpression,
assertTemplateElement: () => assertTemplateElement,
assertTemplateLiteral: () => assertTemplateLiteral,
assertThisExpression: () => assertThisExpression,
assertThisTypeAnnotation: () => assertThisTypeAnnotation,
assertThrowStatement: () => assertThrowStatement,
assertTopicReference: () => assertTopicReference,
assertTryStatement: () => assertTryStatement,
assertTupleExpression: () => assertTupleExpression,
assertTupleTypeAnnotation: () => assertTupleTypeAnnotation,
assertTypeAlias: () => assertTypeAlias,
assertTypeAnnotation: () => assertTypeAnnotation,
assertTypeCastExpression: () => assertTypeCastExpression,
assertTypeofTypeAnnotation: () => assertTypeofTypeAnnotation,
assertUnaryExpression: () => assertUnaryExpression,
assertUnionTypeAnnotation: () => assertUnionTypeAnnotation,
assertUpdateExpression: () => assertUpdateExpression,
assertV8IntrinsicIdentifier: () => assertV8IntrinsicIdentifier,
assertVariableDeclaration: () => assertVariableDeclaration,
assertVariableDeclarator: () => assertVariableDeclarator,
assertVariance: () => assertVariance,
assertVoidTypeAnnotation: () => assertVoidTypeAnnotation,
assertWhileStatement: () => assertWhileStatement,
assertWithStatement: () => assertWithStatement,
assertYieldExpression: () => assertYieldExpression,
assignmentExpression: () => assignmentExpression,
assignmentPattern: () => assignmentPattern,
awaitExpression: () => awaitExpression,
bigIntLiteral: () => bigIntLiteral,
binaryExpression: () => binaryExpression,
bindExpression: () => bindExpression,
blockStatement: () => blockStatement,
booleanLiteral: () => booleanLiteral,
booleanLiteralTypeAnnotation: () => booleanLiteralTypeAnnotation,
booleanTypeAnnotation: () => booleanTypeAnnotation,
breakStatement: () => breakStatement,
callExpression: () => callExpression,
catchClause: () => catchClause,
classAccessorProperty: () => classAccessorProperty,
classBody: () => classBody,
classDeclaration: () => classDeclaration,
classExpression: () => classExpression,
classMethod: () => classMethod,
classPrivateMethod: () => classPrivateMethod,
classPrivateProperty: () => classPrivateProperty,
classProperty: () => classProperty,
conditionalExpression: () => conditionalExpression,
continueStatement: () => continueStatement,
debuggerStatement: () => debuggerStatement,
decimalLiteral: () => decimalLiteral,
declareClass: () => declareClass,
declareExportAllDeclaration: () => declareExportAllDeclaration,
declareExportDeclaration: () => declareExportDeclaration,
declareFunction: () => declareFunction,
declareInterface: () => declareInterface,
declareModule: () => declareModule,
declareModuleExports: () => declareModuleExports,
declareOpaqueType: () => declareOpaqueType,
declareTypeAlias: () => declareTypeAlias,
declareVariable: () => declareVariable,
decorator: () => decorator,
directive: () => directive,
directiveLiteral: () => directiveLiteral,
doExpression: () => doExpression,
doWhileStatement: () => doWhileStatement,
emptyStatement: () => emptyStatement,
emptyTypeAnnotation: () => emptyTypeAnnotation,
enumBooleanBody: () => enumBooleanBody,
enumBooleanMember: () => enumBooleanMember,
enumDeclaration: () => enumDeclaration,
enumDefaultedMember: () => enumDefaultedMember,
enumNumberBody: () => enumNumberBody,
enumNumberMember: () => enumNumberMember,
enumStringBody: () => enumStringBody,
enumStringMember: () => enumStringMember,
enumSymbolBody: () => enumSymbolBody,
existsTypeAnnotation: () => existsTypeAnnotation,
exportAllDeclaration: () => exportAllDeclaration,
exportDefaultSpecifier: () => exportDefaultSpecifier,
exportNamedDeclaration: () => exportNamedDeclaration,
exportNamespaceSpecifier: () => exportNamespaceSpecifier,
exportSpecifier: () => exportSpecifier,
expressionStatement: () => expressionStatement,
forInStatement: () => forInStatement,
forOfStatement: () => forOfStatement,
forStatement: () => forStatement,
functionDeclaration: () => functionDeclaration,
functionExpression: () => functionExpression,
functionTypeAnnotation: () => functionTypeAnnotation,
functionTypeParam: () => functionTypeParam,
genericTypeAnnotation: () => genericTypeAnnotation,
identifier: () => identifier,
ifStatement: () => ifStatement,
importDeclaration: () => importDeclaration,
importDefaultSpecifier: () => importDefaultSpecifier,
importExpression: () => importExpression,
importNamespaceSpecifier: () => importNamespaceSpecifier,
importSpecifier: () => importSpecifier,
indexedAccessType: () => indexedAccessType,
interfaceDeclaration: () => interfaceDeclaration,
interfaceExtends: () => interfaceExtends,
interfaceTypeAnnotation: () => interfaceTypeAnnotation,
intersectionTypeAnnotation: () => intersectionTypeAnnotation,
isAnyTypeAnnotation: () => isAnyTypeAnnotation,
isArgumentPlaceholder: () => isArgumentPlaceholder,
isArrayExpression: () => isArrayExpression,
isArrayPattern: () => isArrayPattern,
isArrayTypeAnnotation: () => isArrayTypeAnnotation,
isArrowFunctionExpression: () => isArrowFunctionExpression,
isAssignmentExpression: () => isAssignmentExpression,
isAssignmentPattern: () => isAssignmentPattern,
isAwaitExpression: () => isAwaitExpression,
isBigIntLiteral: () => isBigIntLiteral,
isBinaryExpression: () => isBinaryExpression,
isBindExpression: () => isBindExpression,
isBlockStatement: () => isBlockStatement,
isBooleanLiteral: () => isBooleanLiteral,
isBooleanLiteralTypeAnnotation: () => isBooleanLiteralTypeAnnotation,
isBooleanTypeAnnotation: () => isBooleanTypeAnnotation,
isBreakStatement: () => isBreakStatement,
isCallExpression: () => isCallExpression,
isCatchClause: () => isCatchClause,
isClassAccessorProperty: () => isClassAccessorProperty,
isClassBody: () => isClassBody,
isClassDeclaration: () => isClassDeclaration,
isClassExpression: () => isClassExpression,
isClassMethod: () => isClassMethod,
isClassPrivateMethod: () => isClassPrivateMethod,
isClassPrivateProperty: () => isClassPrivateProperty,
isClassProperty: () => isClassProperty,
isConditionalExpression: () => isConditionalExpression,
isContinueStatement: () => isContinueStatement,
isDebuggerStatement: () => isDebuggerStatement,
isDecimalLiteral: () => isDecimalLiteral,
isDeclareClass: () => isDeclareClass,
isDeclareExportAllDeclaration: () => isDeclareExportAllDeclaration,
isDeclareExportDeclaration: () => isDeclareExportDeclaration,
isDeclareFunction: () => isDeclareFunction,
isDeclareInterface: () => isDeclareInterface,
isDeclareModule: () => isDeclareModule,
isDeclareModuleExports: () => isDeclareModuleExports,
isDeclareOpaqueType: () => isDeclareOpaqueType,
isDeclareTypeAlias: () => isDeclareTypeAlias,
isDeclareVariable: () => isDeclareVariable,
isDecorator: () => isDecorator,
isDirective: () => isDirective,
isDirectiveLiteral: () => isDirectiveLiteral,
isDoExpression: () => isDoExpression,
isDoWhileStatement: () => isDoWhileStatement,
isEmptyStatement: () => isEmptyStatement,
isEmptyTypeAnnotation: () => isEmptyTypeAnnotation,
isEnumBooleanBody: () => isEnumBooleanBody,
isEnumBooleanMember: () => isEnumBooleanMember,
isEnumDeclaration: () => isEnumDeclaration,
isEnumDefaultedMember: () => isEnumDefaultedMember,
isEnumNumberBody: () => isEnumNumberBody,
isEnumNumberMember: () => isEnumNumberMember,
isEnumStringBody: () => isEnumStringBody,
isEnumStringMember: () => isEnumStringMember,
isEnumSymbolBody: () => isEnumSymbolBody,
isExistsTypeAnnotation: () => isExistsTypeAnnotation,
isExportAllDeclaration: () => isExportAllDeclaration,
isExportDefaultSpecifier: () => isExportDefaultSpecifier,
isExportNamedDeclaration: () => isExportNamedDeclaration,
isExportNamespaceSpecifier: () => isExportNamespaceSpecifier,
isExportSpecifier: () => isExportSpecifier,
isExpressionStatement: () => isExpressionStatement,
isForInStatement: () => isForInStatement,
isForOfStatement: () => isForOfStatement,
isForStatement: () => isForStatement,
isFunctionDeclaration: () => isFunctionDeclaration,
isFunctionExpression: () => isFunctionExpression,
isFunctionTypeAnnotation: () => isFunctionTypeAnnotation,
isFunctionTypeParam: () => isFunctionTypeParam,
isGenericTypeAnnotation: () => isGenericTypeAnnotation,
isIdentifier: () => isIdentifier,
isIfStatement: () => isIfStatement,
isImport: () => isImport,
isImportDeclaration: () => isImportDeclaration,
isImportDefaultSpecifier: () => isImportDefaultSpecifier,
isImportExpression: () => isImportExpression,
isImportNamespaceSpecifier: () => isImportNamespaceSpecifier,
isImportSpecifier: () => isImportSpecifier,
isIndexedAccessType: () => isIndexedAccessType,
isInterfaceDeclaration: () => isInterfaceDeclaration,
isInterfaceExtends: () => isInterfaceExtends,
isInterfaceTypeAnnotation: () => isInterfaceTypeAnnotation,
isIntersectionTypeAnnotation: () => isIntersectionTypeAnnotation,
isJSXAttribute: () => isJSXAttribute,
isJSXClosingElement: () => isJSXClosingElement,
isJSXClosingFragment: () => isJSXClosingFragment,
isJSXElement: () => isJSXElement,
isJSXEmptyExpression: () => isJSXEmptyExpression,
isJSXExpressionContainer: () => isJSXExpressionContainer,
isJSXFragment: () => isJSXFragment,
isJSXIdentifier: () => isJSXIdentifier,
isJSXMemberExpression: () => isJSXMemberExpression,
isJSXNamespacedName: () => isJSXNamespacedName,
isJSXOpeningElement: () => isJSXOpeningElement,
isJSXOpeningFragment: () => isJSXOpeningFragment,
isJSXSpreadAttribute: () => isJSXSpreadAttribute,
isJSXSpreadChild: () => isJSXSpreadChild,
isJSXText: () => isJSXText,
isLabeledStatement: () => isLabeledStatement,
isLogicalExpression: () => isLogicalExpression,
isMemberExpression: () => isMemberExpression,
isMetaProperty: () => isMetaProperty,
isMixedTypeAnnotation: () => isMixedTypeAnnotation,
isModuleExpression: () => isModuleExpression,
isNewExpression: () => isNewExpression,
isNullLiteral: () => isNullLiteral,
isNullLiteralTypeAnnotation: () => isNullLiteralTypeAnnotation,
isNullableTypeAnnotation: () => isNullableTypeAnnotation,
isNumberLiteralTypeAnnotation: () => isNumberLiteralTypeAnnotation,
isNumberTypeAnnotation: () => isNumberTypeAnnotation,
isNumericLiteral: () => isNumericLiteral,
isObjectExpression: () => isObjectExpression,
isObjectMethod: () => isObjectMethod,
isObjectPattern: () => isObjectPattern,
isObjectProperty: () => isObjectProperty,
isObjectTypeAnnotation: () => isObjectTypeAnnotation,
isObjectTypeCallProperty: () => isObjectTypeCallProperty,
isObjectTypeIndexer: () => isObjectTypeIndexer,
isObjectTypeInternalSlot: () => isObjectTypeInternalSlot,
isObjectTypeProperty: () => isObjectTypeProperty,
isObjectTypeSpreadProperty: () => isObjectTypeSpreadProperty,
isOpaqueType: () => isOpaqueType,
isOptionalCallExpression: () => isOptionalCallExpression,
isOptionalIndexedAccessType: () => isOptionalIndexedAccessType,
isOptionalMemberExpression: () => isOptionalMemberExpression,
isParenthesizedExpression: () => isParenthesizedExpression,
isPipelineBareFunction: () => isPipelineBareFunction,
isPipelinePrimaryTopicReference: () => isPipelinePrimaryTopicReference,
isPipelineTopicExpression: () => isPipelineTopicExpression,
isPrivateName: () => isPrivateName,
isQualifiedTypeIdentifier: () => isQualifiedTypeIdentifier,
isRecordExpression: () => isRecordExpression,
isRegExpLiteral: () => isRegExpLiteral,
isRestElement: () => isRestElement,
isReturnStatement: () => isReturnStatement,
isSequenceExpression: () => isSequenceExpression,
isSpreadElement: () => isSpreadElement,
isStaticBlock: () => isStaticBlock,
isStringLiteral: () => isStringLiteral,
isStringLiteralTypeAnnotation: () => isStringLiteralTypeAnnotation,
isStringTypeAnnotation: () => isStringTypeAnnotation,
isSuper: () => isSuper,
isSwitchCase: () => isSwitchCase,
isSwitchStatement: () => isSwitchStatement,
isSymbolTypeAnnotation: () => isSymbolTypeAnnotation,
isTSAnyKeyword: () => isTSAnyKeyword,
isTSArrayType: () => isTSArrayType,
isTSAsExpression: () => isTSAsExpression,
isTSBigIntKeyword: () => isTSBigIntKeyword,
isTSBooleanKeyword: () => isTSBooleanKeyword,
isTSCallSignatureDeclaration: () => isTSCallSignatureDeclaration,
isTSConditionalType: () => isTSConditionalType,
isTSConstructSignatureDeclaration: () => isTSConstructSignatureDeclaration,
isTSConstructorType: () => isTSConstructorType,
isTSDeclareFunction: () => isTSDeclareFunction,
isTSDeclareMethod: () => isTSDeclareMethod,
isTSEnumDeclaration: () => isTSEnumDeclaration,
isTSExportAssignment: () => isTSExportAssignment,
isTSExpressionWithTypeArguments: () => isTSExpressionWithTypeArguments,
isTSFunctionType: () => isTSFunctionType,
isTSImportEqualsDeclaration: () => isTSImportEqualsDeclaration,
isTSImportType: () => isTSImportType,
isTSIndexSignature: () => isTSIndexSignature,
isTSIndexedAccessType: () => isTSIndexedAccessType,
isTSInferType: () => isTSInferType,
isTSInstantiationExpression: () => isTSInstantiationExpression,
isTSInterfaceDeclaration: () => isTSInterfaceDeclaration,
isTSIntersectionType: () => isTSIntersectionType,
isTSIntrinsicKeyword: () => isTSIntrinsicKeyword,
isTSLiteralType: () => isTSLiteralType,
isTSMappedType: () => isTSMappedType,
isTSMethodSignature: () => isTSMethodSignature,
isTSModuleBlock: () => isTSModuleBlock,
isTSModuleDeclaration: () => isTSModuleDeclaration,
isTSNamedTupleMember: () => isTSNamedTupleMember,
isTSNamespaceExportDeclaration: () => isTSNamespaceExportDeclaration,
isTSNeverKeyword: () => isTSNeverKeyword,
isTSNonNullExpression: () => isTSNonNullExpression,
isTSNullKeyword: () => isTSNullKeyword,
isTSNumberKeyword: () => isTSNumberKeyword,
isTSObjectKeyword: () => isTSObjectKeyword,
isTSOptionalType: () => isTSOptionalType,
isTSParameterProperty: () => isTSParameterProperty,
isTSParenthesizedType: () => isTSParenthesizedType,
isTSPropertySignature: () => isTSPropertySignature,
isTSQualifiedName: () => isTSQualifiedName,
isTSRestType: () => isTSRestType,
isTSSatisfiesExpression: () => isTSSatisfiesExpression,
isTSStringKeyword: () => isTSStringKeyword,
isTSSymbolKeyword: () => isTSSymbolKeyword,
isTSThisType: () => isTSThisType,
isTSTupleType: () => isTSTupleType,
isTSTypeAliasDeclaration: () => isTSTypeAliasDeclaration,
isTSTypeAnnotation: () => isTSTypeAnnotation,
isTSTypeAssertion: () => isTSTypeAssertion,
isTSTypeLiteral: () => isTSTypeLiteral,
isTSTypeOperator: () => isTSTypeOperator,
isTSTypeParameter: () => isTSTypeParameter,
isTSTypeParameterDeclaration: () => isTSTypeParameterDeclaration,
isTSTypeParameterInstantiation: () => isTSTypeParameterInstantiation,
isTSTypePredicate: () => isTSTypePredicate,
isTSTypeQuery: () => isTSTypeQuery,
isTSTypeReference: () => isTSTypeReference,
isTSUndefinedKeyword: () => isTSUndefinedKeyword,
isTSUnionType: () => isTSUnionType,
isTSUnknownKeyword: () => isTSUnknownKeyword,
isTSVoidKeyword: () => isTSVoidKeyword,
isTaggedTemplateExpression: () => isTaggedTemplateExpression,
isTemplateElement: () => isTemplateElement,
isTemplateLiteral: () => isTemplateLiteral,
isThisExpression: () => isThisExpression,
isThisTypeAnnotation: () => isThisTypeAnnotation,
isThrowStatement: () => isThrowStatement,
isTopicReference: () => isTopicReference,
isTryStatement: () => isTryStatement,
isTupleExpression: () => isTupleExpression,
isTupleTypeAnnotation: () => isTupleTypeAnnotation,
isTypeAlias: () => isTypeAlias,
isTypeAnnotation: () => isTypeAnnotation,
isTypeCastExpression: () => isTypeCastExpression,
isTypeofTypeAnnotation: () => isTypeofTypeAnnotation,
isUnaryExpression: () => isUnaryExpression,
isUnionTypeAnnotation: () => isUnionTypeAnnotation,
isUpdateExpression: () => isUpdateExpression,
isV8IntrinsicIdentifier: () => isV8IntrinsicIdentifier,
isVariableDeclaration: () => isVariableDeclaration,
isVariableDeclarator: () => isVariableDeclarator,
isVariance: () => isVariance,
isVoidTypeAnnotation: () => isVoidTypeAnnotation,
isWhileStatement: () => isWhileStatement,
isWithStatement: () => isWithStatement,
isYieldExpression: () => isYieldExpression,
jsxAttribute: () => jsxAttribute,
jsxClosingElement: () => jsxClosingElement,
jsxClosingFragment: () => jsxClosingFragment,
jsxElement: () => jsxElement,
jsxEmptyExpression: () => jsxEmptyExpression,
jsxExpressionContainer: () => jsxExpressionContainer,
jsxFragment: () => jsxFragment,
jsxIdentifier: () => jsxIdentifier,
jsxMemberExpression: () => jsxMemberExpression,
jsxNamespacedName: () => jsxNamespacedName,
jsxOpeningElement: () => jsxOpeningElement,
jsxOpeningFragment: () => jsxOpeningFragment,
jsxSpreadAttribute: () => jsxSpreadAttribute,
jsxSpreadChild: () => jsxSpreadChild,
jsxText: () => jsxText,
labeledStatement: () => labeledStatement,
logicalExpression: () => logicalExpression,
memberExpression: () => memberExpression,
metaProperty: () => metaProperty,
mixedTypeAnnotation: () => mixedTypeAnnotation,
moduleExpression: () => moduleExpression,
newExpression: () => newExpression,
nullLiteral: () => nullLiteral,
nullLiteralTypeAnnotation: () => nullLiteralTypeAnnotation,
nullableTypeAnnotation: () => nullableTypeAnnotation,
numberLiteralTypeAnnotation: () => numberLiteralTypeAnnotation,
numberTypeAnnotation: () => numberTypeAnnotation,
numericLiteral: () => numericLiteral,
objectExpression: () => objectExpression,
objectMethod: () => objectMethod,
objectPattern: () => objectPattern,
objectProperty: () => objectProperty,
objectTypeAnnotation: () => objectTypeAnnotation,
objectTypeCallProperty: () => objectTypeCallProperty,
objectTypeIndexer: () => objectTypeIndexer,
objectTypeInternalSlot: () => objectTypeInternalSlot,
objectTypeProperty: () => objectTypeProperty,
objectTypeSpreadProperty: () => objectTypeSpreadProperty,
opaqueType: () => opaqueType,
optionalCallExpression: () => optionalCallExpression,
optionalIndexedAccessType: () => optionalIndexedAccessType,
optionalMemberExpression: () => optionalMemberExpression,
parenthesizedExpression: () => parenthesizedExpression,
pipelineBareFunction: () => pipelineBareFunction,
pipelinePrimaryTopicReference: () => pipelinePrimaryTopicReference,
pipelineTopicExpression: () => pipelineTopicExpression,
privateName: () => privateName,
qualifiedTypeIdentifier: () => qualifiedTypeIdentifier,
recordExpression: () => recordExpression,
regExpLiteral: () => regExpLiteral,
restElement: () => restElement,
returnStatement: () => returnStatement,
sequenceExpression: () => sequenceExpression,
spreadElement: () => spreadElement,
staticBlock: () => staticBlock,
stringLiteral: () => stringLiteral,
stringLiteralTypeAnnotation: () => stringLiteralTypeAnnotation,
stringTypeAnnotation: () => stringTypeAnnotation,
switchCase: () => switchCase,
switchStatement: () => switchStatement,
symbolTypeAnnotation: () => symbolTypeAnnotation,
taggedTemplateExpression: () => taggedTemplateExpression,
templateElement: () => templateElement,
templateLiteral: () => templateLiteral,
thisExpression: () => thisExpression,
thisTypeAnnotation: () => thisTypeAnnotation,
throwStatement: () => throwStatement,
topicReference: () => topicReference,
tryStatement: () => tryStatement,
tsAnyKeyword: () => tsAnyKeyword,
tsArrayType: () => tsArrayType,
tsAsExpression: () => tsAsExpression,
tsBigIntKeyword: () => tsBigIntKeyword,
tsBooleanKeyword: () => tsBooleanKeyword,
tsCallSignatureDeclaration: () => tsCallSignatureDeclaration,
tsConditionalType: () => tsConditionalType,
tsConstructSignatureDeclaration: () => tsConstructSignatureDeclaration,
tsConstructorType: () => tsConstructorType,
tsDeclareFunction: () => tsDeclareFunction,
tsDeclareMethod: () => tsDeclareMethod,
tsEnumDeclaration: () => tsEnumDeclaration,
tsExportAssignment: () => tsExportAssignment,
tsExpressionWithTypeArguments: () => tsExpressionWithTypeArguments,
tsFunctionType: () => tsFunctionType,
tsImportEqualsDeclaration: () => tsImportEqualsDeclaration,
tsImportType: () => tsImportType,
tsIndexSignature: () => tsIndexSignature,
tsIndexedAccessType: () => tsIndexedAccessType,
tsInferType: () => tsInferType,
tsInstantiationExpression: () => tsInstantiationExpression,
tsInterfaceDeclaration: () => tsInterfaceDeclaration,
tsIntersectionType: () => tsIntersectionType,
tsIntrinsicKeyword: () => tsIntrinsicKeyword,
tsLiteralType: () => tsLiteralType,
tsMappedType: () => tsMappedType,
tsMethodSignature: () => tsMethodSignature,
tsModuleBlock: () => tsModuleBlock,
tsModuleDeclaration: () => tsModuleDeclaration,
tsNamedTupleMember: () => tsNamedTupleMember,
tsNamespaceExportDeclaration: () => tsNamespaceExportDeclaration,
tsNeverKeyword: () => tsNeverKeyword,
tsNonNullExpression: () => tsNonNullExpression,
tsNullKeyword: () => tsNullKeyword,
tsNumberKeyword: () => tsNumberKeyword,
tsObjectKeyword: () => tsObjectKeyword,
tsOptionalType: () => tsOptionalType,
tsParameterProperty: () => tsParameterProperty,
tsParenthesizedType: () => tsParenthesizedType,
tsPropertySignature: () => tsPropertySignature,
tsQualifiedName: () => tsQualifiedName,
tsRestType: () => tsRestType,
tsSatisfiesExpression: () => tsSatisfiesExpression,
tsStringKeyword: () => tsStringKeyword,
tsSymbolKeyword: () => tsSymbolKeyword,
tsThisType: () => tsThisType,
tsTupleType: () => tsTupleType,
tsTypeAliasDeclaration: () => tsTypeAliasDeclaration,
tsTypeAnnotation: () => tsTypeAnnotation,
tsTypeAssertion: () => tsTypeAssertion,
tsTypeLiteral: () => tsTypeLiteral,
tsTypeOperator: () => tsTypeOperator,
tsTypeParameter: () => tsTypeParameter,
tsTypeParameterDeclaration: () => tsTypeParameterDeclaration,
tsTypeParameterInstantiation: () => tsTypeParameterInstantiation,
tsTypePredicate: () => tsTypePredicate,
tsTypeQuery: () => tsTypeQuery,
tsTypeReference: () => tsTypeReference,
tsUndefinedKeyword: () => tsUndefinedKeyword,
tsUnionType: () => tsUnionType,
tsUnknownKeyword: () => tsUnknownKeyword,
tsVoidKeyword: () => tsVoidKeyword,
tupleExpression: () => tupleExpression,
tupleTypeAnnotation: () => tupleTypeAnnotation,
typeAlias: () => typeAlias,
typeAnnotation: () => typeAnnotation,
typeCastExpression: () => typeCastExpression,
typeofTypeAnnotation: () => typeofTypeAnnotation,
unaryExpression: () => unaryExpression,
unionTypeAnnotation: () => unionTypeAnnotation,
updateExpression: () => updateExpression,
v8IntrinsicIdentifier: () => v8IntrinsicIdentifier,
variableDeclaration: () => variableDeclaration,
variableDeclarator: () => variableDeclarator,
variance: () => variance,
voidTypeAnnotation: () => voidTypeAnnotation,
whileStatement: () => whileStatement,
withStatement: () => withStatement,
yieldExpression: () => yieldExpression
});
module.exports = __toCommonJS(src_exports);
// src/comment.ts
function addComments(node, type, comments) {
const key = `${type}Comments`;
if (node[key]) {
if (type === "leading") {
node[key] = comments.concat(node[key]);
} else {
node[key].push.apply(node[key], comments);
}
} else {
node[key] = comments;
}
return node;
}
function addComment(node, type, comment) {
return addComments(node, type, [comment]);
}
// src/is-node-type.ts
function is(type, node) {
return node != null && node.type === type;
}
// src/assert-node-type.ts
function assert(type, node) {
if (is(type, node)) {
throw new Error(
'Expected type "' + type + '" but instead got "' + node.type + '".'
);
}
}
// src/nodes/flow/expressions/typecast-expression.ts
var TYPE = "TypeCastExpression";
function typeCastExpression(expression, typeAnnotation2) {
return {
type: TYPE,
expression,
typeAnnotation: typeAnnotation2
};
}
function isTypeCastExpression(node) {
return is(TYPE, node);
}
function assertTypeCastExpression(node) {
assert(TYPE, node);
}
// src/nodes/flow/misc/any-type-annotation.ts
var TYPE2 = "AnyTypeAnnotation";
function anyTypeAnnotation() {
return {
type: TYPE2
};
}
function isAnyTypeAnnotation(node) {
return is(TYPE2, node);
}
function assertAnyTypeAnnotation(node) {
assert(TYPE2, node);
}
// src/nodes/flow/misc/array-type-annotation.ts
var TYPE3 = "ArrayTypeAnnotation";
function arrayTypeAnnotation(elementType) {
return {
type: TYPE3,
elementType
};
}
function isArrayTypeAnnotation(node) {
return is(TYPE3, node);
}
function assertArrayTypeAnnotation(node) {
assert(TYPE3, node);
}
// src/nodes/flow/misc/boolean-literal-type-annotation.ts
var TYPE4 = "BooleanLiteralTypeAnnotation";
function booleanLiteralTypeAnnotation(value) {
return {
type: TYPE4,
value
};
}
function isBooleanLiteralTypeAnnotation(node) {
return is(TYPE4, node);
}
function assertBooleanLiteralTypeAnnotation(node) {
assert(TYPE4, node);
}
// src/nodes/flow/misc/boolean-type-annotation.ts
var TYPE5 = "BooleanTypeAnnotation";
function booleanTypeAnnotation() {
return {
type: TYPE5
};
}
function isBooleanTypeAnnotation(node) {
return is(TYPE5, node);
}
function assertBooleanTypeAnnotation(node) {
assert(TYPE5, node);
}
// src/nodes/flow/misc/empty-type-annotation.ts
var TYPE6 = "EmptyTypeAnnotation";
function emptyTypeAnnotation() {
return {
type: TYPE6
};
}
function isEmptyTypeAnnotation(node) {
return is(TYPE6, node);
}
function assertEmptyTypeAnnotation(node) {
assert(TYPE6, node);
}
// src/nodes/flow/misc/enum-boolean-body.ts
var TYPE7 = "EnumBooleanBody";
function enumBooleanBody(members) {
return {
type: TYPE7,
members,
explicitType: false,
hasUnknownMembers: false
};
}
function isEnumBooleanBody(node) {
return is(TYPE7, node);
}
function assertEnumBooleanBody(node) {
assert(TYPE7, node);
}
// src/nodes/flow/misc/enum-boolean-member.ts
var TYPE8 = "EnumBooleanMember";
function enumBooleanMember(id) {
return {
type: TYPE8,
id,
init: null
};
}
function isEnumBooleanMember(node) {
return is(TYPE8, node);
}
function assertEnumBooleanMember(node) {
assert(TYPE8, node);
}
// src/nodes/flow/misc/enum-defaulted-member.ts
var TYPE9 = "EnumDefaultedMember";
function enumDefaultedMember(id) {
return {
type: TYPE9,
id
};
}
function isEnumDefaultedMember(node) {
return is(TYPE9, node);
}
function assertEnumDefaultedMember(node) {
assert(TYPE9, node);
}
// src/nodes/flow/misc/enum-number-body.ts
var TYPE10 = "EnumNumberBody";
function enumNumberBody(members) {
return {
type: TYPE10,
members,
explicitType: false,
hasUnknownMembers: false
};
}
function isEnumNumberBody(node) {
return is(TYPE10, node);
}
function assertEnumNumberBody(node) {
assert(TYPE10, node);
}
// src/nodes/flow/misc/enum-number-member.ts
var TYPE11 = "EnumNumberMember";
function enumNumberMember(id, init) {
return {
type: TYPE11,
id,
init
};
}
function isEnumNumberMember(node) {
return is(TYPE11, node);
}
function assertEnumNumberMember(node) {
assert(TYPE11, node);
}
// src/nodes/flow/misc/enum-string-body.ts
var TYPE12 = "EnumStringBody";
function enumStringBody(members) {
return {
type: TYPE12,
members,
explicitType: false,
hasUnknownMembers: false
};
}
function isEnumStringBody(node) {
return is(TYPE12, node);
}
function assertEnumStringBody(node) {
assert(TYPE12, node);
}
// src/nodes/flow/misc/enum-string-member.ts
var TYPE13 = "EnumStringMember";
function enumStringMember(id, init) {
return {
type: TYPE13,
id,
init
};
}
function isEnumStringMember(node) {
return is(TYPE13, node);
}
function assertEnumStringMember(node) {
assert(TYPE13, node);
}
// src/nodes/flow/misc/enum-symbol-body.ts
var TYPE14 = "EnumSymbolBody";
function enumSymbolBody(members) {
return {
type: TYPE14,
members,
hasUnknownMembers: false
};
}
function isEnumSymbolBody(node) {
return is(TYPE14, node);
}
function assertEnumSymbolBody(node) {
assert(TYPE14, node);
}
// src/nodes/flow/misc/exists-type-annotation.ts
var TYPE15 = "ExistsTypeAnnotation";
function existsTypeAnnotation() {
return {
type: TYPE15
};
}
function isExistsTypeAnnotation(node) {
return is(TYPE15, node);
}
function assertExistsTypeAnnotation(node) {
assert(TYPE15, node);
}
// src/nodes/flow/misc/function-type-annotation.ts
var TYPE16 = "FunctionTypeAnnotation";
function functionTypeAnnotation(typeParameters, params, rest, returnType) {
return {
type: TYPE16,
typeParameters,
params,
rest,
returnType
};
}
function isFunctionTypeAnnotation(node) {
return is(TYPE16, node);
}
function assertFunctionTypeAnnotation(node) {
assert(TYPE16, node);
}
// src/nodes/flow/misc/function-type-param.ts
var TYPE17 = "FunctionTypeParam";
function functionTypeParam(name, typeAnnotation2) {
return {
type: TYPE17,
name,
typeAnnotation: typeAnnotation2
};
}
function isFunctionTypeParam(node) {
return is(TYPE17, node);
}
function assertFunctionTypeParam(node) {
assert(TYPE17, node);
}
// src/nodes/flow/misc/generic-type-annotation.ts
var TYPE18 = "GenericTypeAnnotation";
function genericTypeAnnotation(id, typeParameters = null) {
return {
type: TYPE18,
id,
typeParameters
};
}
function isGenericTypeAnnotation(node) {
return is(TYPE18, node);
}
function assertGenericTypeAnnotation(node) {
assert(TYPE18, node);
}
// src/nodes/flow/misc/indexed-access-type.ts
var TYPE19 = "IndexedAccessType";
function indexedAccessType(objectType, indexType) {
return {
type: TYPE19,
objectType,
indexType
};
}
function isIndexedAccessType(node) {
return is(TYPE19, node);
}
function assertIndexedAccessType(node) {
assert(TYPE19, node);
}
// src/nodes/flow/misc/interface-extends.ts
var TYPE20 = "InterfaceExtends";
function interfaceExtends(id, typeParameters = null) {
return {
type: TYPE20,
id,
typeParameters
};
}
function isInterfaceExtends(node) {
return is(TYPE20, node);
}
function assertInterfaceExtends(node) {
assert(TYPE20, node);
}
// src/nodes/flow/misc/interface-type-annotation.ts
var TYPE21 = "InterfaceTypeAnnotation";
function interfaceTypeAnnotation(interfaceExtends2, body) {
return {
type: TYPE21,
extends: interfaceExtends2,
body
};
}
function isInterfaceTypeAnnotation(node) {
return is(TYPE21, node);
}
function assertInterfaceTypeAnnotation(node) {
assert(TYPE21, node);
}
// src/nodes/flow/misc/intersection-type-annotation.ts
var TYPE22 = "IntersectionTypeAnnotation";
function intersectionTypeAnnotation(types) {
return {
type: TYPE22,
types
};
}
function isIntersectionTypeAnnotation(node) {
return is(TYPE22, node);
}
function assertIntersectionTypeAnnotation(node) {
assert(TYPE22, node);
}
// src/nodes/flow/misc/mixed-type-annotation.ts
var TYPE23 = "MixedTypeAnnotation";
function mixedTypeAnnotation() {
return {
type: TYPE23
};
}
function isMixedTypeAnnotation(node) {
return is(TYPE23, node);
}
function assertMixedTypeAnnotation(node) {
assert(TYPE23, node);
}
// src/nodes/flow/misc/null-literal-type-annotation.ts
var TYPE24 = "NullLiteralTypeAnnotation";
function nullLiteralTypeAnnotation() {
return {
type: TYPE24
};
}
function isNullLiteralTypeAnnotation(node) {
return is(TYPE24, node);
}
function assertNullLiteralTypeAnnotation(node) {
assert(TYPE24, node);
}
// src/nodes/flow/misc/nullable-type-annotation.ts
var TYPE25 = "NullableTypeAnnotation";
function nullableTypeAnnotation(typeAnnotation2) {
return {
type: TYPE25,
typeAnnotation: typeAnnotation2
};
}
function isNullableTypeAnnotation(node) {
return is(TYPE25, node);
}
function assertNullableTypeAnnotation(node) {
assert(TYPE25, node);
}
// src/nodes/flow/misc/number-literal-type-annotation.ts
var TYPE26 = "NumberLiteralTypeAnnotation";
function numberLiteralTypeAnnotation(value) {
return {
type: TYPE26,
value
};
}
function isNumberLiteralTypeAnnotation(node) {
return is(TYPE26, node);
}
function assertNumberLiteralTypeAnnotation(node) {
assert(TYPE26, node);
}
// src/nodes/flow/misc/number-type-annotation.ts
var TYPE27 = "NumberTypeAnnotation";
function numberTypeAnnotation() {
return {
type: TYPE27
};
}
function isNumberTypeAnnotation(node) {
return is(TYPE27, node);
}
function assertNumberTypeAnnotation(node) {
assert(TYPE27, node);
}
// src/nodes/flow/misc/object-type-annotation.ts
var TYPE28 = "ObjectTypeAnnotation";
function objectTypeAnnotation(properties, indexers = [], callProperties = [], internalSlots = [], exact = false) {
return {
type: TYPE28,
properties,
indexers,
callProperties,
internalSlots,
exact
};
}
function isObjectTypeAnnotation(node) {
return is(TYPE28, node);
}
function assertObjectTypeAnnotation(node) {
assert(TYPE28, node);
}
// src/nodes/flow/misc/object-type-call-property.ts
var TYPE29 = "ObjectTypeCallProperty";
function objectTypeCallProperty(value) {
return {
type: TYPE29,
value,
static: false
};
}
function isObjectTypeCallProperty(node) {
return is(TYPE29, node);
}
function assertObjectTypeCallProperty(node) {
assert(TYPE29, node);
}
// src/nodes/flow/misc/object-type-indexer.ts
var TYPE30 = "ObjectTypeIndexer";
function objectTypeIndexer(id, key, value, variance2 = null) {
return {
type: TYPE30,
id,
key,
value,
variance: variance2,
static: false
};
}
function isObjectTypeIndexer(node) {
return is(TYPE30, node);
}
function assertObjectTypeIndexer(node) {
assert(TYPE30, node);
}
// src/nodes/flow/misc/object-type-internal-slot.ts
var TYPE31 = "ObjectTypeInternalSlot";
function objectTypeInternalSlot(id, value, optional, isStatic, method) {
return {
type: TYPE31,
id,
value,
optional,
static: isStatic,
method
};
}
function isObjectTypeInternalSlot(node) {
return is(TYPE31, node);
}
function assertObjectTypeInternalSlot(node) {
assert(TYPE31, node);
}
// src/nodes/flow/misc/object-type-property.ts
var TYPE32 = "ObjectTypeProperty";
function objectTypeProperty(key, value, variance2 = null) {
return {
type: TYPE32,
key,
value,
variance: variance2,
kind: "init",
method: false,
optional: false,
proto: false,
static: false
};
}
function isObjectTypeProperty(node) {
return is(TYPE32, node);
}
function assertObjectTypeProperty(node) {
assert(TYPE32, node);
}
// src/nodes/flow/misc/object-type-spread-property.ts
var TYPE33 = "ObjectTypeSpreadProperty";
function objectTypeSpreadProperty(argument) {
return {
type: TYPE33,
argument
};
}
function isObjectTypeSpreadProperty(node) {
return is(TYPE33, node);
}
function assertObjectTypeSpreadProperty(node) {
assert(TYPE33, node);
}
// src/nodes/flow/misc/optional-indexed-access-type.ts
var TYPE34 = "OptionalIndexedAccessType";
function optionalIndexedAccessType(objectType, indexType) {
return {
type: TYPE34,
objectType,
indexType,
optional: false
};
}
function isOptionalIndexedAccessType(node) {
return is(TYPE34, node);
}
function assertOptionalIndexedAccessType(node) {
assert(TYPE34, node);
}
// src/nodes/flow/misc/qualified-type-identifier.ts
var TYPE35 = "QualifiedTypeIdentifier";
function qualifiedTypeIdentifier(id, qualification) {
return {
type: TYPE35,
id,
qualification
};
}
function isQualifiedTypeIdentifier(node) {
return is(TYPE35, node);
}
function assertQualifiedTypeIdentifier(node) {
assert(TYPE35, node);
}
// src/nodes/flow/misc/string-literal-type-annotation.ts
var TYPE36 = "StringLiteralTypeAnnotation";
function stringLiteralTypeAnnotation(value) {
return {
type: TYPE36,
value
};
}
function isStringLiteralTypeAnnotation(node) {
return is(TYPE36, node);
}
function assertStringLiteralTypeAnnotation(node) {
assert(TYPE36, node);
}
// src/nodes/flow/misc/string-type-annotation.ts
var TYPE37 = "StringTypeAnnotation";
function stringTypeAnnotation() {
return {
type: TYPE37
};
}
function isStringTypeAnnotation(node) {
return is(TYPE37, node);
}
function assertStringTypeAnnotation(node) {
assert(TYPE37, node);
}
// src/nodes/flow/misc/symbol-type-annotation.ts
var TYPE38 = "SymbolTypeA