hermes-estree 0.18.0 → 0.18.2

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