123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886 |
- "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.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 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 bigIntLiteral(value) {
- const node = {
- type: "BigIntLiteral",
- value
- };
- const defs = NODE_FIELDS.BigIntLiteral;
- validate(defs.value, node, "value", value);
- return node;
- }
- 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 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) {
- const node = {
- type: "TSTypeOperator",
- typeAnnotation,
- operator: null
- };
- const defs = NODE_FIELDS.TSTypeOperator;
- validate(defs.typeAnnotation, node, "typeAnnotation", typeAnnotation, 1);
- 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
|