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