hermes-estree 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/predicates.js +293 -283
- package/dist/generated/predicates.js.flow +289 -283
- package/dist/predicates.js +19 -19
- package/dist/predicates.js.flow +19 -19
- package/package.json +1 -1
|
@@ -162,6 +162,7 @@ import type {
|
|
|
162
162
|
OpaqueType,
|
|
163
163
|
OptionalIndexedAccessType,
|
|
164
164
|
PrivateIdentifier,
|
|
165
|
+
Program,
|
|
165
166
|
Property,
|
|
166
167
|
PropertyDefinition,
|
|
167
168
|
QualifiedTypeIdentifier,
|
|
@@ -433,6 +434,7 @@ exports.isPercentToken = isPercentToken;
|
|
|
433
434
|
exports.isPlusEqualToken = isPlusEqualToken;
|
|
434
435
|
exports.isPlusToken = isPlusToken;
|
|
435
436
|
exports.isPrivateIdentifier = isPrivateIdentifier;
|
|
437
|
+
exports.isProgram = isProgram;
|
|
436
438
|
exports.isProperty = isProperty;
|
|
437
439
|
exports.isPropertyDefinition = isPropertyDefinition;
|
|
438
440
|
exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
|
|
@@ -502,7 +504,7 @@ exports.isYieldToken = isYieldToken;
|
|
|
502
504
|
function isIdentifier(node
|
|
503
505
|
/*: ESNode | Token */
|
|
504
506
|
)
|
|
505
|
-
/*: node is (Identifier | MostTokens) */
|
|
507
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
506
508
|
{
|
|
507
509
|
return node.type === 'Identifier';
|
|
508
510
|
}
|
|
@@ -510,7 +512,7 @@ function isIdentifier(node
|
|
|
510
512
|
function isJSXIdentifier(node
|
|
511
513
|
/*: ESNode | Token */
|
|
512
514
|
)
|
|
513
|
-
/*: node is (JSXIdentifier | MostTokens) */
|
|
515
|
+
/*: implies node is (JSXIdentifier | MostTokens) */
|
|
514
516
|
{
|
|
515
517
|
return node.type === 'JSXIdentifier';
|
|
516
518
|
}
|
|
@@ -518,7 +520,7 @@ function isJSXIdentifier(node
|
|
|
518
520
|
function isJSXText(node
|
|
519
521
|
/*: ESNode | Token */
|
|
520
522
|
)
|
|
521
|
-
/*: node is (JSXText | MostTokens) */
|
|
523
|
+
/*: implies node is (JSXText | MostTokens) */
|
|
522
524
|
{
|
|
523
525
|
return node.type === 'JSXText';
|
|
524
526
|
}
|
|
@@ -526,7 +528,7 @@ function isJSXText(node
|
|
|
526
528
|
function isAnyTypeAnnotation(node
|
|
527
529
|
/*: ESNode | Token */
|
|
528
530
|
)
|
|
529
|
-
/*: node is AnyTypeAnnotation */
|
|
531
|
+
/*: implies node is AnyTypeAnnotation */
|
|
530
532
|
{
|
|
531
533
|
return node.type === 'AnyTypeAnnotation';
|
|
532
534
|
}
|
|
@@ -534,7 +536,7 @@ function isAnyTypeAnnotation(node
|
|
|
534
536
|
function isArrayExpression(node
|
|
535
537
|
/*: ESNode | Token */
|
|
536
538
|
)
|
|
537
|
-
/*: node is ArrayExpression */
|
|
539
|
+
/*: implies node is ArrayExpression */
|
|
538
540
|
{
|
|
539
541
|
return node.type === 'ArrayExpression';
|
|
540
542
|
}
|
|
@@ -542,7 +544,7 @@ function isArrayExpression(node
|
|
|
542
544
|
function isArrayPattern(node
|
|
543
545
|
/*: ESNode | Token */
|
|
544
546
|
)
|
|
545
|
-
/*: node is ArrayPattern */
|
|
547
|
+
/*: implies node is ArrayPattern */
|
|
546
548
|
{
|
|
547
549
|
return node.type === 'ArrayPattern';
|
|
548
550
|
}
|
|
@@ -550,7 +552,7 @@ function isArrayPattern(node
|
|
|
550
552
|
function isArrayTypeAnnotation(node
|
|
551
553
|
/*: ESNode | Token */
|
|
552
554
|
)
|
|
553
|
-
/*: node is ArrayTypeAnnotation */
|
|
555
|
+
/*: implies node is ArrayTypeAnnotation */
|
|
554
556
|
{
|
|
555
557
|
return node.type === 'ArrayTypeAnnotation';
|
|
556
558
|
}
|
|
@@ -558,7 +560,7 @@ function isArrayTypeAnnotation(node
|
|
|
558
560
|
function isArrowFunctionExpression(node
|
|
559
561
|
/*: ESNode | Token */
|
|
560
562
|
)
|
|
561
|
-
/*: node is ArrowFunctionExpression */
|
|
563
|
+
/*: implies node is ArrowFunctionExpression */
|
|
562
564
|
{
|
|
563
565
|
return node.type === 'ArrowFunctionExpression';
|
|
564
566
|
}
|
|
@@ -566,7 +568,7 @@ function isArrowFunctionExpression(node
|
|
|
566
568
|
function isAsConstExpression(node
|
|
567
569
|
/*: ESNode | Token */
|
|
568
570
|
)
|
|
569
|
-
/*: node is AsConstExpression */
|
|
571
|
+
/*: implies node is AsConstExpression */
|
|
570
572
|
{
|
|
571
573
|
return node.type === 'AsConstExpression';
|
|
572
574
|
}
|
|
@@ -574,7 +576,7 @@ function isAsConstExpression(node
|
|
|
574
576
|
function isAsExpression(node
|
|
575
577
|
/*: ESNode | Token */
|
|
576
578
|
)
|
|
577
|
-
/*: node is AsExpression */
|
|
579
|
+
/*: implies node is AsExpression */
|
|
578
580
|
{
|
|
579
581
|
return node.type === 'AsExpression';
|
|
580
582
|
}
|
|
@@ -582,7 +584,7 @@ function isAsExpression(node
|
|
|
582
584
|
function isAssignmentExpression(node
|
|
583
585
|
/*: ESNode | Token */
|
|
584
586
|
)
|
|
585
|
-
/*: node is AssignmentExpression */
|
|
587
|
+
/*: implies node is AssignmentExpression */
|
|
586
588
|
{
|
|
587
589
|
return node.type === 'AssignmentExpression';
|
|
588
590
|
}
|
|
@@ -590,7 +592,7 @@ function isAssignmentExpression(node
|
|
|
590
592
|
function isAssignmentPattern(node
|
|
591
593
|
/*: ESNode | Token */
|
|
592
594
|
)
|
|
593
|
-
/*: node is AssignmentPattern */
|
|
595
|
+
/*: implies node is AssignmentPattern */
|
|
594
596
|
{
|
|
595
597
|
return node.type === 'AssignmentPattern';
|
|
596
598
|
}
|
|
@@ -598,7 +600,7 @@ function isAssignmentPattern(node
|
|
|
598
600
|
function isAwaitExpression(node
|
|
599
601
|
/*: ESNode | Token */
|
|
600
602
|
)
|
|
601
|
-
/*: node is AwaitExpression */
|
|
603
|
+
/*: implies node is AwaitExpression */
|
|
602
604
|
{
|
|
603
605
|
return node.type === 'AwaitExpression';
|
|
604
606
|
}
|
|
@@ -606,7 +608,7 @@ function isAwaitExpression(node
|
|
|
606
608
|
function isBigIntLiteralTypeAnnotation(node
|
|
607
609
|
/*: ESNode | Token */
|
|
608
610
|
)
|
|
609
|
-
/*: node is BigIntLiteralTypeAnnotation */
|
|
611
|
+
/*: implies node is BigIntLiteralTypeAnnotation */
|
|
610
612
|
{
|
|
611
613
|
return node.type === 'BigIntLiteralTypeAnnotation';
|
|
612
614
|
}
|
|
@@ -614,7 +616,7 @@ function isBigIntLiteralTypeAnnotation(node
|
|
|
614
616
|
function isBigIntTypeAnnotation(node
|
|
615
617
|
/*: ESNode | Token */
|
|
616
618
|
)
|
|
617
|
-
/*: node is BigIntTypeAnnotation */
|
|
619
|
+
/*: implies node is BigIntTypeAnnotation */
|
|
618
620
|
{
|
|
619
621
|
return node.type === 'BigIntTypeAnnotation';
|
|
620
622
|
}
|
|
@@ -622,7 +624,7 @@ function isBigIntTypeAnnotation(node
|
|
|
622
624
|
function isBinaryExpression(node
|
|
623
625
|
/*: ESNode | Token */
|
|
624
626
|
)
|
|
625
|
-
/*: node is BinaryExpression */
|
|
627
|
+
/*: implies node is BinaryExpression */
|
|
626
628
|
{
|
|
627
629
|
return node.type === 'BinaryExpression';
|
|
628
630
|
}
|
|
@@ -630,7 +632,7 @@ function isBinaryExpression(node
|
|
|
630
632
|
function isBlockStatement(node
|
|
631
633
|
/*: ESNode | Token */
|
|
632
634
|
)
|
|
633
|
-
/*: node is BlockStatement */
|
|
635
|
+
/*: implies node is BlockStatement */
|
|
634
636
|
{
|
|
635
637
|
return node.type === 'BlockStatement';
|
|
636
638
|
}
|
|
@@ -638,7 +640,7 @@ function isBlockStatement(node
|
|
|
638
640
|
function isBooleanLiteralTypeAnnotation(node
|
|
639
641
|
/*: ESNode | Token */
|
|
640
642
|
)
|
|
641
|
-
/*: node is BooleanLiteralTypeAnnotation */
|
|
643
|
+
/*: implies node is BooleanLiteralTypeAnnotation */
|
|
642
644
|
{
|
|
643
645
|
return node.type === 'BooleanLiteralTypeAnnotation';
|
|
644
646
|
}
|
|
@@ -646,7 +648,7 @@ function isBooleanLiteralTypeAnnotation(node
|
|
|
646
648
|
function isBooleanTypeAnnotation(node
|
|
647
649
|
/*: ESNode | Token */
|
|
648
650
|
)
|
|
649
|
-
/*: node is BooleanTypeAnnotation */
|
|
651
|
+
/*: implies node is BooleanTypeAnnotation */
|
|
650
652
|
{
|
|
651
653
|
return node.type === 'BooleanTypeAnnotation';
|
|
652
654
|
}
|
|
@@ -654,7 +656,7 @@ function isBooleanTypeAnnotation(node
|
|
|
654
656
|
function isBreakStatement(node
|
|
655
657
|
/*: ESNode | Token */
|
|
656
658
|
)
|
|
657
|
-
/*: node is BreakStatement */
|
|
659
|
+
/*: implies node is BreakStatement */
|
|
658
660
|
{
|
|
659
661
|
return node.type === 'BreakStatement';
|
|
660
662
|
}
|
|
@@ -662,7 +664,7 @@ function isBreakStatement(node
|
|
|
662
664
|
function isCallExpression(node
|
|
663
665
|
/*: ESNode | Token */
|
|
664
666
|
)
|
|
665
|
-
/*: node is CallExpression */
|
|
667
|
+
/*: implies node is CallExpression */
|
|
666
668
|
{
|
|
667
669
|
return node.type === 'CallExpression';
|
|
668
670
|
}
|
|
@@ -670,7 +672,7 @@ function isCallExpression(node
|
|
|
670
672
|
function isCatchClause(node
|
|
671
673
|
/*: ESNode | Token */
|
|
672
674
|
)
|
|
673
|
-
/*: node is CatchClause */
|
|
675
|
+
/*: implies node is CatchClause */
|
|
674
676
|
{
|
|
675
677
|
return node.type === 'CatchClause';
|
|
676
678
|
}
|
|
@@ -678,7 +680,7 @@ function isCatchClause(node
|
|
|
678
680
|
function isChainExpression(node
|
|
679
681
|
/*: ESNode | Token */
|
|
680
682
|
)
|
|
681
|
-
/*: node is ChainExpression */
|
|
683
|
+
/*: implies node is ChainExpression */
|
|
682
684
|
{
|
|
683
685
|
return node.type === 'ChainExpression';
|
|
684
686
|
}
|
|
@@ -686,7 +688,7 @@ function isChainExpression(node
|
|
|
686
688
|
function isClassBody(node
|
|
687
689
|
/*: ESNode | Token */
|
|
688
690
|
)
|
|
689
|
-
/*: node is ClassBody */
|
|
691
|
+
/*: implies node is ClassBody */
|
|
690
692
|
{
|
|
691
693
|
return node.type === 'ClassBody';
|
|
692
694
|
}
|
|
@@ -694,7 +696,7 @@ function isClassBody(node
|
|
|
694
696
|
function isClassDeclaration(node
|
|
695
697
|
/*: ESNode | Token */
|
|
696
698
|
)
|
|
697
|
-
/*: node is ClassDeclaration */
|
|
699
|
+
/*: implies node is ClassDeclaration */
|
|
698
700
|
{
|
|
699
701
|
return node.type === 'ClassDeclaration';
|
|
700
702
|
}
|
|
@@ -702,7 +704,7 @@ function isClassDeclaration(node
|
|
|
702
704
|
function isClassExpression(node
|
|
703
705
|
/*: ESNode | Token */
|
|
704
706
|
)
|
|
705
|
-
/*: node is ClassExpression */
|
|
707
|
+
/*: implies node is ClassExpression */
|
|
706
708
|
{
|
|
707
709
|
return node.type === 'ClassExpression';
|
|
708
710
|
}
|
|
@@ -710,7 +712,7 @@ function isClassExpression(node
|
|
|
710
712
|
function isClassImplements(node
|
|
711
713
|
/*: ESNode | Token */
|
|
712
714
|
)
|
|
713
|
-
/*: node is ClassImplements */
|
|
715
|
+
/*: implies node is ClassImplements */
|
|
714
716
|
{
|
|
715
717
|
return node.type === 'ClassImplements';
|
|
716
718
|
}
|
|
@@ -718,7 +720,7 @@ function isClassImplements(node
|
|
|
718
720
|
function isComponentDeclaration(node
|
|
719
721
|
/*: ESNode | Token */
|
|
720
722
|
)
|
|
721
|
-
/*: node is ComponentDeclaration */
|
|
723
|
+
/*: implies node is ComponentDeclaration */
|
|
722
724
|
{
|
|
723
725
|
return node.type === 'ComponentDeclaration';
|
|
724
726
|
}
|
|
@@ -726,7 +728,7 @@ function isComponentDeclaration(node
|
|
|
726
728
|
function isComponentParameter(node
|
|
727
729
|
/*: ESNode | Token */
|
|
728
730
|
)
|
|
729
|
-
/*: node is ComponentParameter */
|
|
731
|
+
/*: implies node is ComponentParameter */
|
|
730
732
|
{
|
|
731
733
|
return node.type === 'ComponentParameter';
|
|
732
734
|
}
|
|
@@ -734,7 +736,7 @@ function isComponentParameter(node
|
|
|
734
736
|
function isComponentTypeAnnotation(node
|
|
735
737
|
/*: ESNode | Token */
|
|
736
738
|
)
|
|
737
|
-
/*: node is ComponentTypeAnnotation */
|
|
739
|
+
/*: implies node is ComponentTypeAnnotation */
|
|
738
740
|
{
|
|
739
741
|
return node.type === 'ComponentTypeAnnotation';
|
|
740
742
|
}
|
|
@@ -742,7 +744,7 @@ function isComponentTypeAnnotation(node
|
|
|
742
744
|
function isComponentTypeParameter(node
|
|
743
745
|
/*: ESNode | Token */
|
|
744
746
|
)
|
|
745
|
-
/*: node is ComponentTypeParameter */
|
|
747
|
+
/*: implies node is ComponentTypeParameter */
|
|
746
748
|
{
|
|
747
749
|
return node.type === 'ComponentTypeParameter';
|
|
748
750
|
}
|
|
@@ -750,7 +752,7 @@ function isComponentTypeParameter(node
|
|
|
750
752
|
function isConditionalExpression(node
|
|
751
753
|
/*: ESNode | Token */
|
|
752
754
|
)
|
|
753
|
-
/*: node is ConditionalExpression */
|
|
755
|
+
/*: implies node is ConditionalExpression */
|
|
754
756
|
{
|
|
755
757
|
return node.type === 'ConditionalExpression';
|
|
756
758
|
}
|
|
@@ -758,7 +760,7 @@ function isConditionalExpression(node
|
|
|
758
760
|
function isConditionalTypeAnnotation(node
|
|
759
761
|
/*: ESNode | Token */
|
|
760
762
|
)
|
|
761
|
-
/*: node is ConditionalTypeAnnotation */
|
|
763
|
+
/*: implies node is ConditionalTypeAnnotation */
|
|
762
764
|
{
|
|
763
765
|
return node.type === 'ConditionalTypeAnnotation';
|
|
764
766
|
}
|
|
@@ -766,7 +768,7 @@ function isConditionalTypeAnnotation(node
|
|
|
766
768
|
function isContinueStatement(node
|
|
767
769
|
/*: ESNode | Token */
|
|
768
770
|
)
|
|
769
|
-
/*: node is ContinueStatement */
|
|
771
|
+
/*: implies node is ContinueStatement */
|
|
770
772
|
{
|
|
771
773
|
return node.type === 'ContinueStatement';
|
|
772
774
|
}
|
|
@@ -774,7 +776,7 @@ function isContinueStatement(node
|
|
|
774
776
|
function isDebuggerStatement(node
|
|
775
777
|
/*: ESNode | Token */
|
|
776
778
|
)
|
|
777
|
-
/*: node is DebuggerStatement */
|
|
779
|
+
/*: implies node is DebuggerStatement */
|
|
778
780
|
{
|
|
779
781
|
return node.type === 'DebuggerStatement';
|
|
780
782
|
}
|
|
@@ -782,7 +784,7 @@ function isDebuggerStatement(node
|
|
|
782
784
|
function isDeclareClass(node
|
|
783
785
|
/*: ESNode | Token */
|
|
784
786
|
)
|
|
785
|
-
/*: node is DeclareClass */
|
|
787
|
+
/*: implies node is DeclareClass */
|
|
786
788
|
{
|
|
787
789
|
return node.type === 'DeclareClass';
|
|
788
790
|
}
|
|
@@ -790,7 +792,7 @@ function isDeclareClass(node
|
|
|
790
792
|
function isDeclareComponent(node
|
|
791
793
|
/*: ESNode | Token */
|
|
792
794
|
)
|
|
793
|
-
/*: node is DeclareComponent */
|
|
795
|
+
/*: implies node is DeclareComponent */
|
|
794
796
|
{
|
|
795
797
|
return node.type === 'DeclareComponent';
|
|
796
798
|
}
|
|
@@ -798,7 +800,7 @@ function isDeclareComponent(node
|
|
|
798
800
|
function isDeclaredPredicate(node
|
|
799
801
|
/*: ESNode | Token */
|
|
800
802
|
)
|
|
801
|
-
/*: node is DeclaredPredicate */
|
|
803
|
+
/*: implies node is DeclaredPredicate */
|
|
802
804
|
{
|
|
803
805
|
return node.type === 'DeclaredPredicate';
|
|
804
806
|
}
|
|
@@ -806,7 +808,7 @@ function isDeclaredPredicate(node
|
|
|
806
808
|
function isDeclareEnum(node
|
|
807
809
|
/*: ESNode | Token */
|
|
808
810
|
)
|
|
809
|
-
/*: node is DeclareEnum */
|
|
811
|
+
/*: implies node is DeclareEnum */
|
|
810
812
|
{
|
|
811
813
|
return node.type === 'DeclareEnum';
|
|
812
814
|
}
|
|
@@ -814,7 +816,7 @@ function isDeclareEnum(node
|
|
|
814
816
|
function isDeclareExportAllDeclaration(node
|
|
815
817
|
/*: ESNode | Token */
|
|
816
818
|
)
|
|
817
|
-
/*: node is DeclareExportAllDeclaration */
|
|
819
|
+
/*: implies node is DeclareExportAllDeclaration */
|
|
818
820
|
{
|
|
819
821
|
return node.type === 'DeclareExportAllDeclaration';
|
|
820
822
|
}
|
|
@@ -822,7 +824,7 @@ function isDeclareExportAllDeclaration(node
|
|
|
822
824
|
function isDeclareExportDeclaration(node
|
|
823
825
|
/*: ESNode | Token */
|
|
824
826
|
)
|
|
825
|
-
/*: node is DeclareExportDeclaration */
|
|
827
|
+
/*: implies node is DeclareExportDeclaration */
|
|
826
828
|
{
|
|
827
829
|
return node.type === 'DeclareExportDeclaration';
|
|
828
830
|
}
|
|
@@ -830,7 +832,7 @@ function isDeclareExportDeclaration(node
|
|
|
830
832
|
function isDeclareFunction(node
|
|
831
833
|
/*: ESNode | Token */
|
|
832
834
|
)
|
|
833
|
-
/*: node is DeclareFunction */
|
|
835
|
+
/*: implies node is DeclareFunction */
|
|
834
836
|
{
|
|
835
837
|
return node.type === 'DeclareFunction';
|
|
836
838
|
}
|
|
@@ -838,7 +840,7 @@ function isDeclareFunction(node
|
|
|
838
840
|
function isDeclareHook(node
|
|
839
841
|
/*: ESNode | Token */
|
|
840
842
|
)
|
|
841
|
-
/*: node is DeclareHook */
|
|
843
|
+
/*: implies node is DeclareHook */
|
|
842
844
|
{
|
|
843
845
|
return node.type === 'DeclareHook';
|
|
844
846
|
}
|
|
@@ -846,7 +848,7 @@ function isDeclareHook(node
|
|
|
846
848
|
function isDeclareInterface(node
|
|
847
849
|
/*: ESNode | Token */
|
|
848
850
|
)
|
|
849
|
-
/*: node is DeclareInterface */
|
|
851
|
+
/*: implies node is DeclareInterface */
|
|
850
852
|
{
|
|
851
853
|
return node.type === 'DeclareInterface';
|
|
852
854
|
}
|
|
@@ -854,7 +856,7 @@ function isDeclareInterface(node
|
|
|
854
856
|
function isDeclareModule(node
|
|
855
857
|
/*: ESNode | Token */
|
|
856
858
|
)
|
|
857
|
-
/*: node is DeclareModule */
|
|
859
|
+
/*: implies node is DeclareModule */
|
|
858
860
|
{
|
|
859
861
|
return node.type === 'DeclareModule';
|
|
860
862
|
}
|
|
@@ -862,7 +864,7 @@ function isDeclareModule(node
|
|
|
862
864
|
function isDeclareModuleExports(node
|
|
863
865
|
/*: ESNode | Token */
|
|
864
866
|
)
|
|
865
|
-
/*: node is DeclareModuleExports */
|
|
867
|
+
/*: implies node is DeclareModuleExports */
|
|
866
868
|
{
|
|
867
869
|
return node.type === 'DeclareModuleExports';
|
|
868
870
|
}
|
|
@@ -870,7 +872,7 @@ function isDeclareModuleExports(node
|
|
|
870
872
|
function isDeclareNamespace(node
|
|
871
873
|
/*: ESNode | Token */
|
|
872
874
|
)
|
|
873
|
-
/*: node is DeclareNamespace */
|
|
875
|
+
/*: implies node is DeclareNamespace */
|
|
874
876
|
{
|
|
875
877
|
return node.type === 'DeclareNamespace';
|
|
876
878
|
}
|
|
@@ -878,7 +880,7 @@ function isDeclareNamespace(node
|
|
|
878
880
|
function isDeclareOpaqueType(node
|
|
879
881
|
/*: ESNode | Token */
|
|
880
882
|
)
|
|
881
|
-
/*: node is DeclareOpaqueType */
|
|
883
|
+
/*: implies node is DeclareOpaqueType */
|
|
882
884
|
{
|
|
883
885
|
return node.type === 'DeclareOpaqueType';
|
|
884
886
|
}
|
|
@@ -886,7 +888,7 @@ function isDeclareOpaqueType(node
|
|
|
886
888
|
function isDeclareTypeAlias(node
|
|
887
889
|
/*: ESNode | Token */
|
|
888
890
|
)
|
|
889
|
-
/*: node is DeclareTypeAlias */
|
|
891
|
+
/*: implies node is DeclareTypeAlias */
|
|
890
892
|
{
|
|
891
893
|
return node.type === 'DeclareTypeAlias';
|
|
892
894
|
}
|
|
@@ -894,7 +896,7 @@ function isDeclareTypeAlias(node
|
|
|
894
896
|
function isDeclareVariable(node
|
|
895
897
|
/*: ESNode | Token */
|
|
896
898
|
)
|
|
897
|
-
/*: node is DeclareVariable */
|
|
899
|
+
/*: implies node is DeclareVariable */
|
|
898
900
|
{
|
|
899
901
|
return node.type === 'DeclareVariable';
|
|
900
902
|
}
|
|
@@ -902,7 +904,7 @@ function isDeclareVariable(node
|
|
|
902
904
|
function isDoWhileStatement(node
|
|
903
905
|
/*: ESNode | Token */
|
|
904
906
|
)
|
|
905
|
-
/*: node is DoWhileStatement */
|
|
907
|
+
/*: implies node is DoWhileStatement */
|
|
906
908
|
{
|
|
907
909
|
return node.type === 'DoWhileStatement';
|
|
908
910
|
}
|
|
@@ -910,7 +912,7 @@ function isDoWhileStatement(node
|
|
|
910
912
|
function isEmptyStatement(node
|
|
911
913
|
/*: ESNode | Token */
|
|
912
914
|
)
|
|
913
|
-
/*: node is EmptyStatement */
|
|
915
|
+
/*: implies node is EmptyStatement */
|
|
914
916
|
{
|
|
915
917
|
return node.type === 'EmptyStatement';
|
|
916
918
|
}
|
|
@@ -918,7 +920,7 @@ function isEmptyStatement(node
|
|
|
918
920
|
function isEmptyTypeAnnotation(node
|
|
919
921
|
/*: ESNode | Token */
|
|
920
922
|
)
|
|
921
|
-
/*: node is EmptyTypeAnnotation */
|
|
923
|
+
/*: implies node is EmptyTypeAnnotation */
|
|
922
924
|
{
|
|
923
925
|
return node.type === 'EmptyTypeAnnotation';
|
|
924
926
|
}
|
|
@@ -926,7 +928,7 @@ function isEmptyTypeAnnotation(node
|
|
|
926
928
|
function isEnumBigIntBody(node
|
|
927
929
|
/*: ESNode | Token */
|
|
928
930
|
)
|
|
929
|
-
/*: node is EnumBigIntBody */
|
|
931
|
+
/*: implies node is EnumBigIntBody */
|
|
930
932
|
{
|
|
931
933
|
return node.type === 'EnumBigIntBody';
|
|
932
934
|
}
|
|
@@ -934,7 +936,7 @@ function isEnumBigIntBody(node
|
|
|
934
936
|
function isEnumBigIntMember(node
|
|
935
937
|
/*: ESNode | Token */
|
|
936
938
|
)
|
|
937
|
-
/*: node is EnumBigIntMember */
|
|
939
|
+
/*: implies node is EnumBigIntMember */
|
|
938
940
|
{
|
|
939
941
|
return node.type === 'EnumBigIntMember';
|
|
940
942
|
}
|
|
@@ -942,7 +944,7 @@ function isEnumBigIntMember(node
|
|
|
942
944
|
function isEnumBooleanBody(node
|
|
943
945
|
/*: ESNode | Token */
|
|
944
946
|
)
|
|
945
|
-
/*: node is EnumBooleanBody */
|
|
947
|
+
/*: implies node is EnumBooleanBody */
|
|
946
948
|
{
|
|
947
949
|
return node.type === 'EnumBooleanBody';
|
|
948
950
|
}
|
|
@@ -950,7 +952,7 @@ function isEnumBooleanBody(node
|
|
|
950
952
|
function isEnumBooleanMember(node
|
|
951
953
|
/*: ESNode | Token */
|
|
952
954
|
)
|
|
953
|
-
/*: node is EnumBooleanMember */
|
|
955
|
+
/*: implies node is EnumBooleanMember */
|
|
954
956
|
{
|
|
955
957
|
return node.type === 'EnumBooleanMember';
|
|
956
958
|
}
|
|
@@ -958,7 +960,7 @@ function isEnumBooleanMember(node
|
|
|
958
960
|
function isEnumDeclaration(node
|
|
959
961
|
/*: ESNode | Token */
|
|
960
962
|
)
|
|
961
|
-
/*: node is EnumDeclaration */
|
|
963
|
+
/*: implies node is EnumDeclaration */
|
|
962
964
|
{
|
|
963
965
|
return node.type === 'EnumDeclaration';
|
|
964
966
|
}
|
|
@@ -966,7 +968,7 @@ function isEnumDeclaration(node
|
|
|
966
968
|
function isEnumDefaultedMember(node
|
|
967
969
|
/*: ESNode | Token */
|
|
968
970
|
)
|
|
969
|
-
/*: node is EnumDefaultedMember */
|
|
971
|
+
/*: implies node is EnumDefaultedMember */
|
|
970
972
|
{
|
|
971
973
|
return node.type === 'EnumDefaultedMember';
|
|
972
974
|
}
|
|
@@ -974,7 +976,7 @@ function isEnumDefaultedMember(node
|
|
|
974
976
|
function isEnumNumberBody(node
|
|
975
977
|
/*: ESNode | Token */
|
|
976
978
|
)
|
|
977
|
-
/*: node is EnumNumberBody */
|
|
979
|
+
/*: implies node is EnumNumberBody */
|
|
978
980
|
{
|
|
979
981
|
return node.type === 'EnumNumberBody';
|
|
980
982
|
}
|
|
@@ -982,7 +984,7 @@ function isEnumNumberBody(node
|
|
|
982
984
|
function isEnumNumberMember(node
|
|
983
985
|
/*: ESNode | Token */
|
|
984
986
|
)
|
|
985
|
-
/*: node is EnumNumberMember */
|
|
987
|
+
/*: implies node is EnumNumberMember */
|
|
986
988
|
{
|
|
987
989
|
return node.type === 'EnumNumberMember';
|
|
988
990
|
}
|
|
@@ -990,7 +992,7 @@ function isEnumNumberMember(node
|
|
|
990
992
|
function isEnumStringBody(node
|
|
991
993
|
/*: ESNode | Token */
|
|
992
994
|
)
|
|
993
|
-
/*: node is EnumStringBody */
|
|
995
|
+
/*: implies node is EnumStringBody */
|
|
994
996
|
{
|
|
995
997
|
return node.type === 'EnumStringBody';
|
|
996
998
|
}
|
|
@@ -998,7 +1000,7 @@ function isEnumStringBody(node
|
|
|
998
1000
|
function isEnumStringMember(node
|
|
999
1001
|
/*: ESNode | Token */
|
|
1000
1002
|
)
|
|
1001
|
-
/*: node is EnumStringMember */
|
|
1003
|
+
/*: implies node is EnumStringMember */
|
|
1002
1004
|
{
|
|
1003
1005
|
return node.type === 'EnumStringMember';
|
|
1004
1006
|
}
|
|
@@ -1006,7 +1008,7 @@ function isEnumStringMember(node
|
|
|
1006
1008
|
function isEnumSymbolBody(node
|
|
1007
1009
|
/*: ESNode | Token */
|
|
1008
1010
|
)
|
|
1009
|
-
/*: node is EnumSymbolBody */
|
|
1011
|
+
/*: implies node is EnumSymbolBody */
|
|
1010
1012
|
{
|
|
1011
1013
|
return node.type === 'EnumSymbolBody';
|
|
1012
1014
|
}
|
|
@@ -1014,7 +1016,7 @@ function isEnumSymbolBody(node
|
|
|
1014
1016
|
function isExistsTypeAnnotation(node
|
|
1015
1017
|
/*: ESNode | Token */
|
|
1016
1018
|
)
|
|
1017
|
-
/*: node is ExistsTypeAnnotation */
|
|
1019
|
+
/*: implies node is ExistsTypeAnnotation */
|
|
1018
1020
|
{
|
|
1019
1021
|
return node.type === 'ExistsTypeAnnotation';
|
|
1020
1022
|
}
|
|
@@ -1022,7 +1024,7 @@ function isExistsTypeAnnotation(node
|
|
|
1022
1024
|
function isExportAllDeclaration(node
|
|
1023
1025
|
/*: ESNode | Token */
|
|
1024
1026
|
)
|
|
1025
|
-
/*: node is ExportAllDeclaration */
|
|
1027
|
+
/*: implies node is ExportAllDeclaration */
|
|
1026
1028
|
{
|
|
1027
1029
|
return node.type === 'ExportAllDeclaration';
|
|
1028
1030
|
}
|
|
@@ -1030,7 +1032,7 @@ function isExportAllDeclaration(node
|
|
|
1030
1032
|
function isExportDefaultDeclaration(node
|
|
1031
1033
|
/*: ESNode | Token */
|
|
1032
1034
|
)
|
|
1033
|
-
/*: node is ExportDefaultDeclaration */
|
|
1035
|
+
/*: implies node is ExportDefaultDeclaration */
|
|
1034
1036
|
{
|
|
1035
1037
|
return node.type === 'ExportDefaultDeclaration';
|
|
1036
1038
|
}
|
|
@@ -1038,7 +1040,7 @@ function isExportDefaultDeclaration(node
|
|
|
1038
1040
|
function isExportNamedDeclaration(node
|
|
1039
1041
|
/*: ESNode | Token */
|
|
1040
1042
|
)
|
|
1041
|
-
/*: node is ExportNamedDeclaration */
|
|
1043
|
+
/*: implies node is ExportNamedDeclaration */
|
|
1042
1044
|
{
|
|
1043
1045
|
return node.type === 'ExportNamedDeclaration';
|
|
1044
1046
|
}
|
|
@@ -1046,7 +1048,7 @@ function isExportNamedDeclaration(node
|
|
|
1046
1048
|
function isExportSpecifier(node
|
|
1047
1049
|
/*: ESNode | Token */
|
|
1048
1050
|
)
|
|
1049
|
-
/*: node is ExportSpecifier */
|
|
1051
|
+
/*: implies node is ExportSpecifier */
|
|
1050
1052
|
{
|
|
1051
1053
|
return node.type === 'ExportSpecifier';
|
|
1052
1054
|
}
|
|
@@ -1054,7 +1056,7 @@ function isExportSpecifier(node
|
|
|
1054
1056
|
function isExpressionStatement(node
|
|
1055
1057
|
/*: ESNode | Token */
|
|
1056
1058
|
)
|
|
1057
|
-
/*: node is ExpressionStatement */
|
|
1059
|
+
/*: implies node is ExpressionStatement */
|
|
1058
1060
|
{
|
|
1059
1061
|
return node.type === 'ExpressionStatement';
|
|
1060
1062
|
}
|
|
@@ -1062,7 +1064,7 @@ function isExpressionStatement(node
|
|
|
1062
1064
|
function isForInStatement(node
|
|
1063
1065
|
/*: ESNode | Token */
|
|
1064
1066
|
)
|
|
1065
|
-
/*: node is ForInStatement */
|
|
1067
|
+
/*: implies node is ForInStatement */
|
|
1066
1068
|
{
|
|
1067
1069
|
return node.type === 'ForInStatement';
|
|
1068
1070
|
}
|
|
@@ -1070,7 +1072,7 @@ function isForInStatement(node
|
|
|
1070
1072
|
function isForOfStatement(node
|
|
1071
1073
|
/*: ESNode | Token */
|
|
1072
1074
|
)
|
|
1073
|
-
/*: node is ForOfStatement */
|
|
1075
|
+
/*: implies node is ForOfStatement */
|
|
1074
1076
|
{
|
|
1075
1077
|
return node.type === 'ForOfStatement';
|
|
1076
1078
|
}
|
|
@@ -1078,7 +1080,7 @@ function isForOfStatement(node
|
|
|
1078
1080
|
function isForStatement(node
|
|
1079
1081
|
/*: ESNode | Token */
|
|
1080
1082
|
)
|
|
1081
|
-
/*: node is ForStatement */
|
|
1083
|
+
/*: implies node is ForStatement */
|
|
1082
1084
|
{
|
|
1083
1085
|
return node.type === 'ForStatement';
|
|
1084
1086
|
}
|
|
@@ -1086,7 +1088,7 @@ function isForStatement(node
|
|
|
1086
1088
|
function isFunctionDeclaration(node
|
|
1087
1089
|
/*: ESNode | Token */
|
|
1088
1090
|
)
|
|
1089
|
-
/*: node is FunctionDeclaration */
|
|
1091
|
+
/*: implies node is FunctionDeclaration */
|
|
1090
1092
|
{
|
|
1091
1093
|
return node.type === 'FunctionDeclaration';
|
|
1092
1094
|
}
|
|
@@ -1094,7 +1096,7 @@ function isFunctionDeclaration(node
|
|
|
1094
1096
|
function isFunctionExpression(node
|
|
1095
1097
|
/*: ESNode | Token */
|
|
1096
1098
|
)
|
|
1097
|
-
/*: node is FunctionExpression */
|
|
1099
|
+
/*: implies node is FunctionExpression */
|
|
1098
1100
|
{
|
|
1099
1101
|
return node.type === 'FunctionExpression';
|
|
1100
1102
|
}
|
|
@@ -1102,7 +1104,7 @@ function isFunctionExpression(node
|
|
|
1102
1104
|
function isFunctionTypeAnnotation(node
|
|
1103
1105
|
/*: ESNode | Token */
|
|
1104
1106
|
)
|
|
1105
|
-
/*: node is FunctionTypeAnnotation */
|
|
1107
|
+
/*: implies node is FunctionTypeAnnotation */
|
|
1106
1108
|
{
|
|
1107
1109
|
return node.type === 'FunctionTypeAnnotation';
|
|
1108
1110
|
}
|
|
@@ -1110,7 +1112,7 @@ function isFunctionTypeAnnotation(node
|
|
|
1110
1112
|
function isFunctionTypeParam(node
|
|
1111
1113
|
/*: ESNode | Token */
|
|
1112
1114
|
)
|
|
1113
|
-
/*: node is FunctionTypeParam */
|
|
1115
|
+
/*: implies node is FunctionTypeParam */
|
|
1114
1116
|
{
|
|
1115
1117
|
return node.type === 'FunctionTypeParam';
|
|
1116
1118
|
}
|
|
@@ -1118,7 +1120,7 @@ function isFunctionTypeParam(node
|
|
|
1118
1120
|
function isGenericTypeAnnotation(node
|
|
1119
1121
|
/*: ESNode | Token */
|
|
1120
1122
|
)
|
|
1121
|
-
/*: node is GenericTypeAnnotation */
|
|
1123
|
+
/*: implies node is GenericTypeAnnotation */
|
|
1122
1124
|
{
|
|
1123
1125
|
return node.type === 'GenericTypeAnnotation';
|
|
1124
1126
|
}
|
|
@@ -1126,7 +1128,7 @@ function isGenericTypeAnnotation(node
|
|
|
1126
1128
|
function isHookDeclaration(node
|
|
1127
1129
|
/*: ESNode | Token */
|
|
1128
1130
|
)
|
|
1129
|
-
/*: node is HookDeclaration */
|
|
1131
|
+
/*: implies node is HookDeclaration */
|
|
1130
1132
|
{
|
|
1131
1133
|
return node.type === 'HookDeclaration';
|
|
1132
1134
|
}
|
|
@@ -1134,7 +1136,7 @@ function isHookDeclaration(node
|
|
|
1134
1136
|
function isHookTypeAnnotation(node
|
|
1135
1137
|
/*: ESNode | Token */
|
|
1136
1138
|
)
|
|
1137
|
-
/*: node is HookTypeAnnotation */
|
|
1139
|
+
/*: implies node is HookTypeAnnotation */
|
|
1138
1140
|
{
|
|
1139
1141
|
return node.type === 'HookTypeAnnotation';
|
|
1140
1142
|
}
|
|
@@ -1142,7 +1144,7 @@ function isHookTypeAnnotation(node
|
|
|
1142
1144
|
function isIfStatement(node
|
|
1143
1145
|
/*: ESNode | Token */
|
|
1144
1146
|
)
|
|
1145
|
-
/*: node is IfStatement */
|
|
1147
|
+
/*: implies node is IfStatement */
|
|
1146
1148
|
{
|
|
1147
1149
|
return node.type === 'IfStatement';
|
|
1148
1150
|
}
|
|
@@ -1150,7 +1152,7 @@ function isIfStatement(node
|
|
|
1150
1152
|
function isImportAttribute(node
|
|
1151
1153
|
/*: ESNode | Token */
|
|
1152
1154
|
)
|
|
1153
|
-
/*: node is ImportAttribute */
|
|
1155
|
+
/*: implies node is ImportAttribute */
|
|
1154
1156
|
{
|
|
1155
1157
|
return node.type === 'ImportAttribute';
|
|
1156
1158
|
}
|
|
@@ -1158,7 +1160,7 @@ function isImportAttribute(node
|
|
|
1158
1160
|
function isImportDeclaration(node
|
|
1159
1161
|
/*: ESNode | Token */
|
|
1160
1162
|
)
|
|
1161
|
-
/*: node is ImportDeclaration */
|
|
1163
|
+
/*: implies node is ImportDeclaration */
|
|
1162
1164
|
{
|
|
1163
1165
|
return node.type === 'ImportDeclaration';
|
|
1164
1166
|
}
|
|
@@ -1166,7 +1168,7 @@ function isImportDeclaration(node
|
|
|
1166
1168
|
function isImportDefaultSpecifier(node
|
|
1167
1169
|
/*: ESNode | Token */
|
|
1168
1170
|
)
|
|
1169
|
-
/*: node is ImportDefaultSpecifier */
|
|
1171
|
+
/*: implies node is ImportDefaultSpecifier */
|
|
1170
1172
|
{
|
|
1171
1173
|
return node.type === 'ImportDefaultSpecifier';
|
|
1172
1174
|
}
|
|
@@ -1174,7 +1176,7 @@ function isImportDefaultSpecifier(node
|
|
|
1174
1176
|
function isImportExpression(node
|
|
1175
1177
|
/*: ESNode | Token */
|
|
1176
1178
|
)
|
|
1177
|
-
/*: node is ImportExpression */
|
|
1179
|
+
/*: implies node is ImportExpression */
|
|
1178
1180
|
{
|
|
1179
1181
|
return node.type === 'ImportExpression';
|
|
1180
1182
|
}
|
|
@@ -1182,7 +1184,7 @@ function isImportExpression(node
|
|
|
1182
1184
|
function isImportNamespaceSpecifier(node
|
|
1183
1185
|
/*: ESNode | Token */
|
|
1184
1186
|
)
|
|
1185
|
-
/*: node is ImportNamespaceSpecifier */
|
|
1187
|
+
/*: implies node is ImportNamespaceSpecifier */
|
|
1186
1188
|
{
|
|
1187
1189
|
return node.type === 'ImportNamespaceSpecifier';
|
|
1188
1190
|
}
|
|
@@ -1190,7 +1192,7 @@ function isImportNamespaceSpecifier(node
|
|
|
1190
1192
|
function isImportSpecifier(node
|
|
1191
1193
|
/*: ESNode | Token */
|
|
1192
1194
|
)
|
|
1193
|
-
/*: node is ImportSpecifier */
|
|
1195
|
+
/*: implies node is ImportSpecifier */
|
|
1194
1196
|
{
|
|
1195
1197
|
return node.type === 'ImportSpecifier';
|
|
1196
1198
|
}
|
|
@@ -1198,7 +1200,7 @@ function isImportSpecifier(node
|
|
|
1198
1200
|
function isIndexedAccessType(node
|
|
1199
1201
|
/*: ESNode | Token */
|
|
1200
1202
|
)
|
|
1201
|
-
/*: node is IndexedAccessType */
|
|
1203
|
+
/*: implies node is IndexedAccessType */
|
|
1202
1204
|
{
|
|
1203
1205
|
return node.type === 'IndexedAccessType';
|
|
1204
1206
|
}
|
|
@@ -1206,7 +1208,7 @@ function isIndexedAccessType(node
|
|
|
1206
1208
|
function isInferredPredicate(node
|
|
1207
1209
|
/*: ESNode | Token */
|
|
1208
1210
|
)
|
|
1209
|
-
/*: node is InferredPredicate */
|
|
1211
|
+
/*: implies node is InferredPredicate */
|
|
1210
1212
|
{
|
|
1211
1213
|
return node.type === 'InferredPredicate';
|
|
1212
1214
|
}
|
|
@@ -1214,7 +1216,7 @@ function isInferredPredicate(node
|
|
|
1214
1216
|
function isInferTypeAnnotation(node
|
|
1215
1217
|
/*: ESNode | Token */
|
|
1216
1218
|
)
|
|
1217
|
-
/*: node is InferTypeAnnotation */
|
|
1219
|
+
/*: implies node is InferTypeAnnotation */
|
|
1218
1220
|
{
|
|
1219
1221
|
return node.type === 'InferTypeAnnotation';
|
|
1220
1222
|
}
|
|
@@ -1222,7 +1224,7 @@ function isInferTypeAnnotation(node
|
|
|
1222
1224
|
function isInterfaceDeclaration(node
|
|
1223
1225
|
/*: ESNode | Token */
|
|
1224
1226
|
)
|
|
1225
|
-
/*: node is InterfaceDeclaration */
|
|
1227
|
+
/*: implies node is InterfaceDeclaration */
|
|
1226
1228
|
{
|
|
1227
1229
|
return node.type === 'InterfaceDeclaration';
|
|
1228
1230
|
}
|
|
@@ -1230,7 +1232,7 @@ function isInterfaceDeclaration(node
|
|
|
1230
1232
|
function isInterfaceExtends(node
|
|
1231
1233
|
/*: ESNode | Token */
|
|
1232
1234
|
)
|
|
1233
|
-
/*: node is InterfaceExtends */
|
|
1235
|
+
/*: implies node is InterfaceExtends */
|
|
1234
1236
|
{
|
|
1235
1237
|
return node.type === 'InterfaceExtends';
|
|
1236
1238
|
}
|
|
@@ -1238,7 +1240,7 @@ function isInterfaceExtends(node
|
|
|
1238
1240
|
function isInterfaceTypeAnnotation(node
|
|
1239
1241
|
/*: ESNode | Token */
|
|
1240
1242
|
)
|
|
1241
|
-
/*: node is InterfaceTypeAnnotation */
|
|
1243
|
+
/*: implies node is InterfaceTypeAnnotation */
|
|
1242
1244
|
{
|
|
1243
1245
|
return node.type === 'InterfaceTypeAnnotation';
|
|
1244
1246
|
}
|
|
@@ -1246,7 +1248,7 @@ function isInterfaceTypeAnnotation(node
|
|
|
1246
1248
|
function isIntersectionTypeAnnotation(node
|
|
1247
1249
|
/*: ESNode | Token */
|
|
1248
1250
|
)
|
|
1249
|
-
/*: node is IntersectionTypeAnnotation */
|
|
1251
|
+
/*: implies node is IntersectionTypeAnnotation */
|
|
1250
1252
|
{
|
|
1251
1253
|
return node.type === 'IntersectionTypeAnnotation';
|
|
1252
1254
|
}
|
|
@@ -1254,7 +1256,7 @@ function isIntersectionTypeAnnotation(node
|
|
|
1254
1256
|
function isJSXAttribute(node
|
|
1255
1257
|
/*: ESNode | Token */
|
|
1256
1258
|
)
|
|
1257
|
-
/*: node is JSXAttribute */
|
|
1259
|
+
/*: implies node is JSXAttribute */
|
|
1258
1260
|
{
|
|
1259
1261
|
return node.type === 'JSXAttribute';
|
|
1260
1262
|
}
|
|
@@ -1262,7 +1264,7 @@ function isJSXAttribute(node
|
|
|
1262
1264
|
function isJSXClosingElement(node
|
|
1263
1265
|
/*: ESNode | Token */
|
|
1264
1266
|
)
|
|
1265
|
-
/*: node is JSXClosingElement */
|
|
1267
|
+
/*: implies node is JSXClosingElement */
|
|
1266
1268
|
{
|
|
1267
1269
|
return node.type === 'JSXClosingElement';
|
|
1268
1270
|
}
|
|
@@ -1270,7 +1272,7 @@ function isJSXClosingElement(node
|
|
|
1270
1272
|
function isJSXClosingFragment(node
|
|
1271
1273
|
/*: ESNode | Token */
|
|
1272
1274
|
)
|
|
1273
|
-
/*: node is JSXClosingFragment */
|
|
1275
|
+
/*: implies node is JSXClosingFragment */
|
|
1274
1276
|
{
|
|
1275
1277
|
return node.type === 'JSXClosingFragment';
|
|
1276
1278
|
}
|
|
@@ -1278,7 +1280,7 @@ function isJSXClosingFragment(node
|
|
|
1278
1280
|
function isJSXElement(node
|
|
1279
1281
|
/*: ESNode | Token */
|
|
1280
1282
|
)
|
|
1281
|
-
/*: node is JSXElement */
|
|
1283
|
+
/*: implies node is JSXElement */
|
|
1282
1284
|
{
|
|
1283
1285
|
return node.type === 'JSXElement';
|
|
1284
1286
|
}
|
|
@@ -1286,7 +1288,7 @@ function isJSXElement(node
|
|
|
1286
1288
|
function isJSXEmptyExpression(node
|
|
1287
1289
|
/*: ESNode | Token */
|
|
1288
1290
|
)
|
|
1289
|
-
/*: node is JSXEmptyExpression */
|
|
1291
|
+
/*: implies node is JSXEmptyExpression */
|
|
1290
1292
|
{
|
|
1291
1293
|
return node.type === 'JSXEmptyExpression';
|
|
1292
1294
|
}
|
|
@@ -1294,7 +1296,7 @@ function isJSXEmptyExpression(node
|
|
|
1294
1296
|
function isJSXExpressionContainer(node
|
|
1295
1297
|
/*: ESNode | Token */
|
|
1296
1298
|
)
|
|
1297
|
-
/*: node is JSXExpressionContainer */
|
|
1299
|
+
/*: implies node is JSXExpressionContainer */
|
|
1298
1300
|
{
|
|
1299
1301
|
return node.type === 'JSXExpressionContainer';
|
|
1300
1302
|
}
|
|
@@ -1302,7 +1304,7 @@ function isJSXExpressionContainer(node
|
|
|
1302
1304
|
function isJSXFragment(node
|
|
1303
1305
|
/*: ESNode | Token */
|
|
1304
1306
|
)
|
|
1305
|
-
/*: node is JSXFragment */
|
|
1307
|
+
/*: implies node is JSXFragment */
|
|
1306
1308
|
{
|
|
1307
1309
|
return node.type === 'JSXFragment';
|
|
1308
1310
|
}
|
|
@@ -1310,7 +1312,7 @@ function isJSXFragment(node
|
|
|
1310
1312
|
function isJSXMemberExpression(node
|
|
1311
1313
|
/*: ESNode | Token */
|
|
1312
1314
|
)
|
|
1313
|
-
/*: node is JSXMemberExpression */
|
|
1315
|
+
/*: implies node is JSXMemberExpression */
|
|
1314
1316
|
{
|
|
1315
1317
|
return node.type === 'JSXMemberExpression';
|
|
1316
1318
|
}
|
|
@@ -1318,7 +1320,7 @@ function isJSXMemberExpression(node
|
|
|
1318
1320
|
function isJSXNamespacedName(node
|
|
1319
1321
|
/*: ESNode | Token */
|
|
1320
1322
|
)
|
|
1321
|
-
/*: node is JSXNamespacedName */
|
|
1323
|
+
/*: implies node is JSXNamespacedName */
|
|
1322
1324
|
{
|
|
1323
1325
|
return node.type === 'JSXNamespacedName';
|
|
1324
1326
|
}
|
|
@@ -1326,7 +1328,7 @@ function isJSXNamespacedName(node
|
|
|
1326
1328
|
function isJSXOpeningElement(node
|
|
1327
1329
|
/*: ESNode | Token */
|
|
1328
1330
|
)
|
|
1329
|
-
/*: node is JSXOpeningElement */
|
|
1331
|
+
/*: implies node is JSXOpeningElement */
|
|
1330
1332
|
{
|
|
1331
1333
|
return node.type === 'JSXOpeningElement';
|
|
1332
1334
|
}
|
|
@@ -1334,7 +1336,7 @@ function isJSXOpeningElement(node
|
|
|
1334
1336
|
function isJSXOpeningFragment(node
|
|
1335
1337
|
/*: ESNode | Token */
|
|
1336
1338
|
)
|
|
1337
|
-
/*: node is JSXOpeningFragment */
|
|
1339
|
+
/*: implies node is JSXOpeningFragment */
|
|
1338
1340
|
{
|
|
1339
1341
|
return node.type === 'JSXOpeningFragment';
|
|
1340
1342
|
}
|
|
@@ -1342,7 +1344,7 @@ function isJSXOpeningFragment(node
|
|
|
1342
1344
|
function isJSXSpreadAttribute(node
|
|
1343
1345
|
/*: ESNode | Token */
|
|
1344
1346
|
)
|
|
1345
|
-
/*: node is JSXSpreadAttribute */
|
|
1347
|
+
/*: implies node is JSXSpreadAttribute */
|
|
1346
1348
|
{
|
|
1347
1349
|
return node.type === 'JSXSpreadAttribute';
|
|
1348
1350
|
}
|
|
@@ -1350,7 +1352,7 @@ function isJSXSpreadAttribute(node
|
|
|
1350
1352
|
function isJSXSpreadChild(node
|
|
1351
1353
|
/*: ESNode | Token */
|
|
1352
1354
|
)
|
|
1353
|
-
/*: node is JSXSpreadChild */
|
|
1355
|
+
/*: implies node is JSXSpreadChild */
|
|
1354
1356
|
{
|
|
1355
1357
|
return node.type === 'JSXSpreadChild';
|
|
1356
1358
|
}
|
|
@@ -1358,7 +1360,7 @@ function isJSXSpreadChild(node
|
|
|
1358
1360
|
function isKeyofTypeAnnotation(node
|
|
1359
1361
|
/*: ESNode | Token */
|
|
1360
1362
|
)
|
|
1361
|
-
/*: node is KeyofTypeAnnotation */
|
|
1363
|
+
/*: implies node is KeyofTypeAnnotation */
|
|
1362
1364
|
{
|
|
1363
1365
|
return node.type === 'KeyofTypeAnnotation';
|
|
1364
1366
|
}
|
|
@@ -1366,7 +1368,7 @@ function isKeyofTypeAnnotation(node
|
|
|
1366
1368
|
function isLabeledStatement(node
|
|
1367
1369
|
/*: ESNode | Token */
|
|
1368
1370
|
)
|
|
1369
|
-
/*: node is LabeledStatement */
|
|
1371
|
+
/*: implies node is LabeledStatement */
|
|
1370
1372
|
{
|
|
1371
1373
|
return node.type === 'LabeledStatement';
|
|
1372
1374
|
}
|
|
@@ -1374,7 +1376,7 @@ function isLabeledStatement(node
|
|
|
1374
1376
|
function isLogicalExpression(node
|
|
1375
1377
|
/*: ESNode | Token */
|
|
1376
1378
|
)
|
|
1377
|
-
/*: node is LogicalExpression */
|
|
1379
|
+
/*: implies node is LogicalExpression */
|
|
1378
1380
|
{
|
|
1379
1381
|
return node.type === 'LogicalExpression';
|
|
1380
1382
|
}
|
|
@@ -1382,7 +1384,7 @@ function isLogicalExpression(node
|
|
|
1382
1384
|
function isMemberExpression(node
|
|
1383
1385
|
/*: ESNode | Token */
|
|
1384
1386
|
)
|
|
1385
|
-
/*: node is MemberExpression */
|
|
1387
|
+
/*: implies node is MemberExpression */
|
|
1386
1388
|
{
|
|
1387
1389
|
return node.type === 'MemberExpression';
|
|
1388
1390
|
}
|
|
@@ -1390,7 +1392,7 @@ function isMemberExpression(node
|
|
|
1390
1392
|
function isMetaProperty(node
|
|
1391
1393
|
/*: ESNode | Token */
|
|
1392
1394
|
)
|
|
1393
|
-
/*: node is MetaProperty */
|
|
1395
|
+
/*: implies node is MetaProperty */
|
|
1394
1396
|
{
|
|
1395
1397
|
return node.type === 'MetaProperty';
|
|
1396
1398
|
}
|
|
@@ -1398,7 +1400,7 @@ function isMetaProperty(node
|
|
|
1398
1400
|
function isMethodDefinition(node
|
|
1399
1401
|
/*: ESNode | Token */
|
|
1400
1402
|
)
|
|
1401
|
-
/*: node is MethodDefinition */
|
|
1403
|
+
/*: implies node is MethodDefinition */
|
|
1402
1404
|
{
|
|
1403
1405
|
return node.type === 'MethodDefinition';
|
|
1404
1406
|
}
|
|
@@ -1406,7 +1408,7 @@ function isMethodDefinition(node
|
|
|
1406
1408
|
function isMixedTypeAnnotation(node
|
|
1407
1409
|
/*: ESNode | Token */
|
|
1408
1410
|
)
|
|
1409
|
-
/*: node is MixedTypeAnnotation */
|
|
1411
|
+
/*: implies node is MixedTypeAnnotation */
|
|
1410
1412
|
{
|
|
1411
1413
|
return node.type === 'MixedTypeAnnotation';
|
|
1412
1414
|
}
|
|
@@ -1414,7 +1416,7 @@ function isMixedTypeAnnotation(node
|
|
|
1414
1416
|
function isNewExpression(node
|
|
1415
1417
|
/*: ESNode | Token */
|
|
1416
1418
|
)
|
|
1417
|
-
/*: node is NewExpression */
|
|
1419
|
+
/*: implies node is NewExpression */
|
|
1418
1420
|
{
|
|
1419
1421
|
return node.type === 'NewExpression';
|
|
1420
1422
|
}
|
|
@@ -1422,7 +1424,7 @@ function isNewExpression(node
|
|
|
1422
1424
|
function isNullableTypeAnnotation(node
|
|
1423
1425
|
/*: ESNode | Token */
|
|
1424
1426
|
)
|
|
1425
|
-
/*: node is NullableTypeAnnotation */
|
|
1427
|
+
/*: implies node is NullableTypeAnnotation */
|
|
1426
1428
|
{
|
|
1427
1429
|
return node.type === 'NullableTypeAnnotation';
|
|
1428
1430
|
}
|
|
@@ -1430,7 +1432,7 @@ function isNullableTypeAnnotation(node
|
|
|
1430
1432
|
function isNullLiteralTypeAnnotation(node
|
|
1431
1433
|
/*: ESNode | Token */
|
|
1432
1434
|
)
|
|
1433
|
-
/*: node is NullLiteralTypeAnnotation */
|
|
1435
|
+
/*: implies node is NullLiteralTypeAnnotation */
|
|
1434
1436
|
{
|
|
1435
1437
|
return node.type === 'NullLiteralTypeAnnotation';
|
|
1436
1438
|
}
|
|
@@ -1438,7 +1440,7 @@ function isNullLiteralTypeAnnotation(node
|
|
|
1438
1440
|
function isNumberLiteralTypeAnnotation(node
|
|
1439
1441
|
/*: ESNode | Token */
|
|
1440
1442
|
)
|
|
1441
|
-
/*: node is NumberLiteralTypeAnnotation */
|
|
1443
|
+
/*: implies node is NumberLiteralTypeAnnotation */
|
|
1442
1444
|
{
|
|
1443
1445
|
return node.type === 'NumberLiteralTypeAnnotation';
|
|
1444
1446
|
}
|
|
@@ -1446,7 +1448,7 @@ function isNumberLiteralTypeAnnotation(node
|
|
|
1446
1448
|
function isNumberTypeAnnotation(node
|
|
1447
1449
|
/*: ESNode | Token */
|
|
1448
1450
|
)
|
|
1449
|
-
/*: node is NumberTypeAnnotation */
|
|
1451
|
+
/*: implies node is NumberTypeAnnotation */
|
|
1450
1452
|
{
|
|
1451
1453
|
return node.type === 'NumberTypeAnnotation';
|
|
1452
1454
|
}
|
|
@@ -1454,7 +1456,7 @@ function isNumberTypeAnnotation(node
|
|
|
1454
1456
|
function isObjectExpression(node
|
|
1455
1457
|
/*: ESNode | Token */
|
|
1456
1458
|
)
|
|
1457
|
-
/*: node is ObjectExpression */
|
|
1459
|
+
/*: implies node is ObjectExpression */
|
|
1458
1460
|
{
|
|
1459
1461
|
return node.type === 'ObjectExpression';
|
|
1460
1462
|
}
|
|
@@ -1462,7 +1464,7 @@ function isObjectExpression(node
|
|
|
1462
1464
|
function isObjectPattern(node
|
|
1463
1465
|
/*: ESNode | Token */
|
|
1464
1466
|
)
|
|
1465
|
-
/*: node is ObjectPattern */
|
|
1467
|
+
/*: implies node is ObjectPattern */
|
|
1466
1468
|
{
|
|
1467
1469
|
return node.type === 'ObjectPattern';
|
|
1468
1470
|
}
|
|
@@ -1470,7 +1472,7 @@ function isObjectPattern(node
|
|
|
1470
1472
|
function isObjectTypeAnnotation(node
|
|
1471
1473
|
/*: ESNode | Token */
|
|
1472
1474
|
)
|
|
1473
|
-
/*: node is ObjectTypeAnnotation */
|
|
1475
|
+
/*: implies node is ObjectTypeAnnotation */
|
|
1474
1476
|
{
|
|
1475
1477
|
return node.type === 'ObjectTypeAnnotation';
|
|
1476
1478
|
}
|
|
@@ -1478,7 +1480,7 @@ function isObjectTypeAnnotation(node
|
|
|
1478
1480
|
function isObjectTypeCallProperty(node
|
|
1479
1481
|
/*: ESNode | Token */
|
|
1480
1482
|
)
|
|
1481
|
-
/*: node is ObjectTypeCallProperty */
|
|
1483
|
+
/*: implies node is ObjectTypeCallProperty */
|
|
1482
1484
|
{
|
|
1483
1485
|
return node.type === 'ObjectTypeCallProperty';
|
|
1484
1486
|
}
|
|
@@ -1486,7 +1488,7 @@ function isObjectTypeCallProperty(node
|
|
|
1486
1488
|
function isObjectTypeIndexer(node
|
|
1487
1489
|
/*: ESNode | Token */
|
|
1488
1490
|
)
|
|
1489
|
-
/*: node is ObjectTypeIndexer */
|
|
1491
|
+
/*: implies node is ObjectTypeIndexer */
|
|
1490
1492
|
{
|
|
1491
1493
|
return node.type === 'ObjectTypeIndexer';
|
|
1492
1494
|
}
|
|
@@ -1494,7 +1496,7 @@ function isObjectTypeIndexer(node
|
|
|
1494
1496
|
function isObjectTypeInternalSlot(node
|
|
1495
1497
|
/*: ESNode | Token */
|
|
1496
1498
|
)
|
|
1497
|
-
/*: node is ObjectTypeInternalSlot */
|
|
1499
|
+
/*: implies node is ObjectTypeInternalSlot */
|
|
1498
1500
|
{
|
|
1499
1501
|
return node.type === 'ObjectTypeInternalSlot';
|
|
1500
1502
|
}
|
|
@@ -1502,7 +1504,7 @@ function isObjectTypeInternalSlot(node
|
|
|
1502
1504
|
function isObjectTypeMappedTypeProperty(node
|
|
1503
1505
|
/*: ESNode | Token */
|
|
1504
1506
|
)
|
|
1505
|
-
/*: node is ObjectTypeMappedTypeProperty */
|
|
1507
|
+
/*: implies node is ObjectTypeMappedTypeProperty */
|
|
1506
1508
|
{
|
|
1507
1509
|
return node.type === 'ObjectTypeMappedTypeProperty';
|
|
1508
1510
|
}
|
|
@@ -1510,7 +1512,7 @@ function isObjectTypeMappedTypeProperty(node
|
|
|
1510
1512
|
function isObjectTypeProperty(node
|
|
1511
1513
|
/*: ESNode | Token */
|
|
1512
1514
|
)
|
|
1513
|
-
/*: node is ObjectTypeProperty */
|
|
1515
|
+
/*: implies node is ObjectTypeProperty */
|
|
1514
1516
|
{
|
|
1515
1517
|
return node.type === 'ObjectTypeProperty';
|
|
1516
1518
|
}
|
|
@@ -1518,7 +1520,7 @@ function isObjectTypeProperty(node
|
|
|
1518
1520
|
function isObjectTypeSpreadProperty(node
|
|
1519
1521
|
/*: ESNode | Token */
|
|
1520
1522
|
)
|
|
1521
|
-
/*: node is ObjectTypeSpreadProperty */
|
|
1523
|
+
/*: implies node is ObjectTypeSpreadProperty */
|
|
1522
1524
|
{
|
|
1523
1525
|
return node.type === 'ObjectTypeSpreadProperty';
|
|
1524
1526
|
}
|
|
@@ -1526,7 +1528,7 @@ function isObjectTypeSpreadProperty(node
|
|
|
1526
1528
|
function isOpaqueType(node
|
|
1527
1529
|
/*: ESNode | Token */
|
|
1528
1530
|
)
|
|
1529
|
-
/*: node is OpaqueType */
|
|
1531
|
+
/*: implies node is OpaqueType */
|
|
1530
1532
|
{
|
|
1531
1533
|
return node.type === 'OpaqueType';
|
|
1532
1534
|
}
|
|
@@ -1534,7 +1536,7 @@ function isOpaqueType(node
|
|
|
1534
1536
|
function isOptionalIndexedAccessType(node
|
|
1535
1537
|
/*: ESNode | Token */
|
|
1536
1538
|
)
|
|
1537
|
-
/*: node is OptionalIndexedAccessType */
|
|
1539
|
+
/*: implies node is OptionalIndexedAccessType */
|
|
1538
1540
|
{
|
|
1539
1541
|
return node.type === 'OptionalIndexedAccessType';
|
|
1540
1542
|
}
|
|
@@ -1542,15 +1544,23 @@ function isOptionalIndexedAccessType(node
|
|
|
1542
1544
|
function isPrivateIdentifier(node
|
|
1543
1545
|
/*: ESNode | Token */
|
|
1544
1546
|
)
|
|
1545
|
-
/*: node is PrivateIdentifier */
|
|
1547
|
+
/*: implies node is PrivateIdentifier */
|
|
1546
1548
|
{
|
|
1547
1549
|
return node.type === 'PrivateIdentifier';
|
|
1548
1550
|
}
|
|
1549
1551
|
|
|
1552
|
+
function isProgram(node
|
|
1553
|
+
/*: ESNode | Token */
|
|
1554
|
+
)
|
|
1555
|
+
/*: implies node is Program */
|
|
1556
|
+
{
|
|
1557
|
+
return node.type === 'Program';
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1550
1560
|
function isProperty(node
|
|
1551
1561
|
/*: ESNode | Token */
|
|
1552
1562
|
)
|
|
1553
|
-
/*: node is Property */
|
|
1563
|
+
/*: implies node is Property */
|
|
1554
1564
|
{
|
|
1555
1565
|
return node.type === 'Property';
|
|
1556
1566
|
}
|
|
@@ -1558,7 +1568,7 @@ function isProperty(node
|
|
|
1558
1568
|
function isPropertyDefinition(node
|
|
1559
1569
|
/*: ESNode | Token */
|
|
1560
1570
|
)
|
|
1561
|
-
/*: node is PropertyDefinition */
|
|
1571
|
+
/*: implies node is PropertyDefinition */
|
|
1562
1572
|
{
|
|
1563
1573
|
return node.type === 'PropertyDefinition';
|
|
1564
1574
|
}
|
|
@@ -1566,7 +1576,7 @@ function isPropertyDefinition(node
|
|
|
1566
1576
|
function isQualifiedTypeIdentifier(node
|
|
1567
1577
|
/*: ESNode | Token */
|
|
1568
1578
|
)
|
|
1569
|
-
/*: node is QualifiedTypeIdentifier */
|
|
1579
|
+
/*: implies node is QualifiedTypeIdentifier */
|
|
1570
1580
|
{
|
|
1571
1581
|
return node.type === 'QualifiedTypeIdentifier';
|
|
1572
1582
|
}
|
|
@@ -1574,7 +1584,7 @@ function isQualifiedTypeIdentifier(node
|
|
|
1574
1584
|
function isQualifiedTypeofIdentifier(node
|
|
1575
1585
|
/*: ESNode | Token */
|
|
1576
1586
|
)
|
|
1577
|
-
/*: node is QualifiedTypeofIdentifier */
|
|
1587
|
+
/*: implies node is QualifiedTypeofIdentifier */
|
|
1578
1588
|
{
|
|
1579
1589
|
return node.type === 'QualifiedTypeofIdentifier';
|
|
1580
1590
|
}
|
|
@@ -1582,7 +1592,7 @@ function isQualifiedTypeofIdentifier(node
|
|
|
1582
1592
|
function isRestElement(node
|
|
1583
1593
|
/*: ESNode | Token */
|
|
1584
1594
|
)
|
|
1585
|
-
/*: node is RestElement */
|
|
1595
|
+
/*: implies node is RestElement */
|
|
1586
1596
|
{
|
|
1587
1597
|
return node.type === 'RestElement';
|
|
1588
1598
|
}
|
|
@@ -1590,7 +1600,7 @@ function isRestElement(node
|
|
|
1590
1600
|
function isReturnStatement(node
|
|
1591
1601
|
/*: ESNode | Token */
|
|
1592
1602
|
)
|
|
1593
|
-
/*: node is ReturnStatement */
|
|
1603
|
+
/*: implies node is ReturnStatement */
|
|
1594
1604
|
{
|
|
1595
1605
|
return node.type === 'ReturnStatement';
|
|
1596
1606
|
}
|
|
@@ -1598,7 +1608,7 @@ function isReturnStatement(node
|
|
|
1598
1608
|
function isSequenceExpression(node
|
|
1599
1609
|
/*: ESNode | Token */
|
|
1600
1610
|
)
|
|
1601
|
-
/*: node is SequenceExpression */
|
|
1611
|
+
/*: implies node is SequenceExpression */
|
|
1602
1612
|
{
|
|
1603
1613
|
return node.type === 'SequenceExpression';
|
|
1604
1614
|
}
|
|
@@ -1606,7 +1616,7 @@ function isSequenceExpression(node
|
|
|
1606
1616
|
function isSpreadElement(node
|
|
1607
1617
|
/*: ESNode | Token */
|
|
1608
1618
|
)
|
|
1609
|
-
/*: node is SpreadElement */
|
|
1619
|
+
/*: implies node is SpreadElement */
|
|
1610
1620
|
{
|
|
1611
1621
|
return node.type === 'SpreadElement';
|
|
1612
1622
|
}
|
|
@@ -1614,7 +1624,7 @@ function isSpreadElement(node
|
|
|
1614
1624
|
function isStringLiteralTypeAnnotation(node
|
|
1615
1625
|
/*: ESNode | Token */
|
|
1616
1626
|
)
|
|
1617
|
-
/*: node is StringLiteralTypeAnnotation */
|
|
1627
|
+
/*: implies node is StringLiteralTypeAnnotation */
|
|
1618
1628
|
{
|
|
1619
1629
|
return node.type === 'StringLiteralTypeAnnotation';
|
|
1620
1630
|
}
|
|
@@ -1622,7 +1632,7 @@ function isStringLiteralTypeAnnotation(node
|
|
|
1622
1632
|
function isStringTypeAnnotation(node
|
|
1623
1633
|
/*: ESNode | Token */
|
|
1624
1634
|
)
|
|
1625
|
-
/*: node is StringTypeAnnotation */
|
|
1635
|
+
/*: implies node is StringTypeAnnotation */
|
|
1626
1636
|
{
|
|
1627
1637
|
return node.type === 'StringTypeAnnotation';
|
|
1628
1638
|
}
|
|
@@ -1630,7 +1640,7 @@ function isStringTypeAnnotation(node
|
|
|
1630
1640
|
function isSuper(node
|
|
1631
1641
|
/*: ESNode | Token */
|
|
1632
1642
|
)
|
|
1633
|
-
/*: node is Super */
|
|
1643
|
+
/*: implies node is Super */
|
|
1634
1644
|
{
|
|
1635
1645
|
return node.type === 'Super';
|
|
1636
1646
|
}
|
|
@@ -1638,7 +1648,7 @@ function isSuper(node
|
|
|
1638
1648
|
function isSwitchCase(node
|
|
1639
1649
|
/*: ESNode | Token */
|
|
1640
1650
|
)
|
|
1641
|
-
/*: node is SwitchCase */
|
|
1651
|
+
/*: implies node is SwitchCase */
|
|
1642
1652
|
{
|
|
1643
1653
|
return node.type === 'SwitchCase';
|
|
1644
1654
|
}
|
|
@@ -1646,7 +1656,7 @@ function isSwitchCase(node
|
|
|
1646
1656
|
function isSwitchStatement(node
|
|
1647
1657
|
/*: ESNode | Token */
|
|
1648
1658
|
)
|
|
1649
|
-
/*: node is SwitchStatement */
|
|
1659
|
+
/*: implies node is SwitchStatement */
|
|
1650
1660
|
{
|
|
1651
1661
|
return node.type === 'SwitchStatement';
|
|
1652
1662
|
}
|
|
@@ -1654,7 +1664,7 @@ function isSwitchStatement(node
|
|
|
1654
1664
|
function isSymbolTypeAnnotation(node
|
|
1655
1665
|
/*: ESNode | Token */
|
|
1656
1666
|
)
|
|
1657
|
-
/*: node is SymbolTypeAnnotation */
|
|
1667
|
+
/*: implies node is SymbolTypeAnnotation */
|
|
1658
1668
|
{
|
|
1659
1669
|
return node.type === 'SymbolTypeAnnotation';
|
|
1660
1670
|
}
|
|
@@ -1662,7 +1672,7 @@ function isSymbolTypeAnnotation(node
|
|
|
1662
1672
|
function isTaggedTemplateExpression(node
|
|
1663
1673
|
/*: ESNode | Token */
|
|
1664
1674
|
)
|
|
1665
|
-
/*: node is TaggedTemplateExpression */
|
|
1675
|
+
/*: implies node is TaggedTemplateExpression */
|
|
1666
1676
|
{
|
|
1667
1677
|
return node.type === 'TaggedTemplateExpression';
|
|
1668
1678
|
}
|
|
@@ -1670,7 +1680,7 @@ function isTaggedTemplateExpression(node
|
|
|
1670
1680
|
function isTemplateElement(node
|
|
1671
1681
|
/*: ESNode | Token */
|
|
1672
1682
|
)
|
|
1673
|
-
/*: node is TemplateElement */
|
|
1683
|
+
/*: implies node is TemplateElement */
|
|
1674
1684
|
{
|
|
1675
1685
|
return node.type === 'TemplateElement';
|
|
1676
1686
|
}
|
|
@@ -1678,7 +1688,7 @@ function isTemplateElement(node
|
|
|
1678
1688
|
function isTemplateLiteral(node
|
|
1679
1689
|
/*: ESNode | Token */
|
|
1680
1690
|
)
|
|
1681
|
-
/*: node is TemplateLiteral */
|
|
1691
|
+
/*: implies node is TemplateLiteral */
|
|
1682
1692
|
{
|
|
1683
1693
|
return node.type === 'TemplateLiteral';
|
|
1684
1694
|
}
|
|
@@ -1686,7 +1696,7 @@ function isTemplateLiteral(node
|
|
|
1686
1696
|
function isThisExpression(node
|
|
1687
1697
|
/*: ESNode | Token */
|
|
1688
1698
|
)
|
|
1689
|
-
/*: node is ThisExpression */
|
|
1699
|
+
/*: implies node is ThisExpression */
|
|
1690
1700
|
{
|
|
1691
1701
|
return node.type === 'ThisExpression';
|
|
1692
1702
|
}
|
|
@@ -1694,7 +1704,7 @@ function isThisExpression(node
|
|
|
1694
1704
|
function isThisTypeAnnotation(node
|
|
1695
1705
|
/*: ESNode | Token */
|
|
1696
1706
|
)
|
|
1697
|
-
/*: node is ThisTypeAnnotation */
|
|
1707
|
+
/*: implies node is ThisTypeAnnotation */
|
|
1698
1708
|
{
|
|
1699
1709
|
return node.type === 'ThisTypeAnnotation';
|
|
1700
1710
|
}
|
|
@@ -1702,7 +1712,7 @@ function isThisTypeAnnotation(node
|
|
|
1702
1712
|
function isThrowStatement(node
|
|
1703
1713
|
/*: ESNode | Token */
|
|
1704
1714
|
)
|
|
1705
|
-
/*: node is ThrowStatement */
|
|
1715
|
+
/*: implies node is ThrowStatement */
|
|
1706
1716
|
{
|
|
1707
1717
|
return node.type === 'ThrowStatement';
|
|
1708
1718
|
}
|
|
@@ -1710,7 +1720,7 @@ function isThrowStatement(node
|
|
|
1710
1720
|
function isTryStatement(node
|
|
1711
1721
|
/*: ESNode | Token */
|
|
1712
1722
|
)
|
|
1713
|
-
/*: node is TryStatement */
|
|
1723
|
+
/*: implies node is TryStatement */
|
|
1714
1724
|
{
|
|
1715
1725
|
return node.type === 'TryStatement';
|
|
1716
1726
|
}
|
|
@@ -1718,7 +1728,7 @@ function isTryStatement(node
|
|
|
1718
1728
|
function isTupleTypeAnnotation(node
|
|
1719
1729
|
/*: ESNode | Token */
|
|
1720
1730
|
)
|
|
1721
|
-
/*: node is TupleTypeAnnotation */
|
|
1731
|
+
/*: implies node is TupleTypeAnnotation */
|
|
1722
1732
|
{
|
|
1723
1733
|
return node.type === 'TupleTypeAnnotation';
|
|
1724
1734
|
}
|
|
@@ -1726,7 +1736,7 @@ function isTupleTypeAnnotation(node
|
|
|
1726
1736
|
function isTupleTypeLabeledElement(node
|
|
1727
1737
|
/*: ESNode | Token */
|
|
1728
1738
|
)
|
|
1729
|
-
/*: node is TupleTypeLabeledElement */
|
|
1739
|
+
/*: implies node is TupleTypeLabeledElement */
|
|
1730
1740
|
{
|
|
1731
1741
|
return node.type === 'TupleTypeLabeledElement';
|
|
1732
1742
|
}
|
|
@@ -1734,7 +1744,7 @@ function isTupleTypeLabeledElement(node
|
|
|
1734
1744
|
function isTupleTypeSpreadElement(node
|
|
1735
1745
|
/*: ESNode | Token */
|
|
1736
1746
|
)
|
|
1737
|
-
/*: node is TupleTypeSpreadElement */
|
|
1747
|
+
/*: implies node is TupleTypeSpreadElement */
|
|
1738
1748
|
{
|
|
1739
1749
|
return node.type === 'TupleTypeSpreadElement';
|
|
1740
1750
|
}
|
|
@@ -1742,7 +1752,7 @@ function isTupleTypeSpreadElement(node
|
|
|
1742
1752
|
function isTypeAlias(node
|
|
1743
1753
|
/*: ESNode | Token */
|
|
1744
1754
|
)
|
|
1745
|
-
/*: node is TypeAlias */
|
|
1755
|
+
/*: implies node is TypeAlias */
|
|
1746
1756
|
{
|
|
1747
1757
|
return node.type === 'TypeAlias';
|
|
1748
1758
|
}
|
|
@@ -1750,7 +1760,7 @@ function isTypeAlias(node
|
|
|
1750
1760
|
function isTypeAnnotation(node
|
|
1751
1761
|
/*: ESNode | Token */
|
|
1752
1762
|
)
|
|
1753
|
-
/*: node is TypeAnnotation */
|
|
1763
|
+
/*: implies node is TypeAnnotation */
|
|
1754
1764
|
{
|
|
1755
1765
|
return node.type === 'TypeAnnotation';
|
|
1756
1766
|
}
|
|
@@ -1758,7 +1768,7 @@ function isTypeAnnotation(node
|
|
|
1758
1768
|
function isTypeCastExpression(node
|
|
1759
1769
|
/*: ESNode | Token */
|
|
1760
1770
|
)
|
|
1761
|
-
/*: node is TypeCastExpression */
|
|
1771
|
+
/*: implies node is TypeCastExpression */
|
|
1762
1772
|
{
|
|
1763
1773
|
return node.type === 'TypeCastExpression';
|
|
1764
1774
|
}
|
|
@@ -1766,7 +1776,7 @@ function isTypeCastExpression(node
|
|
|
1766
1776
|
function isTypeofTypeAnnotation(node
|
|
1767
1777
|
/*: ESNode | Token */
|
|
1768
1778
|
)
|
|
1769
|
-
/*: node is TypeofTypeAnnotation */
|
|
1779
|
+
/*: implies node is TypeofTypeAnnotation */
|
|
1770
1780
|
{
|
|
1771
1781
|
return node.type === 'TypeofTypeAnnotation';
|
|
1772
1782
|
}
|
|
@@ -1774,7 +1784,7 @@ function isTypeofTypeAnnotation(node
|
|
|
1774
1784
|
function isTypeOperator(node
|
|
1775
1785
|
/*: ESNode | Token */
|
|
1776
1786
|
)
|
|
1777
|
-
/*: node is TypeOperator */
|
|
1787
|
+
/*: implies node is TypeOperator */
|
|
1778
1788
|
{
|
|
1779
1789
|
return node.type === 'TypeOperator';
|
|
1780
1790
|
}
|
|
@@ -1782,7 +1792,7 @@ function isTypeOperator(node
|
|
|
1782
1792
|
function isTypeParameter(node
|
|
1783
1793
|
/*: ESNode | Token */
|
|
1784
1794
|
)
|
|
1785
|
-
/*: node is TypeParameter */
|
|
1795
|
+
/*: implies node is TypeParameter */
|
|
1786
1796
|
{
|
|
1787
1797
|
return node.type === 'TypeParameter';
|
|
1788
1798
|
}
|
|
@@ -1790,7 +1800,7 @@ function isTypeParameter(node
|
|
|
1790
1800
|
function isTypeParameterDeclaration(node
|
|
1791
1801
|
/*: ESNode | Token */
|
|
1792
1802
|
)
|
|
1793
|
-
/*: node is TypeParameterDeclaration */
|
|
1803
|
+
/*: implies node is TypeParameterDeclaration */
|
|
1794
1804
|
{
|
|
1795
1805
|
return node.type === 'TypeParameterDeclaration';
|
|
1796
1806
|
}
|
|
@@ -1798,7 +1808,7 @@ function isTypeParameterDeclaration(node
|
|
|
1798
1808
|
function isTypeParameterInstantiation(node
|
|
1799
1809
|
/*: ESNode | Token */
|
|
1800
1810
|
)
|
|
1801
|
-
/*: node is TypeParameterInstantiation */
|
|
1811
|
+
/*: implies node is TypeParameterInstantiation */
|
|
1802
1812
|
{
|
|
1803
1813
|
return node.type === 'TypeParameterInstantiation';
|
|
1804
1814
|
}
|
|
@@ -1806,7 +1816,7 @@ function isTypeParameterInstantiation(node
|
|
|
1806
1816
|
function isTypePredicate(node
|
|
1807
1817
|
/*: ESNode | Token */
|
|
1808
1818
|
)
|
|
1809
|
-
/*: node is TypePredicate */
|
|
1819
|
+
/*: implies node is TypePredicate */
|
|
1810
1820
|
{
|
|
1811
1821
|
return node.type === 'TypePredicate';
|
|
1812
1822
|
}
|
|
@@ -1814,7 +1824,7 @@ function isTypePredicate(node
|
|
|
1814
1824
|
function isUnaryExpression(node
|
|
1815
1825
|
/*: ESNode | Token */
|
|
1816
1826
|
)
|
|
1817
|
-
/*: node is UnaryExpression */
|
|
1827
|
+
/*: implies node is UnaryExpression */
|
|
1818
1828
|
{
|
|
1819
1829
|
return node.type === 'UnaryExpression';
|
|
1820
1830
|
}
|
|
@@ -1822,7 +1832,7 @@ function isUnaryExpression(node
|
|
|
1822
1832
|
function isUnionTypeAnnotation(node
|
|
1823
1833
|
/*: ESNode | Token */
|
|
1824
1834
|
)
|
|
1825
|
-
/*: node is UnionTypeAnnotation */
|
|
1835
|
+
/*: implies node is UnionTypeAnnotation */
|
|
1826
1836
|
{
|
|
1827
1837
|
return node.type === 'UnionTypeAnnotation';
|
|
1828
1838
|
}
|
|
@@ -1830,7 +1840,7 @@ function isUnionTypeAnnotation(node
|
|
|
1830
1840
|
function isUpdateExpression(node
|
|
1831
1841
|
/*: ESNode | Token */
|
|
1832
1842
|
)
|
|
1833
|
-
/*: node is UpdateExpression */
|
|
1843
|
+
/*: implies node is UpdateExpression */
|
|
1834
1844
|
{
|
|
1835
1845
|
return node.type === 'UpdateExpression';
|
|
1836
1846
|
}
|
|
@@ -1838,7 +1848,7 @@ function isUpdateExpression(node
|
|
|
1838
1848
|
function isVariableDeclaration(node
|
|
1839
1849
|
/*: ESNode | Token */
|
|
1840
1850
|
)
|
|
1841
|
-
/*: node is VariableDeclaration */
|
|
1851
|
+
/*: implies node is VariableDeclaration */
|
|
1842
1852
|
{
|
|
1843
1853
|
return node.type === 'VariableDeclaration';
|
|
1844
1854
|
}
|
|
@@ -1846,7 +1856,7 @@ function isVariableDeclaration(node
|
|
|
1846
1856
|
function isVariableDeclarator(node
|
|
1847
1857
|
/*: ESNode | Token */
|
|
1848
1858
|
)
|
|
1849
|
-
/*: node is VariableDeclarator */
|
|
1859
|
+
/*: implies node is VariableDeclarator */
|
|
1850
1860
|
{
|
|
1851
1861
|
return node.type === 'VariableDeclarator';
|
|
1852
1862
|
}
|
|
@@ -1854,7 +1864,7 @@ function isVariableDeclarator(node
|
|
|
1854
1864
|
function isVariance(node
|
|
1855
1865
|
/*: ESNode | Token */
|
|
1856
1866
|
)
|
|
1857
|
-
/*: node is Variance */
|
|
1867
|
+
/*: implies node is Variance */
|
|
1858
1868
|
{
|
|
1859
1869
|
return node.type === 'Variance';
|
|
1860
1870
|
}
|
|
@@ -1862,7 +1872,7 @@ function isVariance(node
|
|
|
1862
1872
|
function isVoidTypeAnnotation(node
|
|
1863
1873
|
/*: ESNode | Token */
|
|
1864
1874
|
)
|
|
1865
|
-
/*: node is VoidTypeAnnotation */
|
|
1875
|
+
/*: implies node is VoidTypeAnnotation */
|
|
1866
1876
|
{
|
|
1867
1877
|
return node.type === 'VoidTypeAnnotation';
|
|
1868
1878
|
}
|
|
@@ -1870,7 +1880,7 @@ function isVoidTypeAnnotation(node
|
|
|
1870
1880
|
function isWhileStatement(node
|
|
1871
1881
|
/*: ESNode | Token */
|
|
1872
1882
|
)
|
|
1873
|
-
/*: node is WhileStatement */
|
|
1883
|
+
/*: implies node is WhileStatement */
|
|
1874
1884
|
{
|
|
1875
1885
|
return node.type === 'WhileStatement';
|
|
1876
1886
|
}
|
|
@@ -1878,7 +1888,7 @@ function isWhileStatement(node
|
|
|
1878
1888
|
function isWithStatement(node
|
|
1879
1889
|
/*: ESNode | Token */
|
|
1880
1890
|
)
|
|
1881
|
-
/*: node is WithStatement */
|
|
1891
|
+
/*: implies node is WithStatement */
|
|
1882
1892
|
{
|
|
1883
1893
|
return node.type === 'WithStatement';
|
|
1884
1894
|
}
|
|
@@ -1886,7 +1896,7 @@ function isWithStatement(node
|
|
|
1886
1896
|
function isYieldExpression(node
|
|
1887
1897
|
/*: ESNode | Token */
|
|
1888
1898
|
)
|
|
1889
|
-
/*: node is YieldExpression */
|
|
1899
|
+
/*: implies node is YieldExpression */
|
|
1890
1900
|
{
|
|
1891
1901
|
return node.type === 'YieldExpression';
|
|
1892
1902
|
}
|
|
@@ -1894,7 +1904,7 @@ function isYieldExpression(node
|
|
|
1894
1904
|
function isLiteral(node
|
|
1895
1905
|
/*: ESNode | Token */
|
|
1896
1906
|
)
|
|
1897
|
-
/*: node is Literal */
|
|
1907
|
+
/*: implies node is Literal */
|
|
1898
1908
|
{
|
|
1899
1909
|
return node.type === 'Literal';
|
|
1900
1910
|
}
|
|
@@ -1902,7 +1912,7 @@ function isLiteral(node
|
|
|
1902
1912
|
function isLineComment(node
|
|
1903
1913
|
/*: ESNode | Token */
|
|
1904
1914
|
)
|
|
1905
|
-
/*: node is (MostTokens | LineComment) */
|
|
1915
|
+
/*: implies node is (MostTokens | LineComment) */
|
|
1906
1916
|
{
|
|
1907
1917
|
return node.type === 'Line';
|
|
1908
1918
|
}
|
|
@@ -1910,7 +1920,7 @@ function isLineComment(node
|
|
|
1910
1920
|
function isBlockComment(node
|
|
1911
1921
|
/*: ESNode | Token */
|
|
1912
1922
|
)
|
|
1913
|
-
/*: node is (MostTokens | BlockComment) */
|
|
1923
|
+
/*: implies node is (MostTokens | BlockComment) */
|
|
1914
1924
|
{
|
|
1915
1925
|
return node.type === 'Block';
|
|
1916
1926
|
}
|
|
@@ -1918,7 +1928,7 @@ function isBlockComment(node
|
|
|
1918
1928
|
function isMinusToken(node
|
|
1919
1929
|
/*: ESNode | Token */
|
|
1920
1930
|
)
|
|
1921
|
-
/*: node is MostTokens */
|
|
1931
|
+
/*: implies node is MostTokens */
|
|
1922
1932
|
{
|
|
1923
1933
|
return node.type === 'Punctuator' && node.value === '-';
|
|
1924
1934
|
}
|
|
@@ -1926,7 +1936,7 @@ function isMinusToken(node
|
|
|
1926
1936
|
function isPlusToken(node
|
|
1927
1937
|
/*: ESNode | Token */
|
|
1928
1938
|
)
|
|
1929
|
-
/*: node is MostTokens */
|
|
1939
|
+
/*: implies node is MostTokens */
|
|
1930
1940
|
{
|
|
1931
1941
|
return node.type === 'Punctuator' && node.value === '+';
|
|
1932
1942
|
}
|
|
@@ -1934,7 +1944,7 @@ function isPlusToken(node
|
|
|
1934
1944
|
function isLogicalNotToken(node
|
|
1935
1945
|
/*: ESNode | Token */
|
|
1936
1946
|
)
|
|
1937
|
-
/*: node is MostTokens */
|
|
1947
|
+
/*: implies node is MostTokens */
|
|
1938
1948
|
{
|
|
1939
1949
|
return node.type === 'Punctuator' && node.value === '!';
|
|
1940
1950
|
}
|
|
@@ -1942,7 +1952,7 @@ function isLogicalNotToken(node
|
|
|
1942
1952
|
function isUnaryNegationToken(node
|
|
1943
1953
|
/*: ESNode | Token */
|
|
1944
1954
|
)
|
|
1945
|
-
/*: node is MostTokens */
|
|
1955
|
+
/*: implies node is MostTokens */
|
|
1946
1956
|
{
|
|
1947
1957
|
return node.type === 'Punctuator' && node.value === '~';
|
|
1948
1958
|
}
|
|
@@ -1950,7 +1960,7 @@ function isUnaryNegationToken(node
|
|
|
1950
1960
|
function isTypeOfToken(node
|
|
1951
1961
|
/*: ESNode | Token */
|
|
1952
1962
|
)
|
|
1953
|
-
/*: node is MostTokens */
|
|
1963
|
+
/*: implies node is MostTokens */
|
|
1954
1964
|
{
|
|
1955
1965
|
return node.type === 'Keyword' && node.value === 'typeof';
|
|
1956
1966
|
}
|
|
@@ -1958,7 +1968,7 @@ function isTypeOfToken(node
|
|
|
1958
1968
|
function isVoidToken(node
|
|
1959
1969
|
/*: ESNode | Token */
|
|
1960
1970
|
)
|
|
1961
|
-
/*: node is MostTokens */
|
|
1971
|
+
/*: implies node is MostTokens */
|
|
1962
1972
|
{
|
|
1963
1973
|
return node.type === 'Keyword' && node.value === 'void';
|
|
1964
1974
|
}
|
|
@@ -1966,7 +1976,7 @@ function isVoidToken(node
|
|
|
1966
1976
|
function isDeleteToken(node
|
|
1967
1977
|
/*: ESNode | Token */
|
|
1968
1978
|
)
|
|
1969
|
-
/*: node is MostTokens */
|
|
1979
|
+
/*: implies node is MostTokens */
|
|
1970
1980
|
{
|
|
1971
1981
|
return node.type === 'Keyword' && node.value === 'delete';
|
|
1972
1982
|
}
|
|
@@ -1974,7 +1984,7 @@ function isDeleteToken(node
|
|
|
1974
1984
|
function isLooseEqualToken(node
|
|
1975
1985
|
/*: ESNode | Token */
|
|
1976
1986
|
)
|
|
1977
|
-
/*: node is MostTokens */
|
|
1987
|
+
/*: implies node is MostTokens */
|
|
1978
1988
|
{
|
|
1979
1989
|
return node.type === 'Punctuator' && node.value === '==';
|
|
1980
1990
|
}
|
|
@@ -1982,7 +1992,7 @@ function isLooseEqualToken(node
|
|
|
1982
1992
|
function isLooseNotEqualToken(node
|
|
1983
1993
|
/*: ESNode | Token */
|
|
1984
1994
|
)
|
|
1985
|
-
/*: node is MostTokens */
|
|
1995
|
+
/*: implies node is MostTokens */
|
|
1986
1996
|
{
|
|
1987
1997
|
return node.type === 'Punctuator' && node.value === '!=';
|
|
1988
1998
|
}
|
|
@@ -1990,7 +2000,7 @@ function isLooseNotEqualToken(node
|
|
|
1990
2000
|
function isStrictEqualToken(node
|
|
1991
2001
|
/*: ESNode | Token */
|
|
1992
2002
|
)
|
|
1993
|
-
/*: node is MostTokens */
|
|
2003
|
+
/*: implies node is MostTokens */
|
|
1994
2004
|
{
|
|
1995
2005
|
return node.type === 'Punctuator' && node.value === '===';
|
|
1996
2006
|
}
|
|
@@ -1998,7 +2008,7 @@ function isStrictEqualToken(node
|
|
|
1998
2008
|
function isStrictNotEqualToken(node
|
|
1999
2009
|
/*: ESNode | Token */
|
|
2000
2010
|
)
|
|
2001
|
-
/*: node is MostTokens */
|
|
2011
|
+
/*: implies node is MostTokens */
|
|
2002
2012
|
{
|
|
2003
2013
|
return node.type === 'Punctuator' && node.value === '!==';
|
|
2004
2014
|
}
|
|
@@ -2006,7 +2016,7 @@ function isStrictNotEqualToken(node
|
|
|
2006
2016
|
function isLessThanToken(node
|
|
2007
2017
|
/*: ESNode | Token */
|
|
2008
2018
|
)
|
|
2009
|
-
/*: node is MostTokens */
|
|
2019
|
+
/*: implies node is MostTokens */
|
|
2010
2020
|
{
|
|
2011
2021
|
return node.type === 'Punctuator' && node.value === '<';
|
|
2012
2022
|
}
|
|
@@ -2014,7 +2024,7 @@ function isLessThanToken(node
|
|
|
2014
2024
|
function isLessThanOrEqualToToken(node
|
|
2015
2025
|
/*: ESNode | Token */
|
|
2016
2026
|
)
|
|
2017
|
-
/*: node is MostTokens */
|
|
2027
|
+
/*: implies node is MostTokens */
|
|
2018
2028
|
{
|
|
2019
2029
|
return node.type === 'Punctuator' && node.value === '<=';
|
|
2020
2030
|
}
|
|
@@ -2022,7 +2032,7 @@ function isLessThanOrEqualToToken(node
|
|
|
2022
2032
|
function isGreaterThanToken(node
|
|
2023
2033
|
/*: ESNode | Token */
|
|
2024
2034
|
)
|
|
2025
|
-
/*: node is MostTokens */
|
|
2035
|
+
/*: implies node is MostTokens */
|
|
2026
2036
|
{
|
|
2027
2037
|
return node.type === 'Punctuator' && node.value === '>';
|
|
2028
2038
|
}
|
|
@@ -2030,7 +2040,7 @@ function isGreaterThanToken(node
|
|
|
2030
2040
|
function isGreaterThanOrEqualToToken(node
|
|
2031
2041
|
/*: ESNode | Token */
|
|
2032
2042
|
)
|
|
2033
|
-
/*: node is MostTokens */
|
|
2043
|
+
/*: implies node is MostTokens */
|
|
2034
2044
|
{
|
|
2035
2045
|
return node.type === 'Punctuator' && node.value === '>=';
|
|
2036
2046
|
}
|
|
@@ -2038,7 +2048,7 @@ function isGreaterThanOrEqualToToken(node
|
|
|
2038
2048
|
function isBitwiseLeftShiftToken(node
|
|
2039
2049
|
/*: ESNode | Token */
|
|
2040
2050
|
)
|
|
2041
|
-
/*: node is MostTokens */
|
|
2051
|
+
/*: implies node is MostTokens */
|
|
2042
2052
|
{
|
|
2043
2053
|
return node.type === 'Punctuator' && node.value === '<<';
|
|
2044
2054
|
}
|
|
@@ -2046,7 +2056,7 @@ function isBitwiseLeftShiftToken(node
|
|
|
2046
2056
|
function isBitwiseRightShiftToken(node
|
|
2047
2057
|
/*: ESNode | Token */
|
|
2048
2058
|
)
|
|
2049
|
-
/*: node is MostTokens */
|
|
2059
|
+
/*: implies node is MostTokens */
|
|
2050
2060
|
{
|
|
2051
2061
|
return node.type === 'Punctuator' && node.value === '>>';
|
|
2052
2062
|
}
|
|
@@ -2054,7 +2064,7 @@ function isBitwiseRightShiftToken(node
|
|
|
2054
2064
|
function isBitwiseUnsignedRightShiftToken(node
|
|
2055
2065
|
/*: ESNode | Token */
|
|
2056
2066
|
)
|
|
2057
|
-
/*: node is MostTokens */
|
|
2067
|
+
/*: implies node is MostTokens */
|
|
2058
2068
|
{
|
|
2059
2069
|
return node.type === 'Punctuator' && node.value === '>>>';
|
|
2060
2070
|
}
|
|
@@ -2062,7 +2072,7 @@ function isBitwiseUnsignedRightShiftToken(node
|
|
|
2062
2072
|
function isAsterixToken(node
|
|
2063
2073
|
/*: ESNode | Token */
|
|
2064
2074
|
)
|
|
2065
|
-
/*: node is MostTokens */
|
|
2075
|
+
/*: implies node is MostTokens */
|
|
2066
2076
|
{
|
|
2067
2077
|
return node.type === 'Punctuator' && node.value === '*';
|
|
2068
2078
|
}
|
|
@@ -2070,7 +2080,7 @@ function isAsterixToken(node
|
|
|
2070
2080
|
function isForwardSlashToken(node
|
|
2071
2081
|
/*: ESNode | Token */
|
|
2072
2082
|
)
|
|
2073
|
-
/*: node is MostTokens */
|
|
2083
|
+
/*: implies node is MostTokens */
|
|
2074
2084
|
{
|
|
2075
2085
|
return node.type === 'Punctuator' && node.value === '/';
|
|
2076
2086
|
}
|
|
@@ -2078,7 +2088,7 @@ function isForwardSlashToken(node
|
|
|
2078
2088
|
function isPercentToken(node
|
|
2079
2089
|
/*: ESNode | Token */
|
|
2080
2090
|
)
|
|
2081
|
-
/*: node is MostTokens */
|
|
2091
|
+
/*: implies node is MostTokens */
|
|
2082
2092
|
{
|
|
2083
2093
|
return node.type === 'Punctuator' && node.value === '%';
|
|
2084
2094
|
}
|
|
@@ -2086,7 +2096,7 @@ function isPercentToken(node
|
|
|
2086
2096
|
function isExponentiationToken(node
|
|
2087
2097
|
/*: ESNode | Token */
|
|
2088
2098
|
)
|
|
2089
|
-
/*: node is MostTokens */
|
|
2099
|
+
/*: implies node is MostTokens */
|
|
2090
2100
|
{
|
|
2091
2101
|
return node.type === 'Punctuator' && node.value === '**';
|
|
2092
2102
|
}
|
|
@@ -2094,7 +2104,7 @@ function isExponentiationToken(node
|
|
|
2094
2104
|
function isBitwiseORToken(node
|
|
2095
2105
|
/*: ESNode | Token */
|
|
2096
2106
|
)
|
|
2097
|
-
/*: node is MostTokens */
|
|
2107
|
+
/*: implies node is MostTokens */
|
|
2098
2108
|
{
|
|
2099
2109
|
return node.type === 'Punctuator' && node.value === '|';
|
|
2100
2110
|
}
|
|
@@ -2102,7 +2112,7 @@ function isBitwiseORToken(node
|
|
|
2102
2112
|
function isBitwiseXORToken(node
|
|
2103
2113
|
/*: ESNode | Token */
|
|
2104
2114
|
)
|
|
2105
|
-
/*: node is MostTokens */
|
|
2115
|
+
/*: implies node is MostTokens */
|
|
2106
2116
|
{
|
|
2107
2117
|
return node.type === 'Punctuator' && node.value === '^';
|
|
2108
2118
|
}
|
|
@@ -2110,7 +2120,7 @@ function isBitwiseXORToken(node
|
|
|
2110
2120
|
function isBitwiseANDToken(node
|
|
2111
2121
|
/*: ESNode | Token */
|
|
2112
2122
|
)
|
|
2113
|
-
/*: node is MostTokens */
|
|
2123
|
+
/*: implies node is MostTokens */
|
|
2114
2124
|
{
|
|
2115
2125
|
return node.type === 'Punctuator' && node.value === '&';
|
|
2116
2126
|
}
|
|
@@ -2118,7 +2128,7 @@ function isBitwiseANDToken(node
|
|
|
2118
2128
|
function isInToken(node
|
|
2119
2129
|
/*: ESNode | Token */
|
|
2120
2130
|
)
|
|
2121
|
-
/*: node is MostTokens */
|
|
2131
|
+
/*: implies node is MostTokens */
|
|
2122
2132
|
{
|
|
2123
2133
|
return node.type === 'Keyword' && node.value === 'in';
|
|
2124
2134
|
}
|
|
@@ -2126,7 +2136,7 @@ function isInToken(node
|
|
|
2126
2136
|
function isInstanceOfToken(node
|
|
2127
2137
|
/*: ESNode | Token */
|
|
2128
2138
|
)
|
|
2129
|
-
/*: node is MostTokens */
|
|
2139
|
+
/*: implies node is MostTokens */
|
|
2130
2140
|
{
|
|
2131
2141
|
return node.type === 'Keyword' && node.value === 'instanceof';
|
|
2132
2142
|
}
|
|
@@ -2134,7 +2144,7 @@ function isInstanceOfToken(node
|
|
|
2134
2144
|
function isLogicalORToken(node
|
|
2135
2145
|
/*: ESNode | Token */
|
|
2136
2146
|
)
|
|
2137
|
-
/*: node is MostTokens */
|
|
2147
|
+
/*: implies node is MostTokens */
|
|
2138
2148
|
{
|
|
2139
2149
|
return node.type === 'Punctuator' && node.value === '||';
|
|
2140
2150
|
}
|
|
@@ -2142,7 +2152,7 @@ function isLogicalORToken(node
|
|
|
2142
2152
|
function isLogicalANDToken(node
|
|
2143
2153
|
/*: ESNode | Token */
|
|
2144
2154
|
)
|
|
2145
|
-
/*: node is MostTokens */
|
|
2155
|
+
/*: implies node is MostTokens */
|
|
2146
2156
|
{
|
|
2147
2157
|
return node.type === 'Punctuator' && node.value === '&&';
|
|
2148
2158
|
}
|
|
@@ -2150,7 +2160,7 @@ function isLogicalANDToken(node
|
|
|
2150
2160
|
function isNullishCoalesceToken(node
|
|
2151
2161
|
/*: ESNode | Token */
|
|
2152
2162
|
)
|
|
2153
|
-
/*: node is MostTokens */
|
|
2163
|
+
/*: implies node is MostTokens */
|
|
2154
2164
|
{
|
|
2155
2165
|
return node.type === 'Punctuator' && node.value === '??';
|
|
2156
2166
|
}
|
|
@@ -2158,7 +2168,7 @@ function isNullishCoalesceToken(node
|
|
|
2158
2168
|
function isEqualToken(node
|
|
2159
2169
|
/*: ESNode | Token */
|
|
2160
2170
|
)
|
|
2161
|
-
/*: node is MostTokens */
|
|
2171
|
+
/*: implies node is MostTokens */
|
|
2162
2172
|
{
|
|
2163
2173
|
return node.type === 'Punctuator' && node.value === '=';
|
|
2164
2174
|
}
|
|
@@ -2166,7 +2176,7 @@ function isEqualToken(node
|
|
|
2166
2176
|
function isPlusEqualToken(node
|
|
2167
2177
|
/*: ESNode | Token */
|
|
2168
2178
|
)
|
|
2169
|
-
/*: node is MostTokens */
|
|
2179
|
+
/*: implies node is MostTokens */
|
|
2170
2180
|
{
|
|
2171
2181
|
return node.type === 'Punctuator' && node.value === '+=';
|
|
2172
2182
|
}
|
|
@@ -2174,7 +2184,7 @@ function isPlusEqualToken(node
|
|
|
2174
2184
|
function isMinusEqualToken(node
|
|
2175
2185
|
/*: ESNode | Token */
|
|
2176
2186
|
)
|
|
2177
|
-
/*: node is MostTokens */
|
|
2187
|
+
/*: implies node is MostTokens */
|
|
2178
2188
|
{
|
|
2179
2189
|
return node.type === 'Punctuator' && node.value === '-=';
|
|
2180
2190
|
}
|
|
@@ -2182,7 +2192,7 @@ function isMinusEqualToken(node
|
|
|
2182
2192
|
function isMultiplyEqualToken(node
|
|
2183
2193
|
/*: ESNode | Token */
|
|
2184
2194
|
)
|
|
2185
|
-
/*: node is MostTokens */
|
|
2195
|
+
/*: implies node is MostTokens */
|
|
2186
2196
|
{
|
|
2187
2197
|
return node.type === 'Punctuator' && node.value === '*=';
|
|
2188
2198
|
}
|
|
@@ -2190,7 +2200,7 @@ function isMultiplyEqualToken(node
|
|
|
2190
2200
|
function isDivideEqualToken(node
|
|
2191
2201
|
/*: ESNode | Token */
|
|
2192
2202
|
)
|
|
2193
|
-
/*: node is MostTokens */
|
|
2203
|
+
/*: implies node is MostTokens */
|
|
2194
2204
|
{
|
|
2195
2205
|
return node.type === 'Punctuator' && node.value === '/=';
|
|
2196
2206
|
}
|
|
@@ -2198,7 +2208,7 @@ function isDivideEqualToken(node
|
|
|
2198
2208
|
function isRemainderEqualToken(node
|
|
2199
2209
|
/*: ESNode | Token */
|
|
2200
2210
|
)
|
|
2201
|
-
/*: node is MostTokens */
|
|
2211
|
+
/*: implies node is MostTokens */
|
|
2202
2212
|
{
|
|
2203
2213
|
return node.type === 'Punctuator' && node.value === '%=';
|
|
2204
2214
|
}
|
|
@@ -2206,7 +2216,7 @@ function isRemainderEqualToken(node
|
|
|
2206
2216
|
function isExponentateEqualToken(node
|
|
2207
2217
|
/*: ESNode | Token */
|
|
2208
2218
|
)
|
|
2209
|
-
/*: node is MostTokens */
|
|
2219
|
+
/*: implies node is MostTokens */
|
|
2210
2220
|
{
|
|
2211
2221
|
return node.type === 'Punctuator' && node.value === '**=';
|
|
2212
2222
|
}
|
|
@@ -2214,7 +2224,7 @@ function isExponentateEqualToken(node
|
|
|
2214
2224
|
function isBitwiseLeftShiftEqualToken(node
|
|
2215
2225
|
/*: ESNode | Token */
|
|
2216
2226
|
)
|
|
2217
|
-
/*: node is MostTokens */
|
|
2227
|
+
/*: implies node is MostTokens */
|
|
2218
2228
|
{
|
|
2219
2229
|
return node.type === 'Punctuator' && node.value === '<<=';
|
|
2220
2230
|
}
|
|
@@ -2222,7 +2232,7 @@ function isBitwiseLeftShiftEqualToken(node
|
|
|
2222
2232
|
function isBitwiseRightShiftEqualToken(node
|
|
2223
2233
|
/*: ESNode | Token */
|
|
2224
2234
|
)
|
|
2225
|
-
/*: node is MostTokens */
|
|
2235
|
+
/*: implies node is MostTokens */
|
|
2226
2236
|
{
|
|
2227
2237
|
return node.type === 'Punctuator' && node.value === '>>=';
|
|
2228
2238
|
}
|
|
@@ -2230,7 +2240,7 @@ function isBitwiseRightShiftEqualToken(node
|
|
|
2230
2240
|
function isBitwiseUnsignedRightShiftEqualToken(node
|
|
2231
2241
|
/*: ESNode | Token */
|
|
2232
2242
|
)
|
|
2233
|
-
/*: node is MostTokens */
|
|
2243
|
+
/*: implies node is MostTokens */
|
|
2234
2244
|
{
|
|
2235
2245
|
return node.type === 'Punctuator' && node.value === '>>>=';
|
|
2236
2246
|
}
|
|
@@ -2238,7 +2248,7 @@ function isBitwiseUnsignedRightShiftEqualToken(node
|
|
|
2238
2248
|
function isBitwiseOREqualToken(node
|
|
2239
2249
|
/*: ESNode | Token */
|
|
2240
2250
|
)
|
|
2241
|
-
/*: node is MostTokens */
|
|
2251
|
+
/*: implies node is MostTokens */
|
|
2242
2252
|
{
|
|
2243
2253
|
return node.type === 'Punctuator' && node.value === '|=';
|
|
2244
2254
|
}
|
|
@@ -2246,7 +2256,7 @@ function isBitwiseOREqualToken(node
|
|
|
2246
2256
|
function isBitwiseXOREqualToken(node
|
|
2247
2257
|
/*: ESNode | Token */
|
|
2248
2258
|
)
|
|
2249
|
-
/*: node is MostTokens */
|
|
2259
|
+
/*: implies node is MostTokens */
|
|
2250
2260
|
{
|
|
2251
2261
|
return node.type === 'Punctuator' && node.value === '^=';
|
|
2252
2262
|
}
|
|
@@ -2254,7 +2264,7 @@ function isBitwiseXOREqualToken(node
|
|
|
2254
2264
|
function isBitwiseANDEqualToken(node
|
|
2255
2265
|
/*: ESNode | Token */
|
|
2256
2266
|
)
|
|
2257
|
-
/*: node is MostTokens */
|
|
2267
|
+
/*: implies node is MostTokens */
|
|
2258
2268
|
{
|
|
2259
2269
|
return node.type === 'Punctuator' && node.value === '&=';
|
|
2260
2270
|
}
|
|
@@ -2262,7 +2272,7 @@ function isBitwiseANDEqualToken(node
|
|
|
2262
2272
|
function isLogicalOREqualToken(node
|
|
2263
2273
|
/*: ESNode | Token */
|
|
2264
2274
|
)
|
|
2265
|
-
/*: node is MostTokens */
|
|
2275
|
+
/*: implies node is MostTokens */
|
|
2266
2276
|
{
|
|
2267
2277
|
return node.type === 'Punctuator' && node.value === '||=';
|
|
2268
2278
|
}
|
|
@@ -2270,7 +2280,7 @@ function isLogicalOREqualToken(node
|
|
|
2270
2280
|
function isLogicalANDEqualToken(node
|
|
2271
2281
|
/*: ESNode | Token */
|
|
2272
2282
|
)
|
|
2273
|
-
/*: node is MostTokens */
|
|
2283
|
+
/*: implies node is MostTokens */
|
|
2274
2284
|
{
|
|
2275
2285
|
return node.type === 'Punctuator' && node.value === '&&=';
|
|
2276
2286
|
}
|
|
@@ -2278,7 +2288,7 @@ function isLogicalANDEqualToken(node
|
|
|
2278
2288
|
function isNullishCoalesceEqualToken(node
|
|
2279
2289
|
/*: ESNode | Token */
|
|
2280
2290
|
)
|
|
2281
|
-
/*: node is MostTokens */
|
|
2291
|
+
/*: implies node is MostTokens */
|
|
2282
2292
|
{
|
|
2283
2293
|
return node.type === 'Punctuator' && node.value === '??=';
|
|
2284
2294
|
}
|
|
@@ -2286,7 +2296,7 @@ function isNullishCoalesceEqualToken(node
|
|
|
2286
2296
|
function isIncrementToken(node
|
|
2287
2297
|
/*: ESNode | Token */
|
|
2288
2298
|
)
|
|
2289
|
-
/*: node is MostTokens */
|
|
2299
|
+
/*: implies node is MostTokens */
|
|
2290
2300
|
{
|
|
2291
2301
|
return node.type === 'Punctuator' && node.value === '++';
|
|
2292
2302
|
}
|
|
@@ -2294,7 +2304,7 @@ function isIncrementToken(node
|
|
|
2294
2304
|
function isDecrementToken(node
|
|
2295
2305
|
/*: ESNode | Token */
|
|
2296
2306
|
)
|
|
2297
|
-
/*: node is MostTokens */
|
|
2307
|
+
/*: implies node is MostTokens */
|
|
2298
2308
|
{
|
|
2299
2309
|
return node.type === 'Punctuator' && node.value === '--';
|
|
2300
2310
|
}
|
|
@@ -2302,7 +2312,7 @@ function isDecrementToken(node
|
|
|
2302
2312
|
function isUnionTypeToken(node
|
|
2303
2313
|
/*: ESNode | Token */
|
|
2304
2314
|
)
|
|
2305
|
-
/*: node is MostTokens */
|
|
2315
|
+
/*: implies node is MostTokens */
|
|
2306
2316
|
{
|
|
2307
2317
|
return node.type === 'Punctuator' && node.value === '|';
|
|
2308
2318
|
}
|
|
@@ -2310,7 +2320,7 @@ function isUnionTypeToken(node
|
|
|
2310
2320
|
function isIntersectionTypeToken(node
|
|
2311
2321
|
/*: ESNode | Token */
|
|
2312
2322
|
)
|
|
2313
|
-
/*: node is MostTokens */
|
|
2323
|
+
/*: implies node is MostTokens */
|
|
2314
2324
|
{
|
|
2315
2325
|
return node.type === 'Punctuator' && node.value === '&';
|
|
2316
2326
|
}
|
|
@@ -2318,7 +2328,7 @@ function isIntersectionTypeToken(node
|
|
|
2318
2328
|
function isBreakToken(node
|
|
2319
2329
|
/*: ESNode | Token */
|
|
2320
2330
|
)
|
|
2321
|
-
/*: node is MostTokens */
|
|
2331
|
+
/*: implies node is MostTokens */
|
|
2322
2332
|
{
|
|
2323
2333
|
return node.type === 'Keyword' && node.value === 'break';
|
|
2324
2334
|
}
|
|
@@ -2326,7 +2336,7 @@ function isBreakToken(node
|
|
|
2326
2336
|
function isCaseToken(node
|
|
2327
2337
|
/*: ESNode | Token */
|
|
2328
2338
|
)
|
|
2329
|
-
/*: node is MostTokens */
|
|
2339
|
+
/*: implies node is MostTokens */
|
|
2330
2340
|
{
|
|
2331
2341
|
return node.type === 'Keyword' && node.value === 'case';
|
|
2332
2342
|
}
|
|
@@ -2334,7 +2344,7 @@ function isCaseToken(node
|
|
|
2334
2344
|
function isCatchToken(node
|
|
2335
2345
|
/*: ESNode | Token */
|
|
2336
2346
|
)
|
|
2337
|
-
/*: node is MostTokens */
|
|
2347
|
+
/*: implies node is MostTokens */
|
|
2338
2348
|
{
|
|
2339
2349
|
return node.type === 'Keyword' && node.value === 'catch';
|
|
2340
2350
|
}
|
|
@@ -2342,7 +2352,7 @@ function isCatchToken(node
|
|
|
2342
2352
|
function isClassToken(node
|
|
2343
2353
|
/*: ESNode | Token */
|
|
2344
2354
|
)
|
|
2345
|
-
/*: node is MostTokens */
|
|
2355
|
+
/*: implies node is MostTokens */
|
|
2346
2356
|
{
|
|
2347
2357
|
return node.type === 'Keyword' && node.value === 'class';
|
|
2348
2358
|
}
|
|
@@ -2350,7 +2360,7 @@ function isClassToken(node
|
|
|
2350
2360
|
function isConstToken(node
|
|
2351
2361
|
/*: ESNode | Token */
|
|
2352
2362
|
)
|
|
2353
|
-
/*: node is MostTokens */
|
|
2363
|
+
/*: implies node is MostTokens */
|
|
2354
2364
|
{
|
|
2355
2365
|
return node.type === 'Keyword' && node.value === 'const';
|
|
2356
2366
|
}
|
|
@@ -2358,7 +2368,7 @@ function isConstToken(node
|
|
|
2358
2368
|
function isContinueToken(node
|
|
2359
2369
|
/*: ESNode | Token */
|
|
2360
2370
|
)
|
|
2361
|
-
/*: node is MostTokens */
|
|
2371
|
+
/*: implies node is MostTokens */
|
|
2362
2372
|
{
|
|
2363
2373
|
return node.type === 'Keyword' && node.value === 'continue';
|
|
2364
2374
|
}
|
|
@@ -2366,7 +2376,7 @@ function isContinueToken(node
|
|
|
2366
2376
|
function isDebuggerToken(node
|
|
2367
2377
|
/*: ESNode | Token */
|
|
2368
2378
|
)
|
|
2369
|
-
/*: node is MostTokens */
|
|
2379
|
+
/*: implies node is MostTokens */
|
|
2370
2380
|
{
|
|
2371
2381
|
return node.type === 'Keyword' && node.value === 'debugger';
|
|
2372
2382
|
}
|
|
@@ -2374,7 +2384,7 @@ function isDebuggerToken(node
|
|
|
2374
2384
|
function isDefaultToken(node
|
|
2375
2385
|
/*: ESNode | Token */
|
|
2376
2386
|
)
|
|
2377
|
-
/*: node is MostTokens */
|
|
2387
|
+
/*: implies node is MostTokens */
|
|
2378
2388
|
{
|
|
2379
2389
|
return node.type === 'Keyword' && node.value === 'default';
|
|
2380
2390
|
}
|
|
@@ -2382,7 +2392,7 @@ function isDefaultToken(node
|
|
|
2382
2392
|
function isDoToken(node
|
|
2383
2393
|
/*: ESNode | Token */
|
|
2384
2394
|
)
|
|
2385
|
-
/*: node is MostTokens */
|
|
2395
|
+
/*: implies node is MostTokens */
|
|
2386
2396
|
{
|
|
2387
2397
|
return node.type === 'Keyword' && node.value === 'do';
|
|
2388
2398
|
}
|
|
@@ -2390,7 +2400,7 @@ function isDoToken(node
|
|
|
2390
2400
|
function isElseToken(node
|
|
2391
2401
|
/*: ESNode | Token */
|
|
2392
2402
|
)
|
|
2393
|
-
/*: node is MostTokens */
|
|
2403
|
+
/*: implies node is MostTokens */
|
|
2394
2404
|
{
|
|
2395
2405
|
return node.type === 'Keyword' && node.value === 'else';
|
|
2396
2406
|
}
|
|
@@ -2398,7 +2408,7 @@ function isElseToken(node
|
|
|
2398
2408
|
function isEnumToken(node
|
|
2399
2409
|
/*: ESNode | Token */
|
|
2400
2410
|
)
|
|
2401
|
-
/*: node is MostTokens */
|
|
2411
|
+
/*: implies node is MostTokens */
|
|
2402
2412
|
{
|
|
2403
2413
|
return node.type === 'Keyword' && node.value === 'enum';
|
|
2404
2414
|
}
|
|
@@ -2406,7 +2416,7 @@ function isEnumToken(node
|
|
|
2406
2416
|
function isExportToken(node
|
|
2407
2417
|
/*: ESNode | Token */
|
|
2408
2418
|
)
|
|
2409
|
-
/*: node is MostTokens */
|
|
2419
|
+
/*: implies node is MostTokens */
|
|
2410
2420
|
{
|
|
2411
2421
|
return node.type === 'Keyword' && node.value === 'export';
|
|
2412
2422
|
}
|
|
@@ -2414,7 +2424,7 @@ function isExportToken(node
|
|
|
2414
2424
|
function isExtendsToken(node
|
|
2415
2425
|
/*: ESNode | Token */
|
|
2416
2426
|
)
|
|
2417
|
-
/*: node is MostTokens */
|
|
2427
|
+
/*: implies node is MostTokens */
|
|
2418
2428
|
{
|
|
2419
2429
|
return node.type === 'Keyword' && node.value === 'extends';
|
|
2420
2430
|
}
|
|
@@ -2422,7 +2432,7 @@ function isExtendsToken(node
|
|
|
2422
2432
|
function isFinallyToken(node
|
|
2423
2433
|
/*: ESNode | Token */
|
|
2424
2434
|
)
|
|
2425
|
-
/*: node is MostTokens */
|
|
2435
|
+
/*: implies node is MostTokens */
|
|
2426
2436
|
{
|
|
2427
2437
|
return node.type === 'Keyword' && node.value === 'finally';
|
|
2428
2438
|
}
|
|
@@ -2430,7 +2440,7 @@ function isFinallyToken(node
|
|
|
2430
2440
|
function isForToken(node
|
|
2431
2441
|
/*: ESNode | Token */
|
|
2432
2442
|
)
|
|
2433
|
-
/*: node is MostTokens */
|
|
2443
|
+
/*: implies node is MostTokens */
|
|
2434
2444
|
{
|
|
2435
2445
|
return node.type === 'Keyword' && node.value === 'for';
|
|
2436
2446
|
}
|
|
@@ -2438,7 +2448,7 @@ function isForToken(node
|
|
|
2438
2448
|
function isFunctionToken(node
|
|
2439
2449
|
/*: ESNode | Token */
|
|
2440
2450
|
)
|
|
2441
|
-
/*: node is MostTokens */
|
|
2451
|
+
/*: implies node is MostTokens */
|
|
2442
2452
|
{
|
|
2443
2453
|
return node.type === 'Keyword' && node.value === 'function';
|
|
2444
2454
|
}
|
|
@@ -2446,7 +2456,7 @@ function isFunctionToken(node
|
|
|
2446
2456
|
function isIfToken(node
|
|
2447
2457
|
/*: ESNode | Token */
|
|
2448
2458
|
)
|
|
2449
|
-
/*: node is MostTokens */
|
|
2459
|
+
/*: implies node is MostTokens */
|
|
2450
2460
|
{
|
|
2451
2461
|
return node.type === 'Keyword' && node.value === 'if';
|
|
2452
2462
|
}
|
|
@@ -2454,7 +2464,7 @@ function isIfToken(node
|
|
|
2454
2464
|
function isImplementsToken(node
|
|
2455
2465
|
/*: ESNode | Token */
|
|
2456
2466
|
)
|
|
2457
|
-
/*: node is MostTokens */
|
|
2467
|
+
/*: implies node is MostTokens */
|
|
2458
2468
|
{
|
|
2459
2469
|
return node.type === 'Keyword' && node.value === 'implements';
|
|
2460
2470
|
}
|
|
@@ -2462,7 +2472,7 @@ function isImplementsToken(node
|
|
|
2462
2472
|
function isImportToken(node
|
|
2463
2473
|
/*: ESNode | Token */
|
|
2464
2474
|
)
|
|
2465
|
-
/*: node is MostTokens */
|
|
2475
|
+
/*: implies node is MostTokens */
|
|
2466
2476
|
{
|
|
2467
2477
|
return node.type === 'Keyword' && node.value === 'import';
|
|
2468
2478
|
}
|
|
@@ -2470,7 +2480,7 @@ function isImportToken(node
|
|
|
2470
2480
|
function isInterfaceToken(node
|
|
2471
2481
|
/*: ESNode | Token */
|
|
2472
2482
|
)
|
|
2473
|
-
/*: node is MostTokens */
|
|
2483
|
+
/*: implies node is MostTokens */
|
|
2474
2484
|
{
|
|
2475
2485
|
return node.type === 'Keyword' && node.value === 'interface';
|
|
2476
2486
|
}
|
|
@@ -2478,7 +2488,7 @@ function isInterfaceToken(node
|
|
|
2478
2488
|
function isNewToken(node
|
|
2479
2489
|
/*: ESNode | Token */
|
|
2480
2490
|
)
|
|
2481
|
-
/*: node is MostTokens */
|
|
2491
|
+
/*: implies node is MostTokens */
|
|
2482
2492
|
{
|
|
2483
2493
|
return node.type === 'Keyword' && node.value === 'new';
|
|
2484
2494
|
}
|
|
@@ -2486,7 +2496,7 @@ function isNewToken(node
|
|
|
2486
2496
|
function isReturnToken(node
|
|
2487
2497
|
/*: ESNode | Token */
|
|
2488
2498
|
)
|
|
2489
|
-
/*: node is MostTokens */
|
|
2499
|
+
/*: implies node is MostTokens */
|
|
2490
2500
|
{
|
|
2491
2501
|
return node.type === 'Keyword' && node.value === 'return';
|
|
2492
2502
|
}
|
|
@@ -2494,7 +2504,7 @@ function isReturnToken(node
|
|
|
2494
2504
|
function isStaticToken(node
|
|
2495
2505
|
/*: ESNode | Token */
|
|
2496
2506
|
)
|
|
2497
|
-
/*: node is MostTokens */
|
|
2507
|
+
/*: implies node is MostTokens */
|
|
2498
2508
|
{
|
|
2499
2509
|
return node.type === 'Keyword' && node.value === 'static';
|
|
2500
2510
|
}
|
|
@@ -2502,7 +2512,7 @@ function isStaticToken(node
|
|
|
2502
2512
|
function isSuperToken(node
|
|
2503
2513
|
/*: ESNode | Token */
|
|
2504
2514
|
)
|
|
2505
|
-
/*: node is MostTokens */
|
|
2515
|
+
/*: implies node is MostTokens */
|
|
2506
2516
|
{
|
|
2507
2517
|
return node.type === 'Keyword' && node.value === 'super';
|
|
2508
2518
|
}
|
|
@@ -2510,7 +2520,7 @@ function isSuperToken(node
|
|
|
2510
2520
|
function isSwitchToken(node
|
|
2511
2521
|
/*: ESNode | Token */
|
|
2512
2522
|
)
|
|
2513
|
-
/*: node is MostTokens */
|
|
2523
|
+
/*: implies node is MostTokens */
|
|
2514
2524
|
{
|
|
2515
2525
|
return node.type === 'Keyword' && node.value === 'switch';
|
|
2516
2526
|
}
|
|
@@ -2518,7 +2528,7 @@ function isSwitchToken(node
|
|
|
2518
2528
|
function isThisToken(node
|
|
2519
2529
|
/*: ESNode | Token */
|
|
2520
2530
|
)
|
|
2521
|
-
/*: node is MostTokens */
|
|
2531
|
+
/*: implies node is MostTokens */
|
|
2522
2532
|
{
|
|
2523
2533
|
return node.type === 'Keyword' && node.value === 'this';
|
|
2524
2534
|
}
|
|
@@ -2526,7 +2536,7 @@ function isThisToken(node
|
|
|
2526
2536
|
function isThrowToken(node
|
|
2527
2537
|
/*: ESNode | Token */
|
|
2528
2538
|
)
|
|
2529
|
-
/*: node is MostTokens */
|
|
2539
|
+
/*: implies node is MostTokens */
|
|
2530
2540
|
{
|
|
2531
2541
|
return node.type === 'Keyword' && node.value === 'throw';
|
|
2532
2542
|
}
|
|
@@ -2534,7 +2544,7 @@ function isThrowToken(node
|
|
|
2534
2544
|
function isTryToken(node
|
|
2535
2545
|
/*: ESNode | Token */
|
|
2536
2546
|
)
|
|
2537
|
-
/*: node is MostTokens */
|
|
2547
|
+
/*: implies node is MostTokens */
|
|
2538
2548
|
{
|
|
2539
2549
|
return node.type === 'Keyword' && node.value === 'try';
|
|
2540
2550
|
}
|
|
@@ -2542,7 +2552,7 @@ function isTryToken(node
|
|
|
2542
2552
|
function isVarToken(node
|
|
2543
2553
|
/*: ESNode | Token */
|
|
2544
2554
|
)
|
|
2545
|
-
/*: node is MostTokens */
|
|
2555
|
+
/*: implies node is MostTokens */
|
|
2546
2556
|
{
|
|
2547
2557
|
return node.type === 'Keyword' && node.value === 'var';
|
|
2548
2558
|
}
|
|
@@ -2550,7 +2560,7 @@ function isVarToken(node
|
|
|
2550
2560
|
function isWhileToken(node
|
|
2551
2561
|
/*: ESNode | Token */
|
|
2552
2562
|
)
|
|
2553
|
-
/*: node is MostTokens */
|
|
2563
|
+
/*: implies node is MostTokens */
|
|
2554
2564
|
{
|
|
2555
2565
|
return node.type === 'Keyword' && node.value === 'while';
|
|
2556
2566
|
}
|
|
@@ -2558,7 +2568,7 @@ function isWhileToken(node
|
|
|
2558
2568
|
function isWithToken(node
|
|
2559
2569
|
/*: ESNode | Token */
|
|
2560
2570
|
)
|
|
2561
|
-
/*: node is MostTokens */
|
|
2571
|
+
/*: implies node is MostTokens */
|
|
2562
2572
|
{
|
|
2563
2573
|
return node.type === 'Keyword' && node.value === 'with';
|
|
2564
2574
|
}
|
|
@@ -2566,7 +2576,7 @@ function isWithToken(node
|
|
|
2566
2576
|
function isYieldToken(node
|
|
2567
2577
|
/*: ESNode | Token */
|
|
2568
2578
|
)
|
|
2569
|
-
/*: node is MostTokens */
|
|
2579
|
+
/*: implies node is MostTokens */
|
|
2570
2580
|
{
|
|
2571
2581
|
return node.type === 'Keyword' && node.value === 'yield';
|
|
2572
2582
|
}
|
|
@@ -2574,7 +2584,7 @@ function isYieldToken(node
|
|
|
2574
2584
|
function isAsKeyword(node
|
|
2575
2585
|
/*: ESNode | Token */
|
|
2576
2586
|
)
|
|
2577
|
-
/*: node is (Identifier | MostTokens) */
|
|
2587
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2578
2588
|
{
|
|
2579
2589
|
return node.type === 'Identifier' && node.name === 'as' || node.type === 'Keyword' && node.value === 'as';
|
|
2580
2590
|
}
|
|
@@ -2582,7 +2592,7 @@ function isAsKeyword(node
|
|
|
2582
2592
|
function isAsyncKeyword(node
|
|
2583
2593
|
/*: ESNode | Token */
|
|
2584
2594
|
)
|
|
2585
|
-
/*: node is (Identifier | MostTokens) */
|
|
2595
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2586
2596
|
{
|
|
2587
2597
|
return node.type === 'Identifier' && node.name === 'async' || node.type === 'Keyword' && node.value === 'async';
|
|
2588
2598
|
}
|
|
@@ -2590,7 +2600,7 @@ function isAsyncKeyword(node
|
|
|
2590
2600
|
function isAwaitKeyword(node
|
|
2591
2601
|
/*: ESNode | Token */
|
|
2592
2602
|
)
|
|
2593
|
-
/*: node is (Identifier | MostTokens) */
|
|
2603
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2594
2604
|
{
|
|
2595
2605
|
return node.type === 'Identifier' && node.name === 'await' || node.type === 'Keyword' && node.value === 'await';
|
|
2596
2606
|
}
|
|
@@ -2598,7 +2608,7 @@ function isAwaitKeyword(node
|
|
|
2598
2608
|
function isDeclareKeyword(node
|
|
2599
2609
|
/*: ESNode | Token */
|
|
2600
2610
|
)
|
|
2601
|
-
/*: node is (Identifier | MostTokens) */
|
|
2611
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2602
2612
|
{
|
|
2603
2613
|
return node.type === 'Identifier' && node.name === 'declare' || node.type === 'Keyword' && node.value === 'declare';
|
|
2604
2614
|
}
|
|
@@ -2606,7 +2616,7 @@ function isDeclareKeyword(node
|
|
|
2606
2616
|
function isFromKeyword(node
|
|
2607
2617
|
/*: ESNode | Token */
|
|
2608
2618
|
)
|
|
2609
|
-
/*: node is (Identifier | MostTokens) */
|
|
2619
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2610
2620
|
{
|
|
2611
2621
|
return node.type === 'Identifier' && node.name === 'from' || node.type === 'Keyword' && node.value === 'from';
|
|
2612
2622
|
}
|
|
@@ -2614,7 +2624,7 @@ function isFromKeyword(node
|
|
|
2614
2624
|
function isGetKeyword(node
|
|
2615
2625
|
/*: ESNode | Token */
|
|
2616
2626
|
)
|
|
2617
|
-
/*: node is (Identifier | MostTokens) */
|
|
2627
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2618
2628
|
{
|
|
2619
2629
|
return node.type === 'Identifier' && node.name === 'get' || node.type === 'Keyword' && node.value === 'get';
|
|
2620
2630
|
}
|
|
@@ -2622,7 +2632,7 @@ function isGetKeyword(node
|
|
|
2622
2632
|
function isLetKeyword(node
|
|
2623
2633
|
/*: ESNode | Token */
|
|
2624
2634
|
)
|
|
2625
|
-
/*: node is (Identifier | MostTokens) */
|
|
2635
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2626
2636
|
{
|
|
2627
2637
|
return node.type === 'Identifier' && node.name === 'let' || node.type === 'Keyword' && node.value === 'let';
|
|
2628
2638
|
}
|
|
@@ -2630,7 +2640,7 @@ function isLetKeyword(node
|
|
|
2630
2640
|
function isModuleKeyword(node
|
|
2631
2641
|
/*: ESNode | Token */
|
|
2632
2642
|
)
|
|
2633
|
-
/*: node is (Identifier | MostTokens) */
|
|
2643
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2634
2644
|
{
|
|
2635
2645
|
return node.type === 'Identifier' && node.name === 'module' || node.type === 'Keyword' && node.value === 'module';
|
|
2636
2646
|
}
|
|
@@ -2638,7 +2648,7 @@ function isModuleKeyword(node
|
|
|
2638
2648
|
function isOfKeyword(node
|
|
2639
2649
|
/*: ESNode | Token */
|
|
2640
2650
|
)
|
|
2641
|
-
/*: node is (Identifier | MostTokens) */
|
|
2651
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2642
2652
|
{
|
|
2643
2653
|
return node.type === 'Identifier' && node.name === 'of' || node.type === 'Keyword' && node.value === 'of';
|
|
2644
2654
|
}
|
|
@@ -2646,7 +2656,7 @@ function isOfKeyword(node
|
|
|
2646
2656
|
function isSetKeyword(node
|
|
2647
2657
|
/*: ESNode | Token */
|
|
2648
2658
|
)
|
|
2649
|
-
/*: node is (Identifier | MostTokens) */
|
|
2659
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2650
2660
|
{
|
|
2651
2661
|
return node.type === 'Identifier' && node.name === 'set' || node.type === 'Keyword' && node.value === 'set';
|
|
2652
2662
|
}
|
|
@@ -2654,7 +2664,7 @@ function isSetKeyword(node
|
|
|
2654
2664
|
function isTypeKeyword(node
|
|
2655
2665
|
/*: ESNode | Token */
|
|
2656
2666
|
)
|
|
2657
|
-
/*: node is (Identifier | MostTokens) */
|
|
2667
|
+
/*: implies node is (Identifier | MostTokens) */
|
|
2658
2668
|
{
|
|
2659
2669
|
return node.type === 'Identifier' && node.name === 'type' || node.type === 'Keyword' && node.value === 'type';
|
|
2660
2670
|
}
|
|
@@ -2662,7 +2672,7 @@ function isTypeKeyword(node
|
|
|
2662
2672
|
function isCommaToken(node
|
|
2663
2673
|
/*: ESNode | Token */
|
|
2664
2674
|
)
|
|
2665
|
-
/*: node is MostTokens */
|
|
2675
|
+
/*: implies node is MostTokens */
|
|
2666
2676
|
{
|
|
2667
2677
|
return node.type === 'Punctuator' && node.value === ',';
|
|
2668
2678
|
}
|
|
@@ -2670,7 +2680,7 @@ function isCommaToken(node
|
|
|
2670
2680
|
function isColonToken(node
|
|
2671
2681
|
/*: ESNode | Token */
|
|
2672
2682
|
)
|
|
2673
|
-
/*: node is MostTokens */
|
|
2683
|
+
/*: implies node is MostTokens */
|
|
2674
2684
|
{
|
|
2675
2685
|
return node.type === 'Punctuator' && node.value === ':';
|
|
2676
2686
|
}
|
|
@@ -2678,7 +2688,7 @@ function isColonToken(node
|
|
|
2678
2688
|
function isSemicolonToken(node
|
|
2679
2689
|
/*: ESNode | Token */
|
|
2680
2690
|
)
|
|
2681
|
-
/*: node is MostTokens */
|
|
2691
|
+
/*: implies node is MostTokens */
|
|
2682
2692
|
{
|
|
2683
2693
|
return node.type === 'Punctuator' && node.value === ';';
|
|
2684
2694
|
}
|
|
@@ -2686,7 +2696,7 @@ function isSemicolonToken(node
|
|
|
2686
2696
|
function isDotToken(node
|
|
2687
2697
|
/*: ESNode | Token */
|
|
2688
2698
|
)
|
|
2689
|
-
/*: node is MostTokens */
|
|
2699
|
+
/*: implies node is MostTokens */
|
|
2690
2700
|
{
|
|
2691
2701
|
return node.type === 'Punctuator' && node.value === '.';
|
|
2692
2702
|
}
|
|
@@ -2694,7 +2704,7 @@ function isDotToken(node
|
|
|
2694
2704
|
function isDotDotDotToken(node
|
|
2695
2705
|
/*: ESNode | Token */
|
|
2696
2706
|
)
|
|
2697
|
-
/*: node is MostTokens */
|
|
2707
|
+
/*: implies node is MostTokens */
|
|
2698
2708
|
{
|
|
2699
2709
|
return node.type === 'Punctuator' && node.value === '...';
|
|
2700
2710
|
}
|
|
@@ -2702,7 +2712,7 @@ function isDotDotDotToken(node
|
|
|
2702
2712
|
function isOptionalChainToken(node
|
|
2703
2713
|
/*: ESNode | Token */
|
|
2704
2714
|
)
|
|
2705
|
-
/*: node is MostTokens */
|
|
2715
|
+
/*: implies node is MostTokens */
|
|
2706
2716
|
{
|
|
2707
2717
|
return node.type === 'Punctuator' && node.value === '?.';
|
|
2708
2718
|
}
|
|
@@ -2710,7 +2720,7 @@ function isOptionalChainToken(node
|
|
|
2710
2720
|
function isQuestionMarkToken(node
|
|
2711
2721
|
/*: ESNode | Token */
|
|
2712
2722
|
)
|
|
2713
|
-
/*: node is MostTokens */
|
|
2723
|
+
/*: implies node is MostTokens */
|
|
2714
2724
|
{
|
|
2715
2725
|
return node.type === 'Punctuator' && node.value === '?';
|
|
2716
2726
|
}
|
|
@@ -2718,7 +2728,7 @@ function isQuestionMarkToken(node
|
|
|
2718
2728
|
function isOpeningParenthesisToken(node
|
|
2719
2729
|
/*: ESNode | Token */
|
|
2720
2730
|
)
|
|
2721
|
-
/*: node is MostTokens */
|
|
2731
|
+
/*: implies node is MostTokens */
|
|
2722
2732
|
{
|
|
2723
2733
|
return node.type === 'Punctuator' && node.value === '(';
|
|
2724
2734
|
}
|
|
@@ -2726,7 +2736,7 @@ function isOpeningParenthesisToken(node
|
|
|
2726
2736
|
function isClosingParenthesisToken(node
|
|
2727
2737
|
/*: ESNode | Token */
|
|
2728
2738
|
)
|
|
2729
|
-
/*: node is MostTokens */
|
|
2739
|
+
/*: implies node is MostTokens */
|
|
2730
2740
|
{
|
|
2731
2741
|
return node.type === 'Punctuator' && node.value === ')';
|
|
2732
2742
|
}
|
|
@@ -2734,7 +2744,7 @@ function isClosingParenthesisToken(node
|
|
|
2734
2744
|
function isOpeningCurlyBracketToken(node
|
|
2735
2745
|
/*: ESNode | Token */
|
|
2736
2746
|
)
|
|
2737
|
-
/*: node is MostTokens */
|
|
2747
|
+
/*: implies node is MostTokens */
|
|
2738
2748
|
{
|
|
2739
2749
|
return node.type === 'Punctuator' && node.value === '{';
|
|
2740
2750
|
}
|
|
@@ -2742,7 +2752,7 @@ function isOpeningCurlyBracketToken(node
|
|
|
2742
2752
|
function isClosingCurlyBracketToken(node
|
|
2743
2753
|
/*: ESNode | Token */
|
|
2744
2754
|
)
|
|
2745
|
-
/*: node is MostTokens */
|
|
2755
|
+
/*: implies node is MostTokens */
|
|
2746
2756
|
{
|
|
2747
2757
|
return node.type === 'Punctuator' && node.value === '}';
|
|
2748
2758
|
}
|
|
@@ -2750,7 +2760,7 @@ function isClosingCurlyBracketToken(node
|
|
|
2750
2760
|
function isOpeningAngleBracketToken(node
|
|
2751
2761
|
/*: ESNode | Token */
|
|
2752
2762
|
)
|
|
2753
|
-
/*: node is MostTokens */
|
|
2763
|
+
/*: implies node is MostTokens */
|
|
2754
2764
|
{
|
|
2755
2765
|
return node.type === 'Punctuator' && node.value === '<';
|
|
2756
2766
|
}
|
|
@@ -2758,7 +2768,7 @@ function isOpeningAngleBracketToken(node
|
|
|
2758
2768
|
function isClosingAngleBracketToken(node
|
|
2759
2769
|
/*: ESNode | Token */
|
|
2760
2770
|
)
|
|
2761
|
-
/*: node is MostTokens */
|
|
2771
|
+
/*: implies node is MostTokens */
|
|
2762
2772
|
{
|
|
2763
2773
|
return node.type === 'Punctuator' && node.value === '>';
|
|
2764
2774
|
}
|