source: trip-planner-front/node_modules/@babel/types/lib/validators/generated/index.js@ 6a80231

Last change on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 115.3 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.isArrayExpression = isArrayExpression;
7exports.isAssignmentExpression = isAssignmentExpression;
8exports.isBinaryExpression = isBinaryExpression;
9exports.isInterpreterDirective = isInterpreterDirective;
10exports.isDirective = isDirective;
11exports.isDirectiveLiteral = isDirectiveLiteral;
12exports.isBlockStatement = isBlockStatement;
13exports.isBreakStatement = isBreakStatement;
14exports.isCallExpression = isCallExpression;
15exports.isCatchClause = isCatchClause;
16exports.isConditionalExpression = isConditionalExpression;
17exports.isContinueStatement = isContinueStatement;
18exports.isDebuggerStatement = isDebuggerStatement;
19exports.isDoWhileStatement = isDoWhileStatement;
20exports.isEmptyStatement = isEmptyStatement;
21exports.isExpressionStatement = isExpressionStatement;
22exports.isFile = isFile;
23exports.isForInStatement = isForInStatement;
24exports.isForStatement = isForStatement;
25exports.isFunctionDeclaration = isFunctionDeclaration;
26exports.isFunctionExpression = isFunctionExpression;
27exports.isIdentifier = isIdentifier;
28exports.isIfStatement = isIfStatement;
29exports.isLabeledStatement = isLabeledStatement;
30exports.isStringLiteral = isStringLiteral;
31exports.isNumericLiteral = isNumericLiteral;
32exports.isNullLiteral = isNullLiteral;
33exports.isBooleanLiteral = isBooleanLiteral;
34exports.isRegExpLiteral = isRegExpLiteral;
35exports.isLogicalExpression = isLogicalExpression;
36exports.isMemberExpression = isMemberExpression;
37exports.isNewExpression = isNewExpression;
38exports.isProgram = isProgram;
39exports.isObjectExpression = isObjectExpression;
40exports.isObjectMethod = isObjectMethod;
41exports.isObjectProperty = isObjectProperty;
42exports.isRestElement = isRestElement;
43exports.isReturnStatement = isReturnStatement;
44exports.isSequenceExpression = isSequenceExpression;
45exports.isParenthesizedExpression = isParenthesizedExpression;
46exports.isSwitchCase = isSwitchCase;
47exports.isSwitchStatement = isSwitchStatement;
48exports.isThisExpression = isThisExpression;
49exports.isThrowStatement = isThrowStatement;
50exports.isTryStatement = isTryStatement;
51exports.isUnaryExpression = isUnaryExpression;
52exports.isUpdateExpression = isUpdateExpression;
53exports.isVariableDeclaration = isVariableDeclaration;
54exports.isVariableDeclarator = isVariableDeclarator;
55exports.isWhileStatement = isWhileStatement;
56exports.isWithStatement = isWithStatement;
57exports.isAssignmentPattern = isAssignmentPattern;
58exports.isArrayPattern = isArrayPattern;
59exports.isArrowFunctionExpression = isArrowFunctionExpression;
60exports.isClassBody = isClassBody;
61exports.isClassExpression = isClassExpression;
62exports.isClassDeclaration = isClassDeclaration;
63exports.isExportAllDeclaration = isExportAllDeclaration;
64exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
65exports.isExportNamedDeclaration = isExportNamedDeclaration;
66exports.isExportSpecifier = isExportSpecifier;
67exports.isForOfStatement = isForOfStatement;
68exports.isImportDeclaration = isImportDeclaration;
69exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
70exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
71exports.isImportSpecifier = isImportSpecifier;
72exports.isMetaProperty = isMetaProperty;
73exports.isClassMethod = isClassMethod;
74exports.isObjectPattern = isObjectPattern;
75exports.isSpreadElement = isSpreadElement;
76exports.isSuper = isSuper;
77exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
78exports.isTemplateElement = isTemplateElement;
79exports.isTemplateLiteral = isTemplateLiteral;
80exports.isYieldExpression = isYieldExpression;
81exports.isAwaitExpression = isAwaitExpression;
82exports.isImport = isImport;
83exports.isBigIntLiteral = isBigIntLiteral;
84exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
85exports.isOptionalMemberExpression = isOptionalMemberExpression;
86exports.isOptionalCallExpression = isOptionalCallExpression;
87exports.isClassProperty = isClassProperty;
88exports.isClassPrivateProperty = isClassPrivateProperty;
89exports.isClassPrivateMethod = isClassPrivateMethod;
90exports.isPrivateName = isPrivateName;
91exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
92exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
93exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
94exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
95exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
96exports.isClassImplements = isClassImplements;
97exports.isDeclareClass = isDeclareClass;
98exports.isDeclareFunction = isDeclareFunction;
99exports.isDeclareInterface = isDeclareInterface;
100exports.isDeclareModule = isDeclareModule;
101exports.isDeclareModuleExports = isDeclareModuleExports;
102exports.isDeclareTypeAlias = isDeclareTypeAlias;
103exports.isDeclareOpaqueType = isDeclareOpaqueType;
104exports.isDeclareVariable = isDeclareVariable;
105exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
106exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
107exports.isDeclaredPredicate = isDeclaredPredicate;
108exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
109exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
110exports.isFunctionTypeParam = isFunctionTypeParam;
111exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
112exports.isInferredPredicate = isInferredPredicate;
113exports.isInterfaceExtends = isInterfaceExtends;
114exports.isInterfaceDeclaration = isInterfaceDeclaration;
115exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
116exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
117exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
118exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
119exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
120exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
121exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
122exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
123exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
124exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
125exports.isObjectTypeIndexer = isObjectTypeIndexer;
126exports.isObjectTypeProperty = isObjectTypeProperty;
127exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
128exports.isOpaqueType = isOpaqueType;
129exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
130exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
131exports.isStringTypeAnnotation = isStringTypeAnnotation;
132exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
133exports.isThisTypeAnnotation = isThisTypeAnnotation;
134exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
135exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
136exports.isTypeAlias = isTypeAlias;
137exports.isTypeAnnotation = isTypeAnnotation;
138exports.isTypeCastExpression = isTypeCastExpression;
139exports.isTypeParameter = isTypeParameter;
140exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
141exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
142exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
143exports.isVariance = isVariance;
144exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
145exports.isEnumDeclaration = isEnumDeclaration;
146exports.isEnumBooleanBody = isEnumBooleanBody;
147exports.isEnumNumberBody = isEnumNumberBody;
148exports.isEnumStringBody = isEnumStringBody;
149exports.isEnumSymbolBody = isEnumSymbolBody;
150exports.isEnumBooleanMember = isEnumBooleanMember;
151exports.isEnumNumberMember = isEnumNumberMember;
152exports.isEnumStringMember = isEnumStringMember;
153exports.isEnumDefaultedMember = isEnumDefaultedMember;
154exports.isIndexedAccessType = isIndexedAccessType;
155exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
156exports.isJSXAttribute = isJSXAttribute;
157exports.isJSXClosingElement = isJSXClosingElement;
158exports.isJSXElement = isJSXElement;
159exports.isJSXEmptyExpression = isJSXEmptyExpression;
160exports.isJSXExpressionContainer = isJSXExpressionContainer;
161exports.isJSXSpreadChild = isJSXSpreadChild;
162exports.isJSXIdentifier = isJSXIdentifier;
163exports.isJSXMemberExpression = isJSXMemberExpression;
164exports.isJSXNamespacedName = isJSXNamespacedName;
165exports.isJSXOpeningElement = isJSXOpeningElement;
166exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
167exports.isJSXText = isJSXText;
168exports.isJSXFragment = isJSXFragment;
169exports.isJSXOpeningFragment = isJSXOpeningFragment;
170exports.isJSXClosingFragment = isJSXClosingFragment;
171exports.isNoop = isNoop;
172exports.isPlaceholder = isPlaceholder;
173exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
174exports.isArgumentPlaceholder = isArgumentPlaceholder;
175exports.isBindExpression = isBindExpression;
176exports.isImportAttribute = isImportAttribute;
177exports.isDecorator = isDecorator;
178exports.isDoExpression = isDoExpression;
179exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
180exports.isRecordExpression = isRecordExpression;
181exports.isTupleExpression = isTupleExpression;
182exports.isDecimalLiteral = isDecimalLiteral;
183exports.isStaticBlock = isStaticBlock;
184exports.isModuleExpression = isModuleExpression;
185exports.isTopicReference = isTopicReference;
186exports.isPipelineTopicExpression = isPipelineTopicExpression;
187exports.isPipelineBareFunction = isPipelineBareFunction;
188exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
189exports.isTSParameterProperty = isTSParameterProperty;
190exports.isTSDeclareFunction = isTSDeclareFunction;
191exports.isTSDeclareMethod = isTSDeclareMethod;
192exports.isTSQualifiedName = isTSQualifiedName;
193exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
194exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
195exports.isTSPropertySignature = isTSPropertySignature;
196exports.isTSMethodSignature = isTSMethodSignature;
197exports.isTSIndexSignature = isTSIndexSignature;
198exports.isTSAnyKeyword = isTSAnyKeyword;
199exports.isTSBooleanKeyword = isTSBooleanKeyword;
200exports.isTSBigIntKeyword = isTSBigIntKeyword;
201exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
202exports.isTSNeverKeyword = isTSNeverKeyword;
203exports.isTSNullKeyword = isTSNullKeyword;
204exports.isTSNumberKeyword = isTSNumberKeyword;
205exports.isTSObjectKeyword = isTSObjectKeyword;
206exports.isTSStringKeyword = isTSStringKeyword;
207exports.isTSSymbolKeyword = isTSSymbolKeyword;
208exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
209exports.isTSUnknownKeyword = isTSUnknownKeyword;
210exports.isTSVoidKeyword = isTSVoidKeyword;
211exports.isTSThisType = isTSThisType;
212exports.isTSFunctionType = isTSFunctionType;
213exports.isTSConstructorType = isTSConstructorType;
214exports.isTSTypeReference = isTSTypeReference;
215exports.isTSTypePredicate = isTSTypePredicate;
216exports.isTSTypeQuery = isTSTypeQuery;
217exports.isTSTypeLiteral = isTSTypeLiteral;
218exports.isTSArrayType = isTSArrayType;
219exports.isTSTupleType = isTSTupleType;
220exports.isTSOptionalType = isTSOptionalType;
221exports.isTSRestType = isTSRestType;
222exports.isTSNamedTupleMember = isTSNamedTupleMember;
223exports.isTSUnionType = isTSUnionType;
224exports.isTSIntersectionType = isTSIntersectionType;
225exports.isTSConditionalType = isTSConditionalType;
226exports.isTSInferType = isTSInferType;
227exports.isTSParenthesizedType = isTSParenthesizedType;
228exports.isTSTypeOperator = isTSTypeOperator;
229exports.isTSIndexedAccessType = isTSIndexedAccessType;
230exports.isTSMappedType = isTSMappedType;
231exports.isTSLiteralType = isTSLiteralType;
232exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
233exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
234exports.isTSInterfaceBody = isTSInterfaceBody;
235exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
236exports.isTSAsExpression = isTSAsExpression;
237exports.isTSTypeAssertion = isTSTypeAssertion;
238exports.isTSEnumDeclaration = isTSEnumDeclaration;
239exports.isTSEnumMember = isTSEnumMember;
240exports.isTSModuleDeclaration = isTSModuleDeclaration;
241exports.isTSModuleBlock = isTSModuleBlock;
242exports.isTSImportType = isTSImportType;
243exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
244exports.isTSExternalModuleReference = isTSExternalModuleReference;
245exports.isTSNonNullExpression = isTSNonNullExpression;
246exports.isTSExportAssignment = isTSExportAssignment;
247exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
248exports.isTSTypeAnnotation = isTSTypeAnnotation;
249exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
250exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
251exports.isTSTypeParameter = isTSTypeParameter;
252exports.isExpression = isExpression;
253exports.isBinary = isBinary;
254exports.isScopable = isScopable;
255exports.isBlockParent = isBlockParent;
256exports.isBlock = isBlock;
257exports.isStatement = isStatement;
258exports.isTerminatorless = isTerminatorless;
259exports.isCompletionStatement = isCompletionStatement;
260exports.isConditional = isConditional;
261exports.isLoop = isLoop;
262exports.isWhile = isWhile;
263exports.isExpressionWrapper = isExpressionWrapper;
264exports.isFor = isFor;
265exports.isForXStatement = isForXStatement;
266exports.isFunction = isFunction;
267exports.isFunctionParent = isFunctionParent;
268exports.isPureish = isPureish;
269exports.isDeclaration = isDeclaration;
270exports.isPatternLike = isPatternLike;
271exports.isLVal = isLVal;
272exports.isTSEntityName = isTSEntityName;
273exports.isLiteral = isLiteral;
274exports.isImmutable = isImmutable;
275exports.isUserWhitespacable = isUserWhitespacable;
276exports.isMethod = isMethod;
277exports.isObjectMember = isObjectMember;
278exports.isProperty = isProperty;
279exports.isUnaryLike = isUnaryLike;
280exports.isPattern = isPattern;
281exports.isClass = isClass;
282exports.isModuleDeclaration = isModuleDeclaration;
283exports.isExportDeclaration = isExportDeclaration;
284exports.isModuleSpecifier = isModuleSpecifier;
285exports.isPrivate = isPrivate;
286exports.isFlow = isFlow;
287exports.isFlowType = isFlowType;
288exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
289exports.isFlowDeclaration = isFlowDeclaration;
290exports.isFlowPredicate = isFlowPredicate;
291exports.isEnumBody = isEnumBody;
292exports.isEnumMember = isEnumMember;
293exports.isJSX = isJSX;
294exports.isTSTypeElement = isTSTypeElement;
295exports.isTSType = isTSType;
296exports.isTSBaseType = isTSBaseType;
297exports.isNumberLiteral = isNumberLiteral;
298exports.isRegexLiteral = isRegexLiteral;
299exports.isRestProperty = isRestProperty;
300exports.isSpreadProperty = isSpreadProperty;
301
302var _shallowEqual = require("../../utils/shallowEqual");
303
304function isArrayExpression(node, opts) {
305 if (!node) return false;
306 const nodeType = node.type;
307
308 if (nodeType === "ArrayExpression") {
309 if (typeof opts === "undefined") {
310 return true;
311 } else {
312 return (0, _shallowEqual.default)(node, opts);
313 }
314 }
315
316 return false;
317}
318
319function isAssignmentExpression(node, opts) {
320 if (!node) return false;
321 const nodeType = node.type;
322
323 if (nodeType === "AssignmentExpression") {
324 if (typeof opts === "undefined") {
325 return true;
326 } else {
327 return (0, _shallowEqual.default)(node, opts);
328 }
329 }
330
331 return false;
332}
333
334function isBinaryExpression(node, opts) {
335 if (!node) return false;
336 const nodeType = node.type;
337
338 if (nodeType === "BinaryExpression") {
339 if (typeof opts === "undefined") {
340 return true;
341 } else {
342 return (0, _shallowEqual.default)(node, opts);
343 }
344 }
345
346 return false;
347}
348
349function isInterpreterDirective(node, opts) {
350 if (!node) return false;
351 const nodeType = node.type;
352
353 if (nodeType === "InterpreterDirective") {
354 if (typeof opts === "undefined") {
355 return true;
356 } else {
357 return (0, _shallowEqual.default)(node, opts);
358 }
359 }
360
361 return false;
362}
363
364function isDirective(node, opts) {
365 if (!node) return false;
366 const nodeType = node.type;
367
368 if (nodeType === "Directive") {
369 if (typeof opts === "undefined") {
370 return true;
371 } else {
372 return (0, _shallowEqual.default)(node, opts);
373 }
374 }
375
376 return false;
377}
378
379function isDirectiveLiteral(node, opts) {
380 if (!node) return false;
381 const nodeType = node.type;
382
383 if (nodeType === "DirectiveLiteral") {
384 if (typeof opts === "undefined") {
385 return true;
386 } else {
387 return (0, _shallowEqual.default)(node, opts);
388 }
389 }
390
391 return false;
392}
393
394function isBlockStatement(node, opts) {
395 if (!node) return false;
396 const nodeType = node.type;
397
398 if (nodeType === "BlockStatement") {
399 if (typeof opts === "undefined") {
400 return true;
401 } else {
402 return (0, _shallowEqual.default)(node, opts);
403 }
404 }
405
406 return false;
407}
408
409function isBreakStatement(node, opts) {
410 if (!node) return false;
411 const nodeType = node.type;
412
413 if (nodeType === "BreakStatement") {
414 if (typeof opts === "undefined") {
415 return true;
416 } else {
417 return (0, _shallowEqual.default)(node, opts);
418 }
419 }
420
421 return false;
422}
423
424function isCallExpression(node, opts) {
425 if (!node) return false;
426 const nodeType = node.type;
427
428 if (nodeType === "CallExpression") {
429 if (typeof opts === "undefined") {
430 return true;
431 } else {
432 return (0, _shallowEqual.default)(node, opts);
433 }
434 }
435
436 return false;
437}
438
439function isCatchClause(node, opts) {
440 if (!node) return false;
441 const nodeType = node.type;
442
443 if (nodeType === "CatchClause") {
444 if (typeof opts === "undefined") {
445 return true;
446 } else {
447 return (0, _shallowEqual.default)(node, opts);
448 }
449 }
450
451 return false;
452}
453
454function isConditionalExpression(node, opts) {
455 if (!node) return false;
456 const nodeType = node.type;
457
458 if (nodeType === "ConditionalExpression") {
459 if (typeof opts === "undefined") {
460 return true;
461 } else {
462 return (0, _shallowEqual.default)(node, opts);
463 }
464 }
465
466 return false;
467}
468
469function isContinueStatement(node, opts) {
470 if (!node) return false;
471 const nodeType = node.type;
472
473 if (nodeType === "ContinueStatement") {
474 if (typeof opts === "undefined") {
475 return true;
476 } else {
477 return (0, _shallowEqual.default)(node, opts);
478 }
479 }
480
481 return false;
482}
483
484function isDebuggerStatement(node, opts) {
485 if (!node) return false;
486 const nodeType = node.type;
487
488 if (nodeType === "DebuggerStatement") {
489 if (typeof opts === "undefined") {
490 return true;
491 } else {
492 return (0, _shallowEqual.default)(node, opts);
493 }
494 }
495
496 return false;
497}
498
499function isDoWhileStatement(node, opts) {
500 if (!node) return false;
501 const nodeType = node.type;
502
503 if (nodeType === "DoWhileStatement") {
504 if (typeof opts === "undefined") {
505 return true;
506 } else {
507 return (0, _shallowEqual.default)(node, opts);
508 }
509 }
510
511 return false;
512}
513
514function isEmptyStatement(node, opts) {
515 if (!node) return false;
516 const nodeType = node.type;
517
518 if (nodeType === "EmptyStatement") {
519 if (typeof opts === "undefined") {
520 return true;
521 } else {
522 return (0, _shallowEqual.default)(node, opts);
523 }
524 }
525
526 return false;
527}
528
529function isExpressionStatement(node, opts) {
530 if (!node) return false;
531 const nodeType = node.type;
532
533 if (nodeType === "ExpressionStatement") {
534 if (typeof opts === "undefined") {
535 return true;
536 } else {
537 return (0, _shallowEqual.default)(node, opts);
538 }
539 }
540
541 return false;
542}
543
544function isFile(node, opts) {
545 if (!node) return false;
546 const nodeType = node.type;
547
548 if (nodeType === "File") {
549 if (typeof opts === "undefined") {
550 return true;
551 } else {
552 return (0, _shallowEqual.default)(node, opts);
553 }
554 }
555
556 return false;
557}
558
559function isForInStatement(node, opts) {
560 if (!node) return false;
561 const nodeType = node.type;
562
563 if (nodeType === "ForInStatement") {
564 if (typeof opts === "undefined") {
565 return true;
566 } else {
567 return (0, _shallowEqual.default)(node, opts);
568 }
569 }
570
571 return false;
572}
573
574function isForStatement(node, opts) {
575 if (!node) return false;
576 const nodeType = node.type;
577
578 if (nodeType === "ForStatement") {
579 if (typeof opts === "undefined") {
580 return true;
581 } else {
582 return (0, _shallowEqual.default)(node, opts);
583 }
584 }
585
586 return false;
587}
588
589function isFunctionDeclaration(node, opts) {
590 if (!node) return false;
591 const nodeType = node.type;
592
593 if (nodeType === "FunctionDeclaration") {
594 if (typeof opts === "undefined") {
595 return true;
596 } else {
597 return (0, _shallowEqual.default)(node, opts);
598 }
599 }
600
601 return false;
602}
603
604function isFunctionExpression(node, opts) {
605 if (!node) return false;
606 const nodeType = node.type;
607
608 if (nodeType === "FunctionExpression") {
609 if (typeof opts === "undefined") {
610 return true;
611 } else {
612 return (0, _shallowEqual.default)(node, opts);
613 }
614 }
615
616 return false;
617}
618
619function isIdentifier(node, opts) {
620 if (!node) return false;
621 const nodeType = node.type;
622
623 if (nodeType === "Identifier") {
624 if (typeof opts === "undefined") {
625 return true;
626 } else {
627 return (0, _shallowEqual.default)(node, opts);
628 }
629 }
630
631 return false;
632}
633
634function isIfStatement(node, opts) {
635 if (!node) return false;
636 const nodeType = node.type;
637
638 if (nodeType === "IfStatement") {
639 if (typeof opts === "undefined") {
640 return true;
641 } else {
642 return (0, _shallowEqual.default)(node, opts);
643 }
644 }
645
646 return false;
647}
648
649function isLabeledStatement(node, opts) {
650 if (!node) return false;
651 const nodeType = node.type;
652
653 if (nodeType === "LabeledStatement") {
654 if (typeof opts === "undefined") {
655 return true;
656 } else {
657 return (0, _shallowEqual.default)(node, opts);
658 }
659 }
660
661 return false;
662}
663
664function isStringLiteral(node, opts) {
665 if (!node) return false;
666 const nodeType = node.type;
667
668 if (nodeType === "StringLiteral") {
669 if (typeof opts === "undefined") {
670 return true;
671 } else {
672 return (0, _shallowEqual.default)(node, opts);
673 }
674 }
675
676 return false;
677}
678
679function isNumericLiteral(node, opts) {
680 if (!node) return false;
681 const nodeType = node.type;
682
683 if (nodeType === "NumericLiteral") {
684 if (typeof opts === "undefined") {
685 return true;
686 } else {
687 return (0, _shallowEqual.default)(node, opts);
688 }
689 }
690
691 return false;
692}
693
694function isNullLiteral(node, opts) {
695 if (!node) return false;
696 const nodeType = node.type;
697
698 if (nodeType === "NullLiteral") {
699 if (typeof opts === "undefined") {
700 return true;
701 } else {
702 return (0, _shallowEqual.default)(node, opts);
703 }
704 }
705
706 return false;
707}
708
709function isBooleanLiteral(node, opts) {
710 if (!node) return false;
711 const nodeType = node.type;
712
713 if (nodeType === "BooleanLiteral") {
714 if (typeof opts === "undefined") {
715 return true;
716 } else {
717 return (0, _shallowEqual.default)(node, opts);
718 }
719 }
720
721 return false;
722}
723
724function isRegExpLiteral(node, opts) {
725 if (!node) return false;
726 const nodeType = node.type;
727
728 if (nodeType === "RegExpLiteral") {
729 if (typeof opts === "undefined") {
730 return true;
731 } else {
732 return (0, _shallowEqual.default)(node, opts);
733 }
734 }
735
736 return false;
737}
738
739function isLogicalExpression(node, opts) {
740 if (!node) return false;
741 const nodeType = node.type;
742
743 if (nodeType === "LogicalExpression") {
744 if (typeof opts === "undefined") {
745 return true;
746 } else {
747 return (0, _shallowEqual.default)(node, opts);
748 }
749 }
750
751 return false;
752}
753
754function isMemberExpression(node, opts) {
755 if (!node) return false;
756 const nodeType = node.type;
757
758 if (nodeType === "MemberExpression") {
759 if (typeof opts === "undefined") {
760 return true;
761 } else {
762 return (0, _shallowEqual.default)(node, opts);
763 }
764 }
765
766 return false;
767}
768
769function isNewExpression(node, opts) {
770 if (!node) return false;
771 const nodeType = node.type;
772
773 if (nodeType === "NewExpression") {
774 if (typeof opts === "undefined") {
775 return true;
776 } else {
777 return (0, _shallowEqual.default)(node, opts);
778 }
779 }
780
781 return false;
782}
783
784function isProgram(node, opts) {
785 if (!node) return false;
786 const nodeType = node.type;
787
788 if (nodeType === "Program") {
789 if (typeof opts === "undefined") {
790 return true;
791 } else {
792 return (0, _shallowEqual.default)(node, opts);
793 }
794 }
795
796 return false;
797}
798
799function isObjectExpression(node, opts) {
800 if (!node) return false;
801 const nodeType = node.type;
802
803 if (nodeType === "ObjectExpression") {
804 if (typeof opts === "undefined") {
805 return true;
806 } else {
807 return (0, _shallowEqual.default)(node, opts);
808 }
809 }
810
811 return false;
812}
813
814function isObjectMethod(node, opts) {
815 if (!node) return false;
816 const nodeType = node.type;
817
818 if (nodeType === "ObjectMethod") {
819 if (typeof opts === "undefined") {
820 return true;
821 } else {
822 return (0, _shallowEqual.default)(node, opts);
823 }
824 }
825
826 return false;
827}
828
829function isObjectProperty(node, opts) {
830 if (!node) return false;
831 const nodeType = node.type;
832
833 if (nodeType === "ObjectProperty") {
834 if (typeof opts === "undefined") {
835 return true;
836 } else {
837 return (0, _shallowEqual.default)(node, opts);
838 }
839 }
840
841 return false;
842}
843
844function isRestElement(node, opts) {
845 if (!node) return false;
846 const nodeType = node.type;
847
848 if (nodeType === "RestElement") {
849 if (typeof opts === "undefined") {
850 return true;
851 } else {
852 return (0, _shallowEqual.default)(node, opts);
853 }
854 }
855
856 return false;
857}
858
859function isReturnStatement(node, opts) {
860 if (!node) return false;
861 const nodeType = node.type;
862
863 if (nodeType === "ReturnStatement") {
864 if (typeof opts === "undefined") {
865 return true;
866 } else {
867 return (0, _shallowEqual.default)(node, opts);
868 }
869 }
870
871 return false;
872}
873
874function isSequenceExpression(node, opts) {
875 if (!node) return false;
876 const nodeType = node.type;
877
878 if (nodeType === "SequenceExpression") {
879 if (typeof opts === "undefined") {
880 return true;
881 } else {
882 return (0, _shallowEqual.default)(node, opts);
883 }
884 }
885
886 return false;
887}
888
889function isParenthesizedExpression(node, opts) {
890 if (!node) return false;
891 const nodeType = node.type;
892
893 if (nodeType === "ParenthesizedExpression") {
894 if (typeof opts === "undefined") {
895 return true;
896 } else {
897 return (0, _shallowEqual.default)(node, opts);
898 }
899 }
900
901 return false;
902}
903
904function isSwitchCase(node, opts) {
905 if (!node) return false;
906 const nodeType = node.type;
907
908 if (nodeType === "SwitchCase") {
909 if (typeof opts === "undefined") {
910 return true;
911 } else {
912 return (0, _shallowEqual.default)(node, opts);
913 }
914 }
915
916 return false;
917}
918
919function isSwitchStatement(node, opts) {
920 if (!node) return false;
921 const nodeType = node.type;
922
923 if (nodeType === "SwitchStatement") {
924 if (typeof opts === "undefined") {
925 return true;
926 } else {
927 return (0, _shallowEqual.default)(node, opts);
928 }
929 }
930
931 return false;
932}
933
934function isThisExpression(node, opts) {
935 if (!node) return false;
936 const nodeType = node.type;
937
938 if (nodeType === "ThisExpression") {
939 if (typeof opts === "undefined") {
940 return true;
941 } else {
942 return (0, _shallowEqual.default)(node, opts);
943 }
944 }
945
946 return false;
947}
948
949function isThrowStatement(node, opts) {
950 if (!node) return false;
951 const nodeType = node.type;
952
953 if (nodeType === "ThrowStatement") {
954 if (typeof opts === "undefined") {
955 return true;
956 } else {
957 return (0, _shallowEqual.default)(node, opts);
958 }
959 }
960
961 return false;
962}
963
964function isTryStatement(node, opts) {
965 if (!node) return false;
966 const nodeType = node.type;
967
968 if (nodeType === "TryStatement") {
969 if (typeof opts === "undefined") {
970 return true;
971 } else {
972 return (0, _shallowEqual.default)(node, opts);
973 }
974 }
975
976 return false;
977}
978
979function isUnaryExpression(node, opts) {
980 if (!node) return false;
981 const nodeType = node.type;
982
983 if (nodeType === "UnaryExpression") {
984 if (typeof opts === "undefined") {
985 return true;
986 } else {
987 return (0, _shallowEqual.default)(node, opts);
988 }
989 }
990
991 return false;
992}
993
994function isUpdateExpression(node, opts) {
995 if (!node) return false;
996 const nodeType = node.type;
997
998 if (nodeType === "UpdateExpression") {
999 if (typeof opts === "undefined") {
1000 return true;
1001 } else {
1002 return (0, _shallowEqual.default)(node, opts);
1003 }
1004 }
1005
1006 return false;
1007}
1008
1009function isVariableDeclaration(node, opts) {
1010 if (!node) return false;
1011 const nodeType = node.type;
1012
1013 if (nodeType === "VariableDeclaration") {
1014 if (typeof opts === "undefined") {
1015 return true;
1016 } else {
1017 return (0, _shallowEqual.default)(node, opts);
1018 }
1019 }
1020
1021 return false;
1022}
1023
1024function isVariableDeclarator(node, opts) {
1025 if (!node) return false;
1026 const nodeType = node.type;
1027
1028 if (nodeType === "VariableDeclarator") {
1029 if (typeof opts === "undefined") {
1030 return true;
1031 } else {
1032 return (0, _shallowEqual.default)(node, opts);
1033 }
1034 }
1035
1036 return false;
1037}
1038
1039function isWhileStatement(node, opts) {
1040 if (!node) return false;
1041 const nodeType = node.type;
1042
1043 if (nodeType === "WhileStatement") {
1044 if (typeof opts === "undefined") {
1045 return true;
1046 } else {
1047 return (0, _shallowEqual.default)(node, opts);
1048 }
1049 }
1050
1051 return false;
1052}
1053
1054function isWithStatement(node, opts) {
1055 if (!node) return false;
1056 const nodeType = node.type;
1057
1058 if (nodeType === "WithStatement") {
1059 if (typeof opts === "undefined") {
1060 return true;
1061 } else {
1062 return (0, _shallowEqual.default)(node, opts);
1063 }
1064 }
1065
1066 return false;
1067}
1068
1069function isAssignmentPattern(node, opts) {
1070 if (!node) return false;
1071 const nodeType = node.type;
1072
1073 if (nodeType === "AssignmentPattern") {
1074 if (typeof opts === "undefined") {
1075 return true;
1076 } else {
1077 return (0, _shallowEqual.default)(node, opts);
1078 }
1079 }
1080
1081 return false;
1082}
1083
1084function isArrayPattern(node, opts) {
1085 if (!node) return false;
1086 const nodeType = node.type;
1087
1088 if (nodeType === "ArrayPattern") {
1089 if (typeof opts === "undefined") {
1090 return true;
1091 } else {
1092 return (0, _shallowEqual.default)(node, opts);
1093 }
1094 }
1095
1096 return false;
1097}
1098
1099function isArrowFunctionExpression(node, opts) {
1100 if (!node) return false;
1101 const nodeType = node.type;
1102
1103 if (nodeType === "ArrowFunctionExpression") {
1104 if (typeof opts === "undefined") {
1105 return true;
1106 } else {
1107 return (0, _shallowEqual.default)(node, opts);
1108 }
1109 }
1110
1111 return false;
1112}
1113
1114function isClassBody(node, opts) {
1115 if (!node) return false;
1116 const nodeType = node.type;
1117
1118 if (nodeType === "ClassBody") {
1119 if (typeof opts === "undefined") {
1120 return true;
1121 } else {
1122 return (0, _shallowEqual.default)(node, opts);
1123 }
1124 }
1125
1126 return false;
1127}
1128
1129function isClassExpression(node, opts) {
1130 if (!node) return false;
1131 const nodeType = node.type;
1132
1133 if (nodeType === "ClassExpression") {
1134 if (typeof opts === "undefined") {
1135 return true;
1136 } else {
1137 return (0, _shallowEqual.default)(node, opts);
1138 }
1139 }
1140
1141 return false;
1142}
1143
1144function isClassDeclaration(node, opts) {
1145 if (!node) return false;
1146 const nodeType = node.type;
1147
1148 if (nodeType === "ClassDeclaration") {
1149 if (typeof opts === "undefined") {
1150 return true;
1151 } else {
1152 return (0, _shallowEqual.default)(node, opts);
1153 }
1154 }
1155
1156 return false;
1157}
1158
1159function isExportAllDeclaration(node, opts) {
1160 if (!node) return false;
1161 const nodeType = node.type;
1162
1163 if (nodeType === "ExportAllDeclaration") {
1164 if (typeof opts === "undefined") {
1165 return true;
1166 } else {
1167 return (0, _shallowEqual.default)(node, opts);
1168 }
1169 }
1170
1171 return false;
1172}
1173
1174function isExportDefaultDeclaration(node, opts) {
1175 if (!node) return false;
1176 const nodeType = node.type;
1177
1178 if (nodeType === "ExportDefaultDeclaration") {
1179 if (typeof opts === "undefined") {
1180 return true;
1181 } else {
1182 return (0, _shallowEqual.default)(node, opts);
1183 }
1184 }
1185
1186 return false;
1187}
1188
1189function isExportNamedDeclaration(node, opts) {
1190 if (!node) return false;
1191 const nodeType = node.type;
1192
1193 if (nodeType === "ExportNamedDeclaration") {
1194 if (typeof opts === "undefined") {
1195 return true;
1196 } else {
1197 return (0, _shallowEqual.default)(node, opts);
1198 }
1199 }
1200
1201 return false;
1202}
1203
1204function isExportSpecifier(node, opts) {
1205 if (!node) return false;
1206 const nodeType = node.type;
1207
1208 if (nodeType === "ExportSpecifier") {
1209 if (typeof opts === "undefined") {
1210 return true;
1211 } else {
1212 return (0, _shallowEqual.default)(node, opts);
1213 }
1214 }
1215
1216 return false;
1217}
1218
1219function isForOfStatement(node, opts) {
1220 if (!node) return false;
1221 const nodeType = node.type;
1222
1223 if (nodeType === "ForOfStatement") {
1224 if (typeof opts === "undefined") {
1225 return true;
1226 } else {
1227 return (0, _shallowEqual.default)(node, opts);
1228 }
1229 }
1230
1231 return false;
1232}
1233
1234function isImportDeclaration(node, opts) {
1235 if (!node) return false;
1236 const nodeType = node.type;
1237
1238 if (nodeType === "ImportDeclaration") {
1239 if (typeof opts === "undefined") {
1240 return true;
1241 } else {
1242 return (0, _shallowEqual.default)(node, opts);
1243 }
1244 }
1245
1246 return false;
1247}
1248
1249function isImportDefaultSpecifier(node, opts) {
1250 if (!node) return false;
1251 const nodeType = node.type;
1252
1253 if (nodeType === "ImportDefaultSpecifier") {
1254 if (typeof opts === "undefined") {
1255 return true;
1256 } else {
1257 return (0, _shallowEqual.default)(node, opts);
1258 }
1259 }
1260
1261 return false;
1262}
1263
1264function isImportNamespaceSpecifier(node, opts) {
1265 if (!node) return false;
1266 const nodeType = node.type;
1267
1268 if (nodeType === "ImportNamespaceSpecifier") {
1269 if (typeof opts === "undefined") {
1270 return true;
1271 } else {
1272 return (0, _shallowEqual.default)(node, opts);
1273 }
1274 }
1275
1276 return false;
1277}
1278
1279function isImportSpecifier(node, opts) {
1280 if (!node) return false;
1281 const nodeType = node.type;
1282
1283 if (nodeType === "ImportSpecifier") {
1284 if (typeof opts === "undefined") {
1285 return true;
1286 } else {
1287 return (0, _shallowEqual.default)(node, opts);
1288 }
1289 }
1290
1291 return false;
1292}
1293
1294function isMetaProperty(node, opts) {
1295 if (!node) return false;
1296 const nodeType = node.type;
1297
1298 if (nodeType === "MetaProperty") {
1299 if (typeof opts === "undefined") {
1300 return true;
1301 } else {
1302 return (0, _shallowEqual.default)(node, opts);
1303 }
1304 }
1305
1306 return false;
1307}
1308
1309function isClassMethod(node, opts) {
1310 if (!node) return false;
1311 const nodeType = node.type;
1312
1313 if (nodeType === "ClassMethod") {
1314 if (typeof opts === "undefined") {
1315 return true;
1316 } else {
1317 return (0, _shallowEqual.default)(node, opts);
1318 }
1319 }
1320
1321 return false;
1322}
1323
1324function isObjectPattern(node, opts) {
1325 if (!node) return false;
1326 const nodeType = node.type;
1327
1328 if (nodeType === "ObjectPattern") {
1329 if (typeof opts === "undefined") {
1330 return true;
1331 } else {
1332 return (0, _shallowEqual.default)(node, opts);
1333 }
1334 }
1335
1336 return false;
1337}
1338
1339function isSpreadElement(node, opts) {
1340 if (!node) return false;
1341 const nodeType = node.type;
1342
1343 if (nodeType === "SpreadElement") {
1344 if (typeof opts === "undefined") {
1345 return true;
1346 } else {
1347 return (0, _shallowEqual.default)(node, opts);
1348 }
1349 }
1350
1351 return false;
1352}
1353
1354function isSuper(node, opts) {
1355 if (!node) return false;
1356 const nodeType = node.type;
1357
1358 if (nodeType === "Super") {
1359 if (typeof opts === "undefined") {
1360 return true;
1361 } else {
1362 return (0, _shallowEqual.default)(node, opts);
1363 }
1364 }
1365
1366 return false;
1367}
1368
1369function isTaggedTemplateExpression(node, opts) {
1370 if (!node) return false;
1371 const nodeType = node.type;
1372
1373 if (nodeType === "TaggedTemplateExpression") {
1374 if (typeof opts === "undefined") {
1375 return true;
1376 } else {
1377 return (0, _shallowEqual.default)(node, opts);
1378 }
1379 }
1380
1381 return false;
1382}
1383
1384function isTemplateElement(node, opts) {
1385 if (!node) return false;
1386 const nodeType = node.type;
1387
1388 if (nodeType === "TemplateElement") {
1389 if (typeof opts === "undefined") {
1390 return true;
1391 } else {
1392 return (0, _shallowEqual.default)(node, opts);
1393 }
1394 }
1395
1396 return false;
1397}
1398
1399function isTemplateLiteral(node, opts) {
1400 if (!node) return false;
1401 const nodeType = node.type;
1402
1403 if (nodeType === "TemplateLiteral") {
1404 if (typeof opts === "undefined") {
1405 return true;
1406 } else {
1407 return (0, _shallowEqual.default)(node, opts);
1408 }
1409 }
1410
1411 return false;
1412}
1413
1414function isYieldExpression(node, opts) {
1415 if (!node) return false;
1416 const nodeType = node.type;
1417
1418 if (nodeType === "YieldExpression") {
1419 if (typeof opts === "undefined") {
1420 return true;
1421 } else {
1422 return (0, _shallowEqual.default)(node, opts);
1423 }
1424 }
1425
1426 return false;
1427}
1428
1429function isAwaitExpression(node, opts) {
1430 if (!node) return false;
1431 const nodeType = node.type;
1432
1433 if (nodeType === "AwaitExpression") {
1434 if (typeof opts === "undefined") {
1435 return true;
1436 } else {
1437 return (0, _shallowEqual.default)(node, opts);
1438 }
1439 }
1440
1441 return false;
1442}
1443
1444function isImport(node, opts) {
1445 if (!node) return false;
1446 const nodeType = node.type;
1447
1448 if (nodeType === "Import") {
1449 if (typeof opts === "undefined") {
1450 return true;
1451 } else {
1452 return (0, _shallowEqual.default)(node, opts);
1453 }
1454 }
1455
1456 return false;
1457}
1458
1459function isBigIntLiteral(node, opts) {
1460 if (!node) return false;
1461 const nodeType = node.type;
1462
1463 if (nodeType === "BigIntLiteral") {
1464 if (typeof opts === "undefined") {
1465 return true;
1466 } else {
1467 return (0, _shallowEqual.default)(node, opts);
1468 }
1469 }
1470
1471 return false;
1472}
1473
1474function isExportNamespaceSpecifier(node, opts) {
1475 if (!node) return false;
1476 const nodeType = node.type;
1477
1478 if (nodeType === "ExportNamespaceSpecifier") {
1479 if (typeof opts === "undefined") {
1480 return true;
1481 } else {
1482 return (0, _shallowEqual.default)(node, opts);
1483 }
1484 }
1485
1486 return false;
1487}
1488
1489function isOptionalMemberExpression(node, opts) {
1490 if (!node) return false;
1491 const nodeType = node.type;
1492
1493 if (nodeType === "OptionalMemberExpression") {
1494 if (typeof opts === "undefined") {
1495 return true;
1496 } else {
1497 return (0, _shallowEqual.default)(node, opts);
1498 }
1499 }
1500
1501 return false;
1502}
1503
1504function isOptionalCallExpression(node, opts) {
1505 if (!node) return false;
1506 const nodeType = node.type;
1507
1508 if (nodeType === "OptionalCallExpression") {
1509 if (typeof opts === "undefined") {
1510 return true;
1511 } else {
1512 return (0, _shallowEqual.default)(node, opts);
1513 }
1514 }
1515
1516 return false;
1517}
1518
1519function isClassProperty(node, opts) {
1520 if (!node) return false;
1521 const nodeType = node.type;
1522
1523 if (nodeType === "ClassProperty") {
1524 if (typeof opts === "undefined") {
1525 return true;
1526 } else {
1527 return (0, _shallowEqual.default)(node, opts);
1528 }
1529 }
1530
1531 return false;
1532}
1533
1534function isClassPrivateProperty(node, opts) {
1535 if (!node) return false;
1536 const nodeType = node.type;
1537
1538 if (nodeType === "ClassPrivateProperty") {
1539 if (typeof opts === "undefined") {
1540 return true;
1541 } else {
1542 return (0, _shallowEqual.default)(node, opts);
1543 }
1544 }
1545
1546 return false;
1547}
1548
1549function isClassPrivateMethod(node, opts) {
1550 if (!node) return false;
1551 const nodeType = node.type;
1552
1553 if (nodeType === "ClassPrivateMethod") {
1554 if (typeof opts === "undefined") {
1555 return true;
1556 } else {
1557 return (0, _shallowEqual.default)(node, opts);
1558 }
1559 }
1560
1561 return false;
1562}
1563
1564function isPrivateName(node, opts) {
1565 if (!node) return false;
1566 const nodeType = node.type;
1567
1568 if (nodeType === "PrivateName") {
1569 if (typeof opts === "undefined") {
1570 return true;
1571 } else {
1572 return (0, _shallowEqual.default)(node, opts);
1573 }
1574 }
1575
1576 return false;
1577}
1578
1579function isAnyTypeAnnotation(node, opts) {
1580 if (!node) return false;
1581 const nodeType = node.type;
1582
1583 if (nodeType === "AnyTypeAnnotation") {
1584 if (typeof opts === "undefined") {
1585 return true;
1586 } else {
1587 return (0, _shallowEqual.default)(node, opts);
1588 }
1589 }
1590
1591 return false;
1592}
1593
1594function isArrayTypeAnnotation(node, opts) {
1595 if (!node) return false;
1596 const nodeType = node.type;
1597
1598 if (nodeType === "ArrayTypeAnnotation") {
1599 if (typeof opts === "undefined") {
1600 return true;
1601 } else {
1602 return (0, _shallowEqual.default)(node, opts);
1603 }
1604 }
1605
1606 return false;
1607}
1608
1609function isBooleanTypeAnnotation(node, opts) {
1610 if (!node) return false;
1611 const nodeType = node.type;
1612
1613 if (nodeType === "BooleanTypeAnnotation") {
1614 if (typeof opts === "undefined") {
1615 return true;
1616 } else {
1617 return (0, _shallowEqual.default)(node, opts);
1618 }
1619 }
1620
1621 return false;
1622}
1623
1624function isBooleanLiteralTypeAnnotation(node, opts) {
1625 if (!node) return false;
1626 const nodeType = node.type;
1627
1628 if (nodeType === "BooleanLiteralTypeAnnotation") {
1629 if (typeof opts === "undefined") {
1630 return true;
1631 } else {
1632 return (0, _shallowEqual.default)(node, opts);
1633 }
1634 }
1635
1636 return false;
1637}
1638
1639function isNullLiteralTypeAnnotation(node, opts) {
1640 if (!node) return false;
1641 const nodeType = node.type;
1642
1643 if (nodeType === "NullLiteralTypeAnnotation") {
1644 if (typeof opts === "undefined") {
1645 return true;
1646 } else {
1647 return (0, _shallowEqual.default)(node, opts);
1648 }
1649 }
1650
1651 return false;
1652}
1653
1654function isClassImplements(node, opts) {
1655 if (!node) return false;
1656 const nodeType = node.type;
1657
1658 if (nodeType === "ClassImplements") {
1659 if (typeof opts === "undefined") {
1660 return true;
1661 } else {
1662 return (0, _shallowEqual.default)(node, opts);
1663 }
1664 }
1665
1666 return false;
1667}
1668
1669function isDeclareClass(node, opts) {
1670 if (!node) return false;
1671 const nodeType = node.type;
1672
1673 if (nodeType === "DeclareClass") {
1674 if (typeof opts === "undefined") {
1675 return true;
1676 } else {
1677 return (0, _shallowEqual.default)(node, opts);
1678 }
1679 }
1680
1681 return false;
1682}
1683
1684function isDeclareFunction(node, opts) {
1685 if (!node) return false;
1686 const nodeType = node.type;
1687
1688 if (nodeType === "DeclareFunction") {
1689 if (typeof opts === "undefined") {
1690 return true;
1691 } else {
1692 return (0, _shallowEqual.default)(node, opts);
1693 }
1694 }
1695
1696 return false;
1697}
1698
1699function isDeclareInterface(node, opts) {
1700 if (!node) return false;
1701 const nodeType = node.type;
1702
1703 if (nodeType === "DeclareInterface") {
1704 if (typeof opts === "undefined") {
1705 return true;
1706 } else {
1707 return (0, _shallowEqual.default)(node, opts);
1708 }
1709 }
1710
1711 return false;
1712}
1713
1714function isDeclareModule(node, opts) {
1715 if (!node) return false;
1716 const nodeType = node.type;
1717
1718 if (nodeType === "DeclareModule") {
1719 if (typeof opts === "undefined") {
1720 return true;
1721 } else {
1722 return (0, _shallowEqual.default)(node, opts);
1723 }
1724 }
1725
1726 return false;
1727}
1728
1729function isDeclareModuleExports(node, opts) {
1730 if (!node) return false;
1731 const nodeType = node.type;
1732
1733 if (nodeType === "DeclareModuleExports") {
1734 if (typeof opts === "undefined") {
1735 return true;
1736 } else {
1737 return (0, _shallowEqual.default)(node, opts);
1738 }
1739 }
1740
1741 return false;
1742}
1743
1744function isDeclareTypeAlias(node, opts) {
1745 if (!node) return false;
1746 const nodeType = node.type;
1747
1748 if (nodeType === "DeclareTypeAlias") {
1749 if (typeof opts === "undefined") {
1750 return true;
1751 } else {
1752 return (0, _shallowEqual.default)(node, opts);
1753 }
1754 }
1755
1756 return false;
1757}
1758
1759function isDeclareOpaqueType(node, opts) {
1760 if (!node) return false;
1761 const nodeType = node.type;
1762
1763 if (nodeType === "DeclareOpaqueType") {
1764 if (typeof opts === "undefined") {
1765 return true;
1766 } else {
1767 return (0, _shallowEqual.default)(node, opts);
1768 }
1769 }
1770
1771 return false;
1772}
1773
1774function isDeclareVariable(node, opts) {
1775 if (!node) return false;
1776 const nodeType = node.type;
1777
1778 if (nodeType === "DeclareVariable") {
1779 if (typeof opts === "undefined") {
1780 return true;
1781 } else {
1782 return (0, _shallowEqual.default)(node, opts);
1783 }
1784 }
1785
1786 return false;
1787}
1788
1789function isDeclareExportDeclaration(node, opts) {
1790 if (!node) return false;
1791 const nodeType = node.type;
1792
1793 if (nodeType === "DeclareExportDeclaration") {
1794 if (typeof opts === "undefined") {
1795 return true;
1796 } else {
1797 return (0, _shallowEqual.default)(node, opts);
1798 }
1799 }
1800
1801 return false;
1802}
1803
1804function isDeclareExportAllDeclaration(node, opts) {
1805 if (!node) return false;
1806 const nodeType = node.type;
1807
1808 if (nodeType === "DeclareExportAllDeclaration") {
1809 if (typeof opts === "undefined") {
1810 return true;
1811 } else {
1812 return (0, _shallowEqual.default)(node, opts);
1813 }
1814 }
1815
1816 return false;
1817}
1818
1819function isDeclaredPredicate(node, opts) {
1820 if (!node) return false;
1821 const nodeType = node.type;
1822
1823 if (nodeType === "DeclaredPredicate") {
1824 if (typeof opts === "undefined") {
1825 return true;
1826 } else {
1827 return (0, _shallowEqual.default)(node, opts);
1828 }
1829 }
1830
1831 return false;
1832}
1833
1834function isExistsTypeAnnotation(node, opts) {
1835 if (!node) return false;
1836 const nodeType = node.type;
1837
1838 if (nodeType === "ExistsTypeAnnotation") {
1839 if (typeof opts === "undefined") {
1840 return true;
1841 } else {
1842 return (0, _shallowEqual.default)(node, opts);
1843 }
1844 }
1845
1846 return false;
1847}
1848
1849function isFunctionTypeAnnotation(node, opts) {
1850 if (!node) return false;
1851 const nodeType = node.type;
1852
1853 if (nodeType === "FunctionTypeAnnotation") {
1854 if (typeof opts === "undefined") {
1855 return true;
1856 } else {
1857 return (0, _shallowEqual.default)(node, opts);
1858 }
1859 }
1860
1861 return false;
1862}
1863
1864function isFunctionTypeParam(node, opts) {
1865 if (!node) return false;
1866 const nodeType = node.type;
1867
1868 if (nodeType === "FunctionTypeParam") {
1869 if (typeof opts === "undefined") {
1870 return true;
1871 } else {
1872 return (0, _shallowEqual.default)(node, opts);
1873 }
1874 }
1875
1876 return false;
1877}
1878
1879function isGenericTypeAnnotation(node, opts) {
1880 if (!node) return false;
1881 const nodeType = node.type;
1882
1883 if (nodeType === "GenericTypeAnnotation") {
1884 if (typeof opts === "undefined") {
1885 return true;
1886 } else {
1887 return (0, _shallowEqual.default)(node, opts);
1888 }
1889 }
1890
1891 return false;
1892}
1893
1894function isInferredPredicate(node, opts) {
1895 if (!node) return false;
1896 const nodeType = node.type;
1897
1898 if (nodeType === "InferredPredicate") {
1899 if (typeof opts === "undefined") {
1900 return true;
1901 } else {
1902 return (0, _shallowEqual.default)(node, opts);
1903 }
1904 }
1905
1906 return false;
1907}
1908
1909function isInterfaceExtends(node, opts) {
1910 if (!node) return false;
1911 const nodeType = node.type;
1912
1913 if (nodeType === "InterfaceExtends") {
1914 if (typeof opts === "undefined") {
1915 return true;
1916 } else {
1917 return (0, _shallowEqual.default)(node, opts);
1918 }
1919 }
1920
1921 return false;
1922}
1923
1924function isInterfaceDeclaration(node, opts) {
1925 if (!node) return false;
1926 const nodeType = node.type;
1927
1928 if (nodeType === "InterfaceDeclaration") {
1929 if (typeof opts === "undefined") {
1930 return true;
1931 } else {
1932 return (0, _shallowEqual.default)(node, opts);
1933 }
1934 }
1935
1936 return false;
1937}
1938
1939function isInterfaceTypeAnnotation(node, opts) {
1940 if (!node) return false;
1941 const nodeType = node.type;
1942
1943 if (nodeType === "InterfaceTypeAnnotation") {
1944 if (typeof opts === "undefined") {
1945 return true;
1946 } else {
1947 return (0, _shallowEqual.default)(node, opts);
1948 }
1949 }
1950
1951 return false;
1952}
1953
1954function isIntersectionTypeAnnotation(node, opts) {
1955 if (!node) return false;
1956 const nodeType = node.type;
1957
1958 if (nodeType === "IntersectionTypeAnnotation") {
1959 if (typeof opts === "undefined") {
1960 return true;
1961 } else {
1962 return (0, _shallowEqual.default)(node, opts);
1963 }
1964 }
1965
1966 return false;
1967}
1968
1969function isMixedTypeAnnotation(node, opts) {
1970 if (!node) return false;
1971 const nodeType = node.type;
1972
1973 if (nodeType === "MixedTypeAnnotation") {
1974 if (typeof opts === "undefined") {
1975 return true;
1976 } else {
1977 return (0, _shallowEqual.default)(node, opts);
1978 }
1979 }
1980
1981 return false;
1982}
1983
1984function isEmptyTypeAnnotation(node, opts) {
1985 if (!node) return false;
1986 const nodeType = node.type;
1987
1988 if (nodeType === "EmptyTypeAnnotation") {
1989 if (typeof opts === "undefined") {
1990 return true;
1991 } else {
1992 return (0, _shallowEqual.default)(node, opts);
1993 }
1994 }
1995
1996 return false;
1997}
1998
1999function isNullableTypeAnnotation(node, opts) {
2000 if (!node) return false;
2001 const nodeType = node.type;
2002
2003 if (nodeType === "NullableTypeAnnotation") {
2004 if (typeof opts === "undefined") {
2005 return true;
2006 } else {
2007 return (0, _shallowEqual.default)(node, opts);
2008 }
2009 }
2010
2011 return false;
2012}
2013
2014function isNumberLiteralTypeAnnotation(node, opts) {
2015 if (!node) return false;
2016 const nodeType = node.type;
2017
2018 if (nodeType === "NumberLiteralTypeAnnotation") {
2019 if (typeof opts === "undefined") {
2020 return true;
2021 } else {
2022 return (0, _shallowEqual.default)(node, opts);
2023 }
2024 }
2025
2026 return false;
2027}
2028
2029function isNumberTypeAnnotation(node, opts) {
2030 if (!node) return false;
2031 const nodeType = node.type;
2032
2033 if (nodeType === "NumberTypeAnnotation") {
2034 if (typeof opts === "undefined") {
2035 return true;
2036 } else {
2037 return (0, _shallowEqual.default)(node, opts);
2038 }
2039 }
2040
2041 return false;
2042}
2043
2044function isObjectTypeAnnotation(node, opts) {
2045 if (!node) return false;
2046 const nodeType = node.type;
2047
2048 if (nodeType === "ObjectTypeAnnotation") {
2049 if (typeof opts === "undefined") {
2050 return true;
2051 } else {
2052 return (0, _shallowEqual.default)(node, opts);
2053 }
2054 }
2055
2056 return false;
2057}
2058
2059function isObjectTypeInternalSlot(node, opts) {
2060 if (!node) return false;
2061 const nodeType = node.type;
2062
2063 if (nodeType === "ObjectTypeInternalSlot") {
2064 if (typeof opts === "undefined") {
2065 return true;
2066 } else {
2067 return (0, _shallowEqual.default)(node, opts);
2068 }
2069 }
2070
2071 return false;
2072}
2073
2074function isObjectTypeCallProperty(node, opts) {
2075 if (!node) return false;
2076 const nodeType = node.type;
2077
2078 if (nodeType === "ObjectTypeCallProperty") {
2079 if (typeof opts === "undefined") {
2080 return true;
2081 } else {
2082 return (0, _shallowEqual.default)(node, opts);
2083 }
2084 }
2085
2086 return false;
2087}
2088
2089function isObjectTypeIndexer(node, opts) {
2090 if (!node) return false;
2091 const nodeType = node.type;
2092
2093 if (nodeType === "ObjectTypeIndexer") {
2094 if (typeof opts === "undefined") {
2095 return true;
2096 } else {
2097 return (0, _shallowEqual.default)(node, opts);
2098 }
2099 }
2100
2101 return false;
2102}
2103
2104function isObjectTypeProperty(node, opts) {
2105 if (!node) return false;
2106 const nodeType = node.type;
2107
2108 if (nodeType === "ObjectTypeProperty") {
2109 if (typeof opts === "undefined") {
2110 return true;
2111 } else {
2112 return (0, _shallowEqual.default)(node, opts);
2113 }
2114 }
2115
2116 return false;
2117}
2118
2119function isObjectTypeSpreadProperty(node, opts) {
2120 if (!node) return false;
2121 const nodeType = node.type;
2122
2123 if (nodeType === "ObjectTypeSpreadProperty") {
2124 if (typeof opts === "undefined") {
2125 return true;
2126 } else {
2127 return (0, _shallowEqual.default)(node, opts);
2128 }
2129 }
2130
2131 return false;
2132}
2133
2134function isOpaqueType(node, opts) {
2135 if (!node) return false;
2136 const nodeType = node.type;
2137
2138 if (nodeType === "OpaqueType") {
2139 if (typeof opts === "undefined") {
2140 return true;
2141 } else {
2142 return (0, _shallowEqual.default)(node, opts);
2143 }
2144 }
2145
2146 return false;
2147}
2148
2149function isQualifiedTypeIdentifier(node, opts) {
2150 if (!node) return false;
2151 const nodeType = node.type;
2152
2153 if (nodeType === "QualifiedTypeIdentifier") {
2154 if (typeof opts === "undefined") {
2155 return true;
2156 } else {
2157 return (0, _shallowEqual.default)(node, opts);
2158 }
2159 }
2160
2161 return false;
2162}
2163
2164function isStringLiteralTypeAnnotation(node, opts) {
2165 if (!node) return false;
2166 const nodeType = node.type;
2167
2168 if (nodeType === "StringLiteralTypeAnnotation") {
2169 if (typeof opts === "undefined") {
2170 return true;
2171 } else {
2172 return (0, _shallowEqual.default)(node, opts);
2173 }
2174 }
2175
2176 return false;
2177}
2178
2179function isStringTypeAnnotation(node, opts) {
2180 if (!node) return false;
2181 const nodeType = node.type;
2182
2183 if (nodeType === "StringTypeAnnotation") {
2184 if (typeof opts === "undefined") {
2185 return true;
2186 } else {
2187 return (0, _shallowEqual.default)(node, opts);
2188 }
2189 }
2190
2191 return false;
2192}
2193
2194function isSymbolTypeAnnotation(node, opts) {
2195 if (!node) return false;
2196 const nodeType = node.type;
2197
2198 if (nodeType === "SymbolTypeAnnotation") {
2199 if (typeof opts === "undefined") {
2200 return true;
2201 } else {
2202 return (0, _shallowEqual.default)(node, opts);
2203 }
2204 }
2205
2206 return false;
2207}
2208
2209function isThisTypeAnnotation(node, opts) {
2210 if (!node) return false;
2211 const nodeType = node.type;
2212
2213 if (nodeType === "ThisTypeAnnotation") {
2214 if (typeof opts === "undefined") {
2215 return true;
2216 } else {
2217 return (0, _shallowEqual.default)(node, opts);
2218 }
2219 }
2220
2221 return false;
2222}
2223
2224function isTupleTypeAnnotation(node, opts) {
2225 if (!node) return false;
2226 const nodeType = node.type;
2227
2228 if (nodeType === "TupleTypeAnnotation") {
2229 if (typeof opts === "undefined") {
2230 return true;
2231 } else {
2232 return (0, _shallowEqual.default)(node, opts);
2233 }
2234 }
2235
2236 return false;
2237}
2238
2239function isTypeofTypeAnnotation(node, opts) {
2240 if (!node) return false;
2241 const nodeType = node.type;
2242
2243 if (nodeType === "TypeofTypeAnnotation") {
2244 if (typeof opts === "undefined") {
2245 return true;
2246 } else {
2247 return (0, _shallowEqual.default)(node, opts);
2248 }
2249 }
2250
2251 return false;
2252}
2253
2254function isTypeAlias(node, opts) {
2255 if (!node) return false;
2256 const nodeType = node.type;
2257
2258 if (nodeType === "TypeAlias") {
2259 if (typeof opts === "undefined") {
2260 return true;
2261 } else {
2262 return (0, _shallowEqual.default)(node, opts);
2263 }
2264 }
2265
2266 return false;
2267}
2268
2269function isTypeAnnotation(node, opts) {
2270 if (!node) return false;
2271 const nodeType = node.type;
2272
2273 if (nodeType === "TypeAnnotation") {
2274 if (typeof opts === "undefined") {
2275 return true;
2276 } else {
2277 return (0, _shallowEqual.default)(node, opts);
2278 }
2279 }
2280
2281 return false;
2282}
2283
2284function isTypeCastExpression(node, opts) {
2285 if (!node) return false;
2286 const nodeType = node.type;
2287
2288 if (nodeType === "TypeCastExpression") {
2289 if (typeof opts === "undefined") {
2290 return true;
2291 } else {
2292 return (0, _shallowEqual.default)(node, opts);
2293 }
2294 }
2295
2296 return false;
2297}
2298
2299function isTypeParameter(node, opts) {
2300 if (!node) return false;
2301 const nodeType = node.type;
2302
2303 if (nodeType === "TypeParameter") {
2304 if (typeof opts === "undefined") {
2305 return true;
2306 } else {
2307 return (0, _shallowEqual.default)(node, opts);
2308 }
2309 }
2310
2311 return false;
2312}
2313
2314function isTypeParameterDeclaration(node, opts) {
2315 if (!node) return false;
2316 const nodeType = node.type;
2317
2318 if (nodeType === "TypeParameterDeclaration") {
2319 if (typeof opts === "undefined") {
2320 return true;
2321 } else {
2322 return (0, _shallowEqual.default)(node, opts);
2323 }
2324 }
2325
2326 return false;
2327}
2328
2329function isTypeParameterInstantiation(node, opts) {
2330 if (!node) return false;
2331 const nodeType = node.type;
2332
2333 if (nodeType === "TypeParameterInstantiation") {
2334 if (typeof opts === "undefined") {
2335 return true;
2336 } else {
2337 return (0, _shallowEqual.default)(node, opts);
2338 }
2339 }
2340
2341 return false;
2342}
2343
2344function isUnionTypeAnnotation(node, opts) {
2345 if (!node) return false;
2346 const nodeType = node.type;
2347
2348 if (nodeType === "UnionTypeAnnotation") {
2349 if (typeof opts === "undefined") {
2350 return true;
2351 } else {
2352 return (0, _shallowEqual.default)(node, opts);
2353 }
2354 }
2355
2356 return false;
2357}
2358
2359function isVariance(node, opts) {
2360 if (!node) return false;
2361 const nodeType = node.type;
2362
2363 if (nodeType === "Variance") {
2364 if (typeof opts === "undefined") {
2365 return true;
2366 } else {
2367 return (0, _shallowEqual.default)(node, opts);
2368 }
2369 }
2370
2371 return false;
2372}
2373
2374function isVoidTypeAnnotation(node, opts) {
2375 if (!node) return false;
2376 const nodeType = node.type;
2377
2378 if (nodeType === "VoidTypeAnnotation") {
2379 if (typeof opts === "undefined") {
2380 return true;
2381 } else {
2382 return (0, _shallowEqual.default)(node, opts);
2383 }
2384 }
2385
2386 return false;
2387}
2388
2389function isEnumDeclaration(node, opts) {
2390 if (!node) return false;
2391 const nodeType = node.type;
2392
2393 if (nodeType === "EnumDeclaration") {
2394 if (typeof opts === "undefined") {
2395 return true;
2396 } else {
2397 return (0, _shallowEqual.default)(node, opts);
2398 }
2399 }
2400
2401 return false;
2402}
2403
2404function isEnumBooleanBody(node, opts) {
2405 if (!node) return false;
2406 const nodeType = node.type;
2407
2408 if (nodeType === "EnumBooleanBody") {
2409 if (typeof opts === "undefined") {
2410 return true;
2411 } else {
2412 return (0, _shallowEqual.default)(node, opts);
2413 }
2414 }
2415
2416 return false;
2417}
2418
2419function isEnumNumberBody(node, opts) {
2420 if (!node) return false;
2421 const nodeType = node.type;
2422
2423 if (nodeType === "EnumNumberBody") {
2424 if (typeof opts === "undefined") {
2425 return true;
2426 } else {
2427 return (0, _shallowEqual.default)(node, opts);
2428 }
2429 }
2430
2431 return false;
2432}
2433
2434function isEnumStringBody(node, opts) {
2435 if (!node) return false;
2436 const nodeType = node.type;
2437
2438 if (nodeType === "EnumStringBody") {
2439 if (typeof opts === "undefined") {
2440 return true;
2441 } else {
2442 return (0, _shallowEqual.default)(node, opts);
2443 }
2444 }
2445
2446 return false;
2447}
2448
2449function isEnumSymbolBody(node, opts) {
2450 if (!node) return false;
2451 const nodeType = node.type;
2452
2453 if (nodeType === "EnumSymbolBody") {
2454 if (typeof opts === "undefined") {
2455 return true;
2456 } else {
2457 return (0, _shallowEqual.default)(node, opts);
2458 }
2459 }
2460
2461 return false;
2462}
2463
2464function isEnumBooleanMember(node, opts) {
2465 if (!node) return false;
2466 const nodeType = node.type;
2467
2468 if (nodeType === "EnumBooleanMember") {
2469 if (typeof opts === "undefined") {
2470 return true;
2471 } else {
2472 return (0, _shallowEqual.default)(node, opts);
2473 }
2474 }
2475
2476 return false;
2477}
2478
2479function isEnumNumberMember(node, opts) {
2480 if (!node) return false;
2481 const nodeType = node.type;
2482
2483 if (nodeType === "EnumNumberMember") {
2484 if (typeof opts === "undefined") {
2485 return true;
2486 } else {
2487 return (0, _shallowEqual.default)(node, opts);
2488 }
2489 }
2490
2491 return false;
2492}
2493
2494function isEnumStringMember(node, opts) {
2495 if (!node) return false;
2496 const nodeType = node.type;
2497
2498 if (nodeType === "EnumStringMember") {
2499 if (typeof opts === "undefined") {
2500 return true;
2501 } else {
2502 return (0, _shallowEqual.default)(node, opts);
2503 }
2504 }
2505
2506 return false;
2507}
2508
2509function isEnumDefaultedMember(node, opts) {
2510 if (!node) return false;
2511 const nodeType = node.type;
2512
2513 if (nodeType === "EnumDefaultedMember") {
2514 if (typeof opts === "undefined") {
2515 return true;
2516 } else {
2517 return (0, _shallowEqual.default)(node, opts);
2518 }
2519 }
2520
2521 return false;
2522}
2523
2524function isIndexedAccessType(node, opts) {
2525 if (!node) return false;
2526 const nodeType = node.type;
2527
2528 if (nodeType === "IndexedAccessType") {
2529 if (typeof opts === "undefined") {
2530 return true;
2531 } else {
2532 return (0, _shallowEqual.default)(node, opts);
2533 }
2534 }
2535
2536 return false;
2537}
2538
2539function isOptionalIndexedAccessType(node, opts) {
2540 if (!node) return false;
2541 const nodeType = node.type;
2542
2543 if (nodeType === "OptionalIndexedAccessType") {
2544 if (typeof opts === "undefined") {
2545 return true;
2546 } else {
2547 return (0, _shallowEqual.default)(node, opts);
2548 }
2549 }
2550
2551 return false;
2552}
2553
2554function isJSXAttribute(node, opts) {
2555 if (!node) return false;
2556 const nodeType = node.type;
2557
2558 if (nodeType === "JSXAttribute") {
2559 if (typeof opts === "undefined") {
2560 return true;
2561 } else {
2562 return (0, _shallowEqual.default)(node, opts);
2563 }
2564 }
2565
2566 return false;
2567}
2568
2569function isJSXClosingElement(node, opts) {
2570 if (!node) return false;
2571 const nodeType = node.type;
2572
2573 if (nodeType === "JSXClosingElement") {
2574 if (typeof opts === "undefined") {
2575 return true;
2576 } else {
2577 return (0, _shallowEqual.default)(node, opts);
2578 }
2579 }
2580
2581 return false;
2582}
2583
2584function isJSXElement(node, opts) {
2585 if (!node) return false;
2586 const nodeType = node.type;
2587
2588 if (nodeType === "JSXElement") {
2589 if (typeof opts === "undefined") {
2590 return true;
2591 } else {
2592 return (0, _shallowEqual.default)(node, opts);
2593 }
2594 }
2595
2596 return false;
2597}
2598
2599function isJSXEmptyExpression(node, opts) {
2600 if (!node) return false;
2601 const nodeType = node.type;
2602
2603 if (nodeType === "JSXEmptyExpression") {
2604 if (typeof opts === "undefined") {
2605 return true;
2606 } else {
2607 return (0, _shallowEqual.default)(node, opts);
2608 }
2609 }
2610
2611 return false;
2612}
2613
2614function isJSXExpressionContainer(node, opts) {
2615 if (!node) return false;
2616 const nodeType = node.type;
2617
2618 if (nodeType === "JSXExpressionContainer") {
2619 if (typeof opts === "undefined") {
2620 return true;
2621 } else {
2622 return (0, _shallowEqual.default)(node, opts);
2623 }
2624 }
2625
2626 return false;
2627}
2628
2629function isJSXSpreadChild(node, opts) {
2630 if (!node) return false;
2631 const nodeType = node.type;
2632
2633 if (nodeType === "JSXSpreadChild") {
2634 if (typeof opts === "undefined") {
2635 return true;
2636 } else {
2637 return (0, _shallowEqual.default)(node, opts);
2638 }
2639 }
2640
2641 return false;
2642}
2643
2644function isJSXIdentifier(node, opts) {
2645 if (!node) return false;
2646 const nodeType = node.type;
2647
2648 if (nodeType === "JSXIdentifier") {
2649 if (typeof opts === "undefined") {
2650 return true;
2651 } else {
2652 return (0, _shallowEqual.default)(node, opts);
2653 }
2654 }
2655
2656 return false;
2657}
2658
2659function isJSXMemberExpression(node, opts) {
2660 if (!node) return false;
2661 const nodeType = node.type;
2662
2663 if (nodeType === "JSXMemberExpression") {
2664 if (typeof opts === "undefined") {
2665 return true;
2666 } else {
2667 return (0, _shallowEqual.default)(node, opts);
2668 }
2669 }
2670
2671 return false;
2672}
2673
2674function isJSXNamespacedName(node, opts) {
2675 if (!node) return false;
2676 const nodeType = node.type;
2677
2678 if (nodeType === "JSXNamespacedName") {
2679 if (typeof opts === "undefined") {
2680 return true;
2681 } else {
2682 return (0, _shallowEqual.default)(node, opts);
2683 }
2684 }
2685
2686 return false;
2687}
2688
2689function isJSXOpeningElement(node, opts) {
2690 if (!node) return false;
2691 const nodeType = node.type;
2692
2693 if (nodeType === "JSXOpeningElement") {
2694 if (typeof opts === "undefined") {
2695 return true;
2696 } else {
2697 return (0, _shallowEqual.default)(node, opts);
2698 }
2699 }
2700
2701 return false;
2702}
2703
2704function isJSXSpreadAttribute(node, opts) {
2705 if (!node) return false;
2706 const nodeType = node.type;
2707
2708 if (nodeType === "JSXSpreadAttribute") {
2709 if (typeof opts === "undefined") {
2710 return true;
2711 } else {
2712 return (0, _shallowEqual.default)(node, opts);
2713 }
2714 }
2715
2716 return false;
2717}
2718
2719function isJSXText(node, opts) {
2720 if (!node) return false;
2721 const nodeType = node.type;
2722
2723 if (nodeType === "JSXText") {
2724 if (typeof opts === "undefined") {
2725 return true;
2726 } else {
2727 return (0, _shallowEqual.default)(node, opts);
2728 }
2729 }
2730
2731 return false;
2732}
2733
2734function isJSXFragment(node, opts) {
2735 if (!node) return false;
2736 const nodeType = node.type;
2737
2738 if (nodeType === "JSXFragment") {
2739 if (typeof opts === "undefined") {
2740 return true;
2741 } else {
2742 return (0, _shallowEqual.default)(node, opts);
2743 }
2744 }
2745
2746 return false;
2747}
2748
2749function isJSXOpeningFragment(node, opts) {
2750 if (!node) return false;
2751 const nodeType = node.type;
2752
2753 if (nodeType === "JSXOpeningFragment") {
2754 if (typeof opts === "undefined") {
2755 return true;
2756 } else {
2757 return (0, _shallowEqual.default)(node, opts);
2758 }
2759 }
2760
2761 return false;
2762}
2763
2764function isJSXClosingFragment(node, opts) {
2765 if (!node) return false;
2766 const nodeType = node.type;
2767
2768 if (nodeType === "JSXClosingFragment") {
2769 if (typeof opts === "undefined") {
2770 return true;
2771 } else {
2772 return (0, _shallowEqual.default)(node, opts);
2773 }
2774 }
2775
2776 return false;
2777}
2778
2779function isNoop(node, opts) {
2780 if (!node) return false;
2781 const nodeType = node.type;
2782
2783 if (nodeType === "Noop") {
2784 if (typeof opts === "undefined") {
2785 return true;
2786 } else {
2787 return (0, _shallowEqual.default)(node, opts);
2788 }
2789 }
2790
2791 return false;
2792}
2793
2794function isPlaceholder(node, opts) {
2795 if (!node) return false;
2796 const nodeType = node.type;
2797
2798 if (nodeType === "Placeholder") {
2799 if (typeof opts === "undefined") {
2800 return true;
2801 } else {
2802 return (0, _shallowEqual.default)(node, opts);
2803 }
2804 }
2805
2806 return false;
2807}
2808
2809function isV8IntrinsicIdentifier(node, opts) {
2810 if (!node) return false;
2811 const nodeType = node.type;
2812
2813 if (nodeType === "V8IntrinsicIdentifier") {
2814 if (typeof opts === "undefined") {
2815 return true;
2816 } else {
2817 return (0, _shallowEqual.default)(node, opts);
2818 }
2819 }
2820
2821 return false;
2822}
2823
2824function isArgumentPlaceholder(node, opts) {
2825 if (!node) return false;
2826 const nodeType = node.type;
2827
2828 if (nodeType === "ArgumentPlaceholder") {
2829 if (typeof opts === "undefined") {
2830 return true;
2831 } else {
2832 return (0, _shallowEqual.default)(node, opts);
2833 }
2834 }
2835
2836 return false;
2837}
2838
2839function isBindExpression(node, opts) {
2840 if (!node) return false;
2841 const nodeType = node.type;
2842
2843 if (nodeType === "BindExpression") {
2844 if (typeof opts === "undefined") {
2845 return true;
2846 } else {
2847 return (0, _shallowEqual.default)(node, opts);
2848 }
2849 }
2850
2851 return false;
2852}
2853
2854function isImportAttribute(node, opts) {
2855 if (!node) return false;
2856 const nodeType = node.type;
2857
2858 if (nodeType === "ImportAttribute") {
2859 if (typeof opts === "undefined") {
2860 return true;
2861 } else {
2862 return (0, _shallowEqual.default)(node, opts);
2863 }
2864 }
2865
2866 return false;
2867}
2868
2869function isDecorator(node, opts) {
2870 if (!node) return false;
2871 const nodeType = node.type;
2872
2873 if (nodeType === "Decorator") {
2874 if (typeof opts === "undefined") {
2875 return true;
2876 } else {
2877 return (0, _shallowEqual.default)(node, opts);
2878 }
2879 }
2880
2881 return false;
2882}
2883
2884function isDoExpression(node, opts) {
2885 if (!node) return false;
2886 const nodeType = node.type;
2887
2888 if (nodeType === "DoExpression") {
2889 if (typeof opts === "undefined") {
2890 return true;
2891 } else {
2892 return (0, _shallowEqual.default)(node, opts);
2893 }
2894 }
2895
2896 return false;
2897}
2898
2899function isExportDefaultSpecifier(node, opts) {
2900 if (!node) return false;
2901 const nodeType = node.type;
2902
2903 if (nodeType === "ExportDefaultSpecifier") {
2904 if (typeof opts === "undefined") {
2905 return true;
2906 } else {
2907 return (0, _shallowEqual.default)(node, opts);
2908 }
2909 }
2910
2911 return false;
2912}
2913
2914function isRecordExpression(node, opts) {
2915 if (!node) return false;
2916 const nodeType = node.type;
2917
2918 if (nodeType === "RecordExpression") {
2919 if (typeof opts === "undefined") {
2920 return true;
2921 } else {
2922 return (0, _shallowEqual.default)(node, opts);
2923 }
2924 }
2925
2926 return false;
2927}
2928
2929function isTupleExpression(node, opts) {
2930 if (!node) return false;
2931 const nodeType = node.type;
2932
2933 if (nodeType === "TupleExpression") {
2934 if (typeof opts === "undefined") {
2935 return true;
2936 } else {
2937 return (0, _shallowEqual.default)(node, opts);
2938 }
2939 }
2940
2941 return false;
2942}
2943
2944function isDecimalLiteral(node, opts) {
2945 if (!node) return false;
2946 const nodeType = node.type;
2947
2948 if (nodeType === "DecimalLiteral") {
2949 if (typeof opts === "undefined") {
2950 return true;
2951 } else {
2952 return (0, _shallowEqual.default)(node, opts);
2953 }
2954 }
2955
2956 return false;
2957}
2958
2959function isStaticBlock(node, opts) {
2960 if (!node) return false;
2961 const nodeType = node.type;
2962
2963 if (nodeType === "StaticBlock") {
2964 if (typeof opts === "undefined") {
2965 return true;
2966 } else {
2967 return (0, _shallowEqual.default)(node, opts);
2968 }
2969 }
2970
2971 return false;
2972}
2973
2974function isModuleExpression(node, opts) {
2975 if (!node) return false;
2976 const nodeType = node.type;
2977
2978 if (nodeType === "ModuleExpression") {
2979 if (typeof opts === "undefined") {
2980 return true;
2981 } else {
2982 return (0, _shallowEqual.default)(node, opts);
2983 }
2984 }
2985
2986 return false;
2987}
2988
2989function isTopicReference(node, opts) {
2990 if (!node) return false;
2991 const nodeType = node.type;
2992
2993 if (nodeType === "TopicReference") {
2994 if (typeof opts === "undefined") {
2995 return true;
2996 } else {
2997 return (0, _shallowEqual.default)(node, opts);
2998 }
2999 }
3000
3001 return false;
3002}
3003
3004function isPipelineTopicExpression(node, opts) {
3005 if (!node) return false;
3006 const nodeType = node.type;
3007
3008 if (nodeType === "PipelineTopicExpression") {
3009 if (typeof opts === "undefined") {
3010 return true;
3011 } else {
3012 return (0, _shallowEqual.default)(node, opts);
3013 }
3014 }
3015
3016 return false;
3017}
3018
3019function isPipelineBareFunction(node, opts) {
3020 if (!node) return false;
3021 const nodeType = node.type;
3022
3023 if (nodeType === "PipelineBareFunction") {
3024 if (typeof opts === "undefined") {
3025 return true;
3026 } else {
3027 return (0, _shallowEqual.default)(node, opts);
3028 }
3029 }
3030
3031 return false;
3032}
3033
3034function isPipelinePrimaryTopicReference(node, opts) {
3035 if (!node) return false;
3036 const nodeType = node.type;
3037
3038 if (nodeType === "PipelinePrimaryTopicReference") {
3039 if (typeof opts === "undefined") {
3040 return true;
3041 } else {
3042 return (0, _shallowEqual.default)(node, opts);
3043 }
3044 }
3045
3046 return false;
3047}
3048
3049function isTSParameterProperty(node, opts) {
3050 if (!node) return false;
3051 const nodeType = node.type;
3052
3053 if (nodeType === "TSParameterProperty") {
3054 if (typeof opts === "undefined") {
3055 return true;
3056 } else {
3057 return (0, _shallowEqual.default)(node, opts);
3058 }
3059 }
3060
3061 return false;
3062}
3063
3064function isTSDeclareFunction(node, opts) {
3065 if (!node) return false;
3066 const nodeType = node.type;
3067
3068 if (nodeType === "TSDeclareFunction") {
3069 if (typeof opts === "undefined") {
3070 return true;
3071 } else {
3072 return (0, _shallowEqual.default)(node, opts);
3073 }
3074 }
3075
3076 return false;
3077}
3078
3079function isTSDeclareMethod(node, opts) {
3080 if (!node) return false;
3081 const nodeType = node.type;
3082
3083 if (nodeType === "TSDeclareMethod") {
3084 if (typeof opts === "undefined") {
3085 return true;
3086 } else {
3087 return (0, _shallowEqual.default)(node, opts);
3088 }
3089 }
3090
3091 return false;
3092}
3093
3094function isTSQualifiedName(node, opts) {
3095 if (!node) return false;
3096 const nodeType = node.type;
3097
3098 if (nodeType === "TSQualifiedName") {
3099 if (typeof opts === "undefined") {
3100 return true;
3101 } else {
3102 return (0, _shallowEqual.default)(node, opts);
3103 }
3104 }
3105
3106 return false;
3107}
3108
3109function isTSCallSignatureDeclaration(node, opts) {
3110 if (!node) return false;
3111 const nodeType = node.type;
3112
3113 if (nodeType === "TSCallSignatureDeclaration") {
3114 if (typeof opts === "undefined") {
3115 return true;
3116 } else {
3117 return (0, _shallowEqual.default)(node, opts);
3118 }
3119 }
3120
3121 return false;
3122}
3123
3124function isTSConstructSignatureDeclaration(node, opts) {
3125 if (!node) return false;
3126 const nodeType = node.type;
3127
3128 if (nodeType === "TSConstructSignatureDeclaration") {
3129 if (typeof opts === "undefined") {
3130 return true;
3131 } else {
3132 return (0, _shallowEqual.default)(node, opts);
3133 }
3134 }
3135
3136 return false;
3137}
3138
3139function isTSPropertySignature(node, opts) {
3140 if (!node) return false;
3141 const nodeType = node.type;
3142
3143 if (nodeType === "TSPropertySignature") {
3144 if (typeof opts === "undefined") {
3145 return true;
3146 } else {
3147 return (0, _shallowEqual.default)(node, opts);
3148 }
3149 }
3150
3151 return false;
3152}
3153
3154function isTSMethodSignature(node, opts) {
3155 if (!node) return false;
3156 const nodeType = node.type;
3157
3158 if (nodeType === "TSMethodSignature") {
3159 if (typeof opts === "undefined") {
3160 return true;
3161 } else {
3162 return (0, _shallowEqual.default)(node, opts);
3163 }
3164 }
3165
3166 return false;
3167}
3168
3169function isTSIndexSignature(node, opts) {
3170 if (!node) return false;
3171 const nodeType = node.type;
3172
3173 if (nodeType === "TSIndexSignature") {
3174 if (typeof opts === "undefined") {
3175 return true;
3176 } else {
3177 return (0, _shallowEqual.default)(node, opts);
3178 }
3179 }
3180
3181 return false;
3182}
3183
3184function isTSAnyKeyword(node, opts) {
3185 if (!node) return false;
3186 const nodeType = node.type;
3187
3188 if (nodeType === "TSAnyKeyword") {
3189 if (typeof opts === "undefined") {
3190 return true;
3191 } else {
3192 return (0, _shallowEqual.default)(node, opts);
3193 }
3194 }
3195
3196 return false;
3197}
3198
3199function isTSBooleanKeyword(node, opts) {
3200 if (!node) return false;
3201 const nodeType = node.type;
3202
3203 if (nodeType === "TSBooleanKeyword") {
3204 if (typeof opts === "undefined") {
3205 return true;
3206 } else {
3207 return (0, _shallowEqual.default)(node, opts);
3208 }
3209 }
3210
3211 return false;
3212}
3213
3214function isTSBigIntKeyword(node, opts) {
3215 if (!node) return false;
3216 const nodeType = node.type;
3217
3218 if (nodeType === "TSBigIntKeyword") {
3219 if (typeof opts === "undefined") {
3220 return true;
3221 } else {
3222 return (0, _shallowEqual.default)(node, opts);
3223 }
3224 }
3225
3226 return false;
3227}
3228
3229function isTSIntrinsicKeyword(node, opts) {
3230 if (!node) return false;
3231 const nodeType = node.type;
3232
3233 if (nodeType === "TSIntrinsicKeyword") {
3234 if (typeof opts === "undefined") {
3235 return true;
3236 } else {
3237 return (0, _shallowEqual.default)(node, opts);
3238 }
3239 }
3240
3241 return false;
3242}
3243
3244function isTSNeverKeyword(node, opts) {
3245 if (!node) return false;
3246 const nodeType = node.type;
3247
3248 if (nodeType === "TSNeverKeyword") {
3249 if (typeof opts === "undefined") {
3250 return true;
3251 } else {
3252 return (0, _shallowEqual.default)(node, opts);
3253 }
3254 }
3255
3256 return false;
3257}
3258
3259function isTSNullKeyword(node, opts) {
3260 if (!node) return false;
3261 const nodeType = node.type;
3262
3263 if (nodeType === "TSNullKeyword") {
3264 if (typeof opts === "undefined") {
3265 return true;
3266 } else {
3267 return (0, _shallowEqual.default)(node, opts);
3268 }
3269 }
3270
3271 return false;
3272}
3273
3274function isTSNumberKeyword(node, opts) {
3275 if (!node) return false;
3276 const nodeType = node.type;
3277
3278 if (nodeType === "TSNumberKeyword") {
3279 if (typeof opts === "undefined") {
3280 return true;
3281 } else {
3282 return (0, _shallowEqual.default)(node, opts);
3283 }
3284 }
3285
3286 return false;
3287}
3288
3289function isTSObjectKeyword(node, opts) {
3290 if (!node) return false;
3291 const nodeType = node.type;
3292
3293 if (nodeType === "TSObjectKeyword") {
3294 if (typeof opts === "undefined") {
3295 return true;
3296 } else {
3297 return (0, _shallowEqual.default)(node, opts);
3298 }
3299 }
3300
3301 return false;
3302}
3303
3304function isTSStringKeyword(node, opts) {
3305 if (!node) return false;
3306 const nodeType = node.type;
3307
3308 if (nodeType === "TSStringKeyword") {
3309 if (typeof opts === "undefined") {
3310 return true;
3311 } else {
3312 return (0, _shallowEqual.default)(node, opts);
3313 }
3314 }
3315
3316 return false;
3317}
3318
3319function isTSSymbolKeyword(node, opts) {
3320 if (!node) return false;
3321 const nodeType = node.type;
3322
3323 if (nodeType === "TSSymbolKeyword") {
3324 if (typeof opts === "undefined") {
3325 return true;
3326 } else {
3327 return (0, _shallowEqual.default)(node, opts);
3328 }
3329 }
3330
3331 return false;
3332}
3333
3334function isTSUndefinedKeyword(node, opts) {
3335 if (!node) return false;
3336 const nodeType = node.type;
3337
3338 if (nodeType === "TSUndefinedKeyword") {
3339 if (typeof opts === "undefined") {
3340 return true;
3341 } else {
3342 return (0, _shallowEqual.default)(node, opts);
3343 }
3344 }
3345
3346 return false;
3347}
3348
3349function isTSUnknownKeyword(node, opts) {
3350 if (!node) return false;
3351 const nodeType = node.type;
3352
3353 if (nodeType === "TSUnknownKeyword") {
3354 if (typeof opts === "undefined") {
3355 return true;
3356 } else {
3357 return (0, _shallowEqual.default)(node, opts);
3358 }
3359 }
3360
3361 return false;
3362}
3363
3364function isTSVoidKeyword(node, opts) {
3365 if (!node) return false;
3366 const nodeType = node.type;
3367
3368 if (nodeType === "TSVoidKeyword") {
3369 if (typeof opts === "undefined") {
3370 return true;
3371 } else {
3372 return (0, _shallowEqual.default)(node, opts);
3373 }
3374 }
3375
3376 return false;
3377}
3378
3379function isTSThisType(node, opts) {
3380 if (!node) return false;
3381 const nodeType = node.type;
3382
3383 if (nodeType === "TSThisType") {
3384 if (typeof opts === "undefined") {
3385 return true;
3386 } else {
3387 return (0, _shallowEqual.default)(node, opts);
3388 }
3389 }
3390
3391 return false;
3392}
3393
3394function isTSFunctionType(node, opts) {
3395 if (!node) return false;
3396 const nodeType = node.type;
3397
3398 if (nodeType === "TSFunctionType") {
3399 if (typeof opts === "undefined") {
3400 return true;
3401 } else {
3402 return (0, _shallowEqual.default)(node, opts);
3403 }
3404 }
3405
3406 return false;
3407}
3408
3409function isTSConstructorType(node, opts) {
3410 if (!node) return false;
3411 const nodeType = node.type;
3412
3413 if (nodeType === "TSConstructorType") {
3414 if (typeof opts === "undefined") {
3415 return true;
3416 } else {
3417 return (0, _shallowEqual.default)(node, opts);
3418 }
3419 }
3420
3421 return false;
3422}
3423
3424function isTSTypeReference(node, opts) {
3425 if (!node) return false;
3426 const nodeType = node.type;
3427
3428 if (nodeType === "TSTypeReference") {
3429 if (typeof opts === "undefined") {
3430 return true;
3431 } else {
3432 return (0, _shallowEqual.default)(node, opts);
3433 }
3434 }
3435
3436 return false;
3437}
3438
3439function isTSTypePredicate(node, opts) {
3440 if (!node) return false;
3441 const nodeType = node.type;
3442
3443 if (nodeType === "TSTypePredicate") {
3444 if (typeof opts === "undefined") {
3445 return true;
3446 } else {
3447 return (0, _shallowEqual.default)(node, opts);
3448 }
3449 }
3450
3451 return false;
3452}
3453
3454function isTSTypeQuery(node, opts) {
3455 if (!node) return false;
3456 const nodeType = node.type;
3457
3458 if (nodeType === "TSTypeQuery") {
3459 if (typeof opts === "undefined") {
3460 return true;
3461 } else {
3462 return (0, _shallowEqual.default)(node, opts);
3463 }
3464 }
3465
3466 return false;
3467}
3468
3469function isTSTypeLiteral(node, opts) {
3470 if (!node) return false;
3471 const nodeType = node.type;
3472
3473 if (nodeType === "TSTypeLiteral") {
3474 if (typeof opts === "undefined") {
3475 return true;
3476 } else {
3477 return (0, _shallowEqual.default)(node, opts);
3478 }
3479 }
3480
3481 return false;
3482}
3483
3484function isTSArrayType(node, opts) {
3485 if (!node) return false;
3486 const nodeType = node.type;
3487
3488 if (nodeType === "TSArrayType") {
3489 if (typeof opts === "undefined") {
3490 return true;
3491 } else {
3492 return (0, _shallowEqual.default)(node, opts);
3493 }
3494 }
3495
3496 return false;
3497}
3498
3499function isTSTupleType(node, opts) {
3500 if (!node) return false;
3501 const nodeType = node.type;
3502
3503 if (nodeType === "TSTupleType") {
3504 if (typeof opts === "undefined") {
3505 return true;
3506 } else {
3507 return (0, _shallowEqual.default)(node, opts);
3508 }
3509 }
3510
3511 return false;
3512}
3513
3514function isTSOptionalType(node, opts) {
3515 if (!node) return false;
3516 const nodeType = node.type;
3517
3518 if (nodeType === "TSOptionalType") {
3519 if (typeof opts === "undefined") {
3520 return true;
3521 } else {
3522 return (0, _shallowEqual.default)(node, opts);
3523 }
3524 }
3525
3526 return false;
3527}
3528
3529function isTSRestType(node, opts) {
3530 if (!node) return false;
3531 const nodeType = node.type;
3532
3533 if (nodeType === "TSRestType") {
3534 if (typeof opts === "undefined") {
3535 return true;
3536 } else {
3537 return (0, _shallowEqual.default)(node, opts);
3538 }
3539 }
3540
3541 return false;
3542}
3543
3544function isTSNamedTupleMember(node, opts) {
3545 if (!node) return false;
3546 const nodeType = node.type;
3547
3548 if (nodeType === "TSNamedTupleMember") {
3549 if (typeof opts === "undefined") {
3550 return true;
3551 } else {
3552 return (0, _shallowEqual.default)(node, opts);
3553 }
3554 }
3555
3556 return false;
3557}
3558
3559function isTSUnionType(node, opts) {
3560 if (!node) return false;
3561 const nodeType = node.type;
3562
3563 if (nodeType === "TSUnionType") {
3564 if (typeof opts === "undefined") {
3565 return true;
3566 } else {
3567 return (0, _shallowEqual.default)(node, opts);
3568 }
3569 }
3570
3571 return false;
3572}
3573
3574function isTSIntersectionType(node, opts) {
3575 if (!node) return false;
3576 const nodeType = node.type;
3577
3578 if (nodeType === "TSIntersectionType") {
3579 if (typeof opts === "undefined") {
3580 return true;
3581 } else {
3582 return (0, _shallowEqual.default)(node, opts);
3583 }
3584 }
3585
3586 return false;
3587}
3588
3589function isTSConditionalType(node, opts) {
3590 if (!node) return false;
3591 const nodeType = node.type;
3592
3593 if (nodeType === "TSConditionalType") {
3594 if (typeof opts === "undefined") {
3595 return true;
3596 } else {
3597 return (0, _shallowEqual.default)(node, opts);
3598 }
3599 }
3600
3601 return false;
3602}
3603
3604function isTSInferType(node, opts) {
3605 if (!node) return false;
3606 const nodeType = node.type;
3607
3608 if (nodeType === "TSInferType") {
3609 if (typeof opts === "undefined") {
3610 return true;
3611 } else {
3612 return (0, _shallowEqual.default)(node, opts);
3613 }
3614 }
3615
3616 return false;
3617}
3618
3619function isTSParenthesizedType(node, opts) {
3620 if (!node) return false;
3621 const nodeType = node.type;
3622
3623 if (nodeType === "TSParenthesizedType") {
3624 if (typeof opts === "undefined") {
3625 return true;
3626 } else {
3627 return (0, _shallowEqual.default)(node, opts);
3628 }
3629 }
3630
3631 return false;
3632}
3633
3634function isTSTypeOperator(node, opts) {
3635 if (!node) return false;
3636 const nodeType = node.type;
3637
3638 if (nodeType === "TSTypeOperator") {
3639 if (typeof opts === "undefined") {
3640 return true;
3641 } else {
3642 return (0, _shallowEqual.default)(node, opts);
3643 }
3644 }
3645
3646 return false;
3647}
3648
3649function isTSIndexedAccessType(node, opts) {
3650 if (!node) return false;
3651 const nodeType = node.type;
3652
3653 if (nodeType === "TSIndexedAccessType") {
3654 if (typeof opts === "undefined") {
3655 return true;
3656 } else {
3657 return (0, _shallowEqual.default)(node, opts);
3658 }
3659 }
3660
3661 return false;
3662}
3663
3664function isTSMappedType(node, opts) {
3665 if (!node) return false;
3666 const nodeType = node.type;
3667
3668 if (nodeType === "TSMappedType") {
3669 if (typeof opts === "undefined") {
3670 return true;
3671 } else {
3672 return (0, _shallowEqual.default)(node, opts);
3673 }
3674 }
3675
3676 return false;
3677}
3678
3679function isTSLiteralType(node, opts) {
3680 if (!node) return false;
3681 const nodeType = node.type;
3682
3683 if (nodeType === "TSLiteralType") {
3684 if (typeof opts === "undefined") {
3685 return true;
3686 } else {
3687 return (0, _shallowEqual.default)(node, opts);
3688 }
3689 }
3690
3691 return false;
3692}
3693
3694function isTSExpressionWithTypeArguments(node, opts) {
3695 if (!node) return false;
3696 const nodeType = node.type;
3697
3698 if (nodeType === "TSExpressionWithTypeArguments") {
3699 if (typeof opts === "undefined") {
3700 return true;
3701 } else {
3702 return (0, _shallowEqual.default)(node, opts);
3703 }
3704 }
3705
3706 return false;
3707}
3708
3709function isTSInterfaceDeclaration(node, opts) {
3710 if (!node) return false;
3711 const nodeType = node.type;
3712
3713 if (nodeType === "TSInterfaceDeclaration") {
3714 if (typeof opts === "undefined") {
3715 return true;
3716 } else {
3717 return (0, _shallowEqual.default)(node, opts);
3718 }
3719 }
3720
3721 return false;
3722}
3723
3724function isTSInterfaceBody(node, opts) {
3725 if (!node) return false;
3726 const nodeType = node.type;
3727
3728 if (nodeType === "TSInterfaceBody") {
3729 if (typeof opts === "undefined") {
3730 return true;
3731 } else {
3732 return (0, _shallowEqual.default)(node, opts);
3733 }
3734 }
3735
3736 return false;
3737}
3738
3739function isTSTypeAliasDeclaration(node, opts) {
3740 if (!node) return false;
3741 const nodeType = node.type;
3742
3743 if (nodeType === "TSTypeAliasDeclaration") {
3744 if (typeof opts === "undefined") {
3745 return true;
3746 } else {
3747 return (0, _shallowEqual.default)(node, opts);
3748 }
3749 }
3750
3751 return false;
3752}
3753
3754function isTSAsExpression(node, opts) {
3755 if (!node) return false;
3756 const nodeType = node.type;
3757
3758 if (nodeType === "TSAsExpression") {
3759 if (typeof opts === "undefined") {
3760 return true;
3761 } else {
3762 return (0, _shallowEqual.default)(node, opts);
3763 }
3764 }
3765
3766 return false;
3767}
3768
3769function isTSTypeAssertion(node, opts) {
3770 if (!node) return false;
3771 const nodeType = node.type;
3772
3773 if (nodeType === "TSTypeAssertion") {
3774 if (typeof opts === "undefined") {
3775 return true;
3776 } else {
3777 return (0, _shallowEqual.default)(node, opts);
3778 }
3779 }
3780
3781 return false;
3782}
3783
3784function isTSEnumDeclaration(node, opts) {
3785 if (!node) return false;
3786 const nodeType = node.type;
3787
3788 if (nodeType === "TSEnumDeclaration") {
3789 if (typeof opts === "undefined") {
3790 return true;
3791 } else {
3792 return (0, _shallowEqual.default)(node, opts);
3793 }
3794 }
3795
3796 return false;
3797}
3798
3799function isTSEnumMember(node, opts) {
3800 if (!node) return false;
3801 const nodeType = node.type;
3802
3803 if (nodeType === "TSEnumMember") {
3804 if (typeof opts === "undefined") {
3805 return true;
3806 } else {
3807 return (0, _shallowEqual.default)(node, opts);
3808 }
3809 }
3810
3811 return false;
3812}
3813
3814function isTSModuleDeclaration(node, opts) {
3815 if (!node) return false;
3816 const nodeType = node.type;
3817
3818 if (nodeType === "TSModuleDeclaration") {
3819 if (typeof opts === "undefined") {
3820 return true;
3821 } else {
3822 return (0, _shallowEqual.default)(node, opts);
3823 }
3824 }
3825
3826 return false;
3827}
3828
3829function isTSModuleBlock(node, opts) {
3830 if (!node) return false;
3831 const nodeType = node.type;
3832
3833 if (nodeType === "TSModuleBlock") {
3834 if (typeof opts === "undefined") {
3835 return true;
3836 } else {
3837 return (0, _shallowEqual.default)(node, opts);
3838 }
3839 }
3840
3841 return false;
3842}
3843
3844function isTSImportType(node, opts) {
3845 if (!node) return false;
3846 const nodeType = node.type;
3847
3848 if (nodeType === "TSImportType") {
3849 if (typeof opts === "undefined") {
3850 return true;
3851 } else {
3852 return (0, _shallowEqual.default)(node, opts);
3853 }
3854 }
3855
3856 return false;
3857}
3858
3859function isTSImportEqualsDeclaration(node, opts) {
3860 if (!node) return false;
3861 const nodeType = node.type;
3862
3863 if (nodeType === "TSImportEqualsDeclaration") {
3864 if (typeof opts === "undefined") {
3865 return true;
3866 } else {
3867 return (0, _shallowEqual.default)(node, opts);
3868 }
3869 }
3870
3871 return false;
3872}
3873
3874function isTSExternalModuleReference(node, opts) {
3875 if (!node) return false;
3876 const nodeType = node.type;
3877
3878 if (nodeType === "TSExternalModuleReference") {
3879 if (typeof opts === "undefined") {
3880 return true;
3881 } else {
3882 return (0, _shallowEqual.default)(node, opts);
3883 }
3884 }
3885
3886 return false;
3887}
3888
3889function isTSNonNullExpression(node, opts) {
3890 if (!node) return false;
3891 const nodeType = node.type;
3892
3893 if (nodeType === "TSNonNullExpression") {
3894 if (typeof opts === "undefined") {
3895 return true;
3896 } else {
3897 return (0, _shallowEqual.default)(node, opts);
3898 }
3899 }
3900
3901 return false;
3902}
3903
3904function isTSExportAssignment(node, opts) {
3905 if (!node) return false;
3906 const nodeType = node.type;
3907
3908 if (nodeType === "TSExportAssignment") {
3909 if (typeof opts === "undefined") {
3910 return true;
3911 } else {
3912 return (0, _shallowEqual.default)(node, opts);
3913 }
3914 }
3915
3916 return false;
3917}
3918
3919function isTSNamespaceExportDeclaration(node, opts) {
3920 if (!node) return false;
3921 const nodeType = node.type;
3922
3923 if (nodeType === "TSNamespaceExportDeclaration") {
3924 if (typeof opts === "undefined") {
3925 return true;
3926 } else {
3927 return (0, _shallowEqual.default)(node, opts);
3928 }
3929 }
3930
3931 return false;
3932}
3933
3934function isTSTypeAnnotation(node, opts) {
3935 if (!node) return false;
3936 const nodeType = node.type;
3937
3938 if (nodeType === "TSTypeAnnotation") {
3939 if (typeof opts === "undefined") {
3940 return true;
3941 } else {
3942 return (0, _shallowEqual.default)(node, opts);
3943 }
3944 }
3945
3946 return false;
3947}
3948
3949function isTSTypeParameterInstantiation(node, opts) {
3950 if (!node) return false;
3951 const nodeType = node.type;
3952
3953 if (nodeType === "TSTypeParameterInstantiation") {
3954 if (typeof opts === "undefined") {
3955 return true;
3956 } else {
3957 return (0, _shallowEqual.default)(node, opts);
3958 }
3959 }
3960
3961 return false;
3962}
3963
3964function isTSTypeParameterDeclaration(node, opts) {
3965 if (!node) return false;
3966 const nodeType = node.type;
3967
3968 if (nodeType === "TSTypeParameterDeclaration") {
3969 if (typeof opts === "undefined") {
3970 return true;
3971 } else {
3972 return (0, _shallowEqual.default)(node, opts);
3973 }
3974 }
3975
3976 return false;
3977}
3978
3979function isTSTypeParameter(node, opts) {
3980 if (!node) return false;
3981 const nodeType = node.type;
3982
3983 if (nodeType === "TSTypeParameter") {
3984 if (typeof opts === "undefined") {
3985 return true;
3986 } else {
3987 return (0, _shallowEqual.default)(node, opts);
3988 }
3989 }
3990
3991 return false;
3992}
3993
3994function isExpression(node, opts) {
3995 if (!node) return false;
3996 const nodeType = node.type;
3997
3998 if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TopicReference" === nodeType || "PipelineTopicExpression" === nodeType || "PipelineBareFunction" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
3999 if (typeof opts === "undefined") {
4000 return true;
4001 } else {
4002 return (0, _shallowEqual.default)(node, opts);
4003 }
4004 }
4005
4006 return false;
4007}
4008
4009function isBinary(node, opts) {
4010 if (!node) return false;
4011 const nodeType = node.type;
4012
4013 if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
4014 if (typeof opts === "undefined") {
4015 return true;
4016 } else {
4017 return (0, _shallowEqual.default)(node, opts);
4018 }
4019 }
4020
4021 return false;
4022}
4023
4024function isScopable(node, opts) {
4025 if (!node) return false;
4026 const nodeType = node.type;
4027
4028 if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
4029 if (typeof opts === "undefined") {
4030 return true;
4031 } else {
4032 return (0, _shallowEqual.default)(node, opts);
4033 }
4034 }
4035
4036 return false;
4037}
4038
4039function isBlockParent(node, opts) {
4040 if (!node) return false;
4041 const nodeType = node.type;
4042
4043 if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
4044 if (typeof opts === "undefined") {
4045 return true;
4046 } else {
4047 return (0, _shallowEqual.default)(node, opts);
4048 }
4049 }
4050
4051 return false;
4052}
4053
4054function isBlock(node, opts) {
4055 if (!node) return false;
4056 const nodeType = node.type;
4057
4058 if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
4059 if (typeof opts === "undefined") {
4060 return true;
4061 } else {
4062 return (0, _shallowEqual.default)(node, opts);
4063 }
4064 }
4065
4066 return false;
4067}
4068
4069function isStatement(node, opts) {
4070 if (!node) return false;
4071 const nodeType = node.type;
4072
4073 if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
4074 if (typeof opts === "undefined") {
4075 return true;
4076 } else {
4077 return (0, _shallowEqual.default)(node, opts);
4078 }
4079 }
4080
4081 return false;
4082}
4083
4084function isTerminatorless(node, opts) {
4085 if (!node) return false;
4086 const nodeType = node.type;
4087
4088 if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
4089 if (typeof opts === "undefined") {
4090 return true;
4091 } else {
4092 return (0, _shallowEqual.default)(node, opts);
4093 }
4094 }
4095
4096 return false;
4097}
4098
4099function isCompletionStatement(node, opts) {
4100 if (!node) return false;
4101 const nodeType = node.type;
4102
4103 if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
4104 if (typeof opts === "undefined") {
4105 return true;
4106 } else {
4107 return (0, _shallowEqual.default)(node, opts);
4108 }
4109 }
4110
4111 return false;
4112}
4113
4114function isConditional(node, opts) {
4115 if (!node) return false;
4116 const nodeType = node.type;
4117
4118 if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
4119 if (typeof opts === "undefined") {
4120 return true;
4121 } else {
4122 return (0, _shallowEqual.default)(node, opts);
4123 }
4124 }
4125
4126 return false;
4127}
4128
4129function isLoop(node, opts) {
4130 if (!node) return false;
4131 const nodeType = node.type;
4132
4133 if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
4134 if (typeof opts === "undefined") {
4135 return true;
4136 } else {
4137 return (0, _shallowEqual.default)(node, opts);
4138 }
4139 }
4140
4141 return false;
4142}
4143
4144function isWhile(node, opts) {
4145 if (!node) return false;
4146 const nodeType = node.type;
4147
4148 if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
4149 if (typeof opts === "undefined") {
4150 return true;
4151 } else {
4152 return (0, _shallowEqual.default)(node, opts);
4153 }
4154 }
4155
4156 return false;
4157}
4158
4159function isExpressionWrapper(node, opts) {
4160 if (!node) return false;
4161 const nodeType = node.type;
4162
4163 if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
4164 if (typeof opts === "undefined") {
4165 return true;
4166 } else {
4167 return (0, _shallowEqual.default)(node, opts);
4168 }
4169 }
4170
4171 return false;
4172}
4173
4174function isFor(node, opts) {
4175 if (!node) return false;
4176 const nodeType = node.type;
4177
4178 if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
4179 if (typeof opts === "undefined") {
4180 return true;
4181 } else {
4182 return (0, _shallowEqual.default)(node, opts);
4183 }
4184 }
4185
4186 return false;
4187}
4188
4189function isForXStatement(node, opts) {
4190 if (!node) return false;
4191 const nodeType = node.type;
4192
4193 if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
4194 if (typeof opts === "undefined") {
4195 return true;
4196 } else {
4197 return (0, _shallowEqual.default)(node, opts);
4198 }
4199 }
4200
4201 return false;
4202}
4203
4204function isFunction(node, opts) {
4205 if (!node) return false;
4206 const nodeType = node.type;
4207
4208 if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
4209 if (typeof opts === "undefined") {
4210 return true;
4211 } else {
4212 return (0, _shallowEqual.default)(node, opts);
4213 }
4214 }
4215
4216 return false;
4217}
4218
4219function isFunctionParent(node, opts) {
4220 if (!node) return false;
4221 const nodeType = node.type;
4222
4223 if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
4224 if (typeof opts === "undefined") {
4225 return true;
4226 } else {
4227 return (0, _shallowEqual.default)(node, opts);
4228 }
4229 }
4230
4231 return false;
4232}
4233
4234function isPureish(node, opts) {
4235 if (!node) return false;
4236 const nodeType = node.type;
4237
4238 if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
4239 if (typeof opts === "undefined") {
4240 return true;
4241 } else {
4242 return (0, _shallowEqual.default)(node, opts);
4243 }
4244 }
4245
4246 return false;
4247}
4248
4249function isDeclaration(node, opts) {
4250 if (!node) return false;
4251 const nodeType = node.type;
4252
4253 if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
4254 if (typeof opts === "undefined") {
4255 return true;
4256 } else {
4257 return (0, _shallowEqual.default)(node, opts);
4258 }
4259 }
4260
4261 return false;
4262}
4263
4264function isPatternLike(node, opts) {
4265 if (!node) return false;
4266 const nodeType = node.type;
4267
4268 if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
4269 if (typeof opts === "undefined") {
4270 return true;
4271 } else {
4272 return (0, _shallowEqual.default)(node, opts);
4273 }
4274 }
4275
4276 return false;
4277}
4278
4279function isLVal(node, opts) {
4280 if (!node) return false;
4281 const nodeType = node.type;
4282
4283 if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
4284 if (typeof opts === "undefined") {
4285 return true;
4286 } else {
4287 return (0, _shallowEqual.default)(node, opts);
4288 }
4289 }
4290
4291 return false;
4292}
4293
4294function isTSEntityName(node, opts) {
4295 if (!node) return false;
4296 const nodeType = node.type;
4297
4298 if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
4299 if (typeof opts === "undefined") {
4300 return true;
4301 } else {
4302 return (0, _shallowEqual.default)(node, opts);
4303 }
4304 }
4305
4306 return false;
4307}
4308
4309function isLiteral(node, opts) {
4310 if (!node) return false;
4311 const nodeType = node.type;
4312
4313 if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
4314 if (typeof opts === "undefined") {
4315 return true;
4316 } else {
4317 return (0, _shallowEqual.default)(node, opts);
4318 }
4319 }
4320
4321 return false;
4322}
4323
4324function isImmutable(node, opts) {
4325 if (!node) return false;
4326 const nodeType = node.type;
4327
4328 if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
4329 if (typeof opts === "undefined") {
4330 return true;
4331 } else {
4332 return (0, _shallowEqual.default)(node, opts);
4333 }
4334 }
4335
4336 return false;
4337}
4338
4339function isUserWhitespacable(node, opts) {
4340 if (!node) return false;
4341 const nodeType = node.type;
4342
4343 if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
4344 if (typeof opts === "undefined") {
4345 return true;
4346 } else {
4347 return (0, _shallowEqual.default)(node, opts);
4348 }
4349 }
4350
4351 return false;
4352}
4353
4354function isMethod(node, opts) {
4355 if (!node) return false;
4356 const nodeType = node.type;
4357
4358 if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
4359 if (typeof opts === "undefined") {
4360 return true;
4361 } else {
4362 return (0, _shallowEqual.default)(node, opts);
4363 }
4364 }
4365
4366 return false;
4367}
4368
4369function isObjectMember(node, opts) {
4370 if (!node) return false;
4371 const nodeType = node.type;
4372
4373 if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
4374 if (typeof opts === "undefined") {
4375 return true;
4376 } else {
4377 return (0, _shallowEqual.default)(node, opts);
4378 }
4379 }
4380
4381 return false;
4382}
4383
4384function isProperty(node, opts) {
4385 if (!node) return false;
4386 const nodeType = node.type;
4387
4388 if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
4389 if (typeof opts === "undefined") {
4390 return true;
4391 } else {
4392 return (0, _shallowEqual.default)(node, opts);
4393 }
4394 }
4395
4396 return false;
4397}
4398
4399function isUnaryLike(node, opts) {
4400 if (!node) return false;
4401 const nodeType = node.type;
4402
4403 if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
4404 if (typeof opts === "undefined") {
4405 return true;
4406 } else {
4407 return (0, _shallowEqual.default)(node, opts);
4408 }
4409 }
4410
4411 return false;
4412}
4413
4414function isPattern(node, opts) {
4415 if (!node) return false;
4416 const nodeType = node.type;
4417
4418 if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
4419 if (typeof opts === "undefined") {
4420 return true;
4421 } else {
4422 return (0, _shallowEqual.default)(node, opts);
4423 }
4424 }
4425
4426 return false;
4427}
4428
4429function isClass(node, opts) {
4430 if (!node) return false;
4431 const nodeType = node.type;
4432
4433 if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
4434 if (typeof opts === "undefined") {
4435 return true;
4436 } else {
4437 return (0, _shallowEqual.default)(node, opts);
4438 }
4439 }
4440
4441 return false;
4442}
4443
4444function isModuleDeclaration(node, opts) {
4445 if (!node) return false;
4446 const nodeType = node.type;
4447
4448 if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
4449 if (typeof opts === "undefined") {
4450 return true;
4451 } else {
4452 return (0, _shallowEqual.default)(node, opts);
4453 }
4454 }
4455
4456 return false;
4457}
4458
4459function isExportDeclaration(node, opts) {
4460 if (!node) return false;
4461 const nodeType = node.type;
4462
4463 if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
4464 if (typeof opts === "undefined") {
4465 return true;
4466 } else {
4467 return (0, _shallowEqual.default)(node, opts);
4468 }
4469 }
4470
4471 return false;
4472}
4473
4474function isModuleSpecifier(node, opts) {
4475 if (!node) return false;
4476 const nodeType = node.type;
4477
4478 if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
4479 if (typeof opts === "undefined") {
4480 return true;
4481 } else {
4482 return (0, _shallowEqual.default)(node, opts);
4483 }
4484 }
4485
4486 return false;
4487}
4488
4489function isPrivate(node, opts) {
4490 if (!node) return false;
4491 const nodeType = node.type;
4492
4493 if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
4494 if (typeof opts === "undefined") {
4495 return true;
4496 } else {
4497 return (0, _shallowEqual.default)(node, opts);
4498 }
4499 }
4500
4501 return false;
4502}
4503
4504function isFlow(node, opts) {
4505 if (!node) return false;
4506 const nodeType = node.type;
4507
4508 if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
4509 if (typeof opts === "undefined") {
4510 return true;
4511 } else {
4512 return (0, _shallowEqual.default)(node, opts);
4513 }
4514 }
4515
4516 return false;
4517}
4518
4519function isFlowType(node, opts) {
4520 if (!node) return false;
4521 const nodeType = node.type;
4522
4523 if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
4524 if (typeof opts === "undefined") {
4525 return true;
4526 } else {
4527 return (0, _shallowEqual.default)(node, opts);
4528 }
4529 }
4530
4531 return false;
4532}
4533
4534function isFlowBaseAnnotation(node, opts) {
4535 if (!node) return false;
4536 const nodeType = node.type;
4537
4538 if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
4539 if (typeof opts === "undefined") {
4540 return true;
4541 } else {
4542 return (0, _shallowEqual.default)(node, opts);
4543 }
4544 }
4545
4546 return false;
4547}
4548
4549function isFlowDeclaration(node, opts) {
4550 if (!node) return false;
4551 const nodeType = node.type;
4552
4553 if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
4554 if (typeof opts === "undefined") {
4555 return true;
4556 } else {
4557 return (0, _shallowEqual.default)(node, opts);
4558 }
4559 }
4560
4561 return false;
4562}
4563
4564function isFlowPredicate(node, opts) {
4565 if (!node) return false;
4566 const nodeType = node.type;
4567
4568 if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
4569 if (typeof opts === "undefined") {
4570 return true;
4571 } else {
4572 return (0, _shallowEqual.default)(node, opts);
4573 }
4574 }
4575
4576 return false;
4577}
4578
4579function isEnumBody(node, opts) {
4580 if (!node) return false;
4581 const nodeType = node.type;
4582
4583 if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
4584 if (typeof opts === "undefined") {
4585 return true;
4586 } else {
4587 return (0, _shallowEqual.default)(node, opts);
4588 }
4589 }
4590
4591 return false;
4592}
4593
4594function isEnumMember(node, opts) {
4595 if (!node) return false;
4596 const nodeType = node.type;
4597
4598 if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
4599 if (typeof opts === "undefined") {
4600 return true;
4601 } else {
4602 return (0, _shallowEqual.default)(node, opts);
4603 }
4604 }
4605
4606 return false;
4607}
4608
4609function isJSX(node, opts) {
4610 if (!node) return false;
4611 const nodeType = node.type;
4612
4613 if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
4614 if (typeof opts === "undefined") {
4615 return true;
4616 } else {
4617 return (0, _shallowEqual.default)(node, opts);
4618 }
4619 }
4620
4621 return false;
4622}
4623
4624function isTSTypeElement(node, opts) {
4625 if (!node) return false;
4626 const nodeType = node.type;
4627
4628 if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
4629 if (typeof opts === "undefined") {
4630 return true;
4631 } else {
4632 return (0, _shallowEqual.default)(node, opts);
4633 }
4634 }
4635
4636 return false;
4637}
4638
4639function isTSType(node, opts) {
4640 if (!node) return false;
4641 const nodeType = node.type;
4642
4643 if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
4644 if (typeof opts === "undefined") {
4645 return true;
4646 } else {
4647 return (0, _shallowEqual.default)(node, opts);
4648 }
4649 }
4650
4651 return false;
4652}
4653
4654function isTSBaseType(node, opts) {
4655 if (!node) return false;
4656 const nodeType = node.type;
4657
4658 if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
4659 if (typeof opts === "undefined") {
4660 return true;
4661 } else {
4662 return (0, _shallowEqual.default)(node, opts);
4663 }
4664 }
4665
4666 return false;
4667}
4668
4669function isNumberLiteral(node, opts) {
4670 console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
4671 if (!node) return false;
4672 const nodeType = node.type;
4673
4674 if (nodeType === "NumberLiteral") {
4675 if (typeof opts === "undefined") {
4676 return true;
4677 } else {
4678 return (0, _shallowEqual.default)(node, opts);
4679 }
4680 }
4681
4682 return false;
4683}
4684
4685function isRegexLiteral(node, opts) {
4686 console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
4687 if (!node) return false;
4688 const nodeType = node.type;
4689
4690 if (nodeType === "RegexLiteral") {
4691 if (typeof opts === "undefined") {
4692 return true;
4693 } else {
4694 return (0, _shallowEqual.default)(node, opts);
4695 }
4696 }
4697
4698 return false;
4699}
4700
4701function isRestProperty(node, opts) {
4702 console.trace("The node type RestProperty has been renamed to RestElement");
4703 if (!node) return false;
4704 const nodeType = node.type;
4705
4706 if (nodeType === "RestProperty") {
4707 if (typeof opts === "undefined") {
4708 return true;
4709 } else {
4710 return (0, _shallowEqual.default)(node, opts);
4711 }
4712 }
4713
4714 return false;
4715}
4716
4717function isSpreadProperty(node, opts) {
4718 console.trace("The node type SpreadProperty has been renamed to SpreadElement");
4719 if (!node) return false;
4720 const nodeType = node.type;
4721
4722 if (nodeType === "SpreadProperty") {
4723 if (typeof opts === "undefined") {
4724 return true;
4725 } else {
4726 return (0, _shallowEqual.default)(node, opts);
4727 }
4728 }
4729
4730 return false;
4731}
Note: See TracBrowser for help on using the repository browser.