@danielx/civet 0.5.49 → 0.5.51

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/browser.js CHANGED
@@ -878,6 +878,7 @@ ${input.slice(result.pos)}
878
878
  NestedInterfaceProperties,
879
879
  NestedInterfaceProperty,
880
880
  InterfaceProperty,
881
+ BasicInterfaceProperty,
881
882
  InterfacePropertyDelimiter,
882
883
  NamespaceBlock,
883
884
  NestedTypeDeclarations,
@@ -901,6 +902,9 @@ ${input.slice(result.pos)}
901
902
  NestedType,
902
903
  TypeConditional,
903
904
  TypeLiteral,
905
+ InlineInterfaceLiteral,
906
+ InlineBasicInterfaceProperty,
907
+ InlineInterfacePropertyDelimiter,
904
908
  TypeBinaryOp,
905
909
  FunctionType,
906
910
  TypeArguments,
@@ -949,6 +953,7 @@ ${input.slice(result.pos)}
949
953
  CoffeeNotEnabled,
950
954
  CoffeeOfEnabled,
951
955
  CoffeePrototypeEnabled,
956
+ ObjectIsEnabled,
952
957
  Reset,
953
958
  Init,
954
959
  Indent,
@@ -1129,7 +1134,7 @@ ${input.slice(result.pos)}
1129
1134
  var $L167 = $L("infer");
1130
1135
  var $L168 = $L("[]");
1131
1136
  var $L169 = $L("civet");
1132
- var $R0 = $R(new RegExp("(as|for|of|satisfies|then|when)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1137
+ var $R0 = $R(new RegExp("(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
1133
1138
  var $R1 = $R(new RegExp("[&]", "suy"));
1134
1139
  var $R2 = $R(new RegExp("[!~+-]+", "suy"));
1135
1140
  var $R3 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
@@ -1482,7 +1487,7 @@ ${input.slice(result.pos)}
1482
1487
  return result;
1483
1488
  }
1484
1489
  }
1485
- var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|of|satisfies|then|when)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
1490
+ var ForbiddenImplicitCalls$0 = $R$0($EXPECT($R0, fail, "ForbiddenImplicitCalls /(as|for|of|satisfies|then|when|implements)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/"));
1486
1491
  var ForbiddenImplicitCalls$1 = $EXPECT($L0, fail, 'ForbiddenImplicitCalls "/ "');
1487
1492
  var ForbiddenImplicitCalls$2 = AtAt;
1488
1493
  function ForbiddenImplicitCalls(state) {
@@ -6542,8 +6547,13 @@ ${input.slice(result.pos)}
6542
6547
  var BinaryOpSymbol$6 = $EXPECT($L54, fail, 'BinaryOpSymbol "-"');
6543
6548
  var BinaryOpSymbol$7 = $EXPECT($L55, fail, 'BinaryOpSymbol "<="');
6544
6549
  var BinaryOpSymbol$8 = $EXPECT($L56, fail, 'BinaryOpSymbol ">="');
6545
- var BinaryOpSymbol$9 = $TS($S($EXPECT($L57, fail, 'BinaryOpSymbol "<?"'), $E($EXPECT($L6, fail, 'BinaryOpSymbol " "'))), function($skip, $loc, $0, $1, $2) {
6546
- return "instanceof ";
6550
+ var BinaryOpSymbol$9 = $TV($EXPECT($L57, fail, 'BinaryOpSymbol "<?"'), function($skip, $loc, $0, $1) {
6551
+ return {
6552
+ $loc,
6553
+ token: "instanceof",
6554
+ relational: true,
6555
+ special: true
6556
+ };
6547
6557
  });
6548
6558
  var BinaryOpSymbol$10 = $EXPECT($L58, fail, 'BinaryOpSymbol "<<"');
6549
6559
  var BinaryOpSymbol$11 = $TR($EXPECT($R5, fail, "BinaryOpSymbol /<(?!\\p{ID_Start}|[_$])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
@@ -6591,17 +6601,28 @@ ${input.slice(result.pos)}
6591
6601
  return {
6592
6602
  $loc,
6593
6603
  token: "instanceof",
6594
- special: true
6604
+ relational: true,
6605
+ special: true,
6606
+ negated: true
6595
6607
  };
6596
6608
  });
6597
6609
  var BinaryOpSymbol$29 = $TV($C($S($N(CoffeeOfEnabled), $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L68, fail, 'BinaryOpSymbol "of"'), NonIdContinue)), function($skip, $loc, $0, $1) {
6598
6610
  return {
6599
6611
  $loc,
6600
6612
  token: "in",
6613
+ special: true,
6614
+ negated: true
6615
+ };
6616
+ });
6617
+ var BinaryOpSymbol$30 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
6618
+ return {
6619
+ method: "includes",
6620
+ relational: true,
6621
+ reversed: true,
6601
6622
  special: true
6602
6623
  };
6603
6624
  });
6604
- var BinaryOpSymbol$30 = $TV($C($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue)), function($skip, $loc, $0, $1) {
6625
+ var BinaryOpSymbol$31 = $TS($S(CoffeeOfEnabled, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
6605
6626
  return {
6606
6627
  call: [module.getRef("indexOf"), ".call"],
6607
6628
  relational: true,
@@ -6610,7 +6631,16 @@ ${input.slice(result.pos)}
6610
6631
  special: true
6611
6632
  };
6612
6633
  });
6613
- var BinaryOpSymbol$31 = $TV($C($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), $S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue)), function($skip, $loc, $0, $1) {
6634
+ var BinaryOpSymbol$32 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
6635
+ return {
6636
+ method: "includes",
6637
+ relational: true,
6638
+ reversed: true,
6639
+ special: true,
6640
+ negated: true
6641
+ };
6642
+ });
6643
+ var BinaryOpSymbol$33 = $TS($S(CoffeeOfEnabled, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue, __, $EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
6614
6644
  return {
6615
6645
  call: [module.getRef("indexOf"), ".call"],
6616
6646
  relational: true,
@@ -6619,18 +6649,35 @@ ${input.slice(result.pos)}
6619
6649
  special: true
6620
6650
  };
6621
6651
  });
6622
- var BinaryOpSymbol$32 = $T($S($N(CoffeeNotEnabled), $EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue), function(value) {
6652
+ var BinaryOpSymbol$34 = $TS($S($N(CoffeeNotEnabled), $EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue, __, $EXPECT($L73, fail, 'BinaryOpSymbol "not"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
6653
+ if (module.config.objectIs) {
6654
+ return {
6655
+ call: module.getRef("is"),
6656
+ relational: true,
6657
+ special: true,
6658
+ asConst: true,
6659
+ negated: true
6660
+ };
6661
+ }
6623
6662
  return "!==";
6624
6663
  });
6625
- var BinaryOpSymbol$33 = $T($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function(value) {
6664
+ var BinaryOpSymbol$35 = $TS($S($EXPECT($L75, fail, 'BinaryOpSymbol "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6665
+ if (module.config.objectIs) {
6666
+ return {
6667
+ call: module.getRef("is"),
6668
+ relational: true,
6669
+ special: true,
6670
+ asConst: true
6671
+ };
6672
+ }
6626
6673
  return "===";
6627
6674
  });
6628
- var BinaryOpSymbol$34 = $TS($S($EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6675
+ var BinaryOpSymbol$36 = $TS($S($EXPECT($L74, fail, 'BinaryOpSymbol "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
6629
6676
  return $1;
6630
6677
  });
6631
- var BinaryOpSymbol$35 = $EXPECT($L76, fail, 'BinaryOpSymbol "&"');
6632
- var BinaryOpSymbol$36 = $EXPECT($L77, fail, 'BinaryOpSymbol "^"');
6633
- var BinaryOpSymbol$37 = $EXPECT($L78, fail, 'BinaryOpSymbol "|"');
6678
+ var BinaryOpSymbol$37 = $EXPECT($L76, fail, 'BinaryOpSymbol "&"');
6679
+ var BinaryOpSymbol$38 = $EXPECT($L77, fail, 'BinaryOpSymbol "^"');
6680
+ var BinaryOpSymbol$39 = $EXPECT($L78, fail, 'BinaryOpSymbol "|"');
6634
6681
  function BinaryOpSymbol(state) {
6635
6682
  let eventData;
6636
6683
  if (state.events) {
@@ -6642,12 +6689,12 @@ ${input.slice(result.pos)}
6642
6689
  }
6643
6690
  }
6644
6691
  if (state.tokenize) {
6645
- const result = $TOKEN("BinaryOpSymbol", state, BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state) || BinaryOpSymbol$37(state));
6692
+ const result = $TOKEN("BinaryOpSymbol", state, BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state) || BinaryOpSymbol$37(state) || BinaryOpSymbol$38(state) || BinaryOpSymbol$39(state));
6646
6693
  if (state.events)
6647
6694
  state.events.exit?.("BinaryOpSymbol", state, result, eventData);
6648
6695
  return result;
6649
6696
  } else {
6650
- const result = BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state) || BinaryOpSymbol$37(state);
6697
+ const result = BinaryOpSymbol$0(state) || BinaryOpSymbol$1(state) || BinaryOpSymbol$2(state) || BinaryOpSymbol$3(state) || BinaryOpSymbol$4(state) || BinaryOpSymbol$5(state) || BinaryOpSymbol$6(state) || BinaryOpSymbol$7(state) || BinaryOpSymbol$8(state) || BinaryOpSymbol$9(state) || BinaryOpSymbol$10(state) || BinaryOpSymbol$11(state) || BinaryOpSymbol$12(state) || BinaryOpSymbol$13(state) || BinaryOpSymbol$14(state) || BinaryOpSymbol$15(state) || BinaryOpSymbol$16(state) || BinaryOpSymbol$17(state) || BinaryOpSymbol$18(state) || BinaryOpSymbol$19(state) || BinaryOpSymbol$20(state) || BinaryOpSymbol$21(state) || BinaryOpSymbol$22(state) || BinaryOpSymbol$23(state) || BinaryOpSymbol$24(state) || BinaryOpSymbol$25(state) || BinaryOpSymbol$26(state) || BinaryOpSymbol$27(state) || BinaryOpSymbol$28(state) || BinaryOpSymbol$29(state) || BinaryOpSymbol$30(state) || BinaryOpSymbol$31(state) || BinaryOpSymbol$32(state) || BinaryOpSymbol$33(state) || BinaryOpSymbol$34(state) || BinaryOpSymbol$35(state) || BinaryOpSymbol$36(state) || BinaryOpSymbol$37(state) || BinaryOpSymbol$38(state) || BinaryOpSymbol$39(state);
6651
6698
  if (state.events)
6652
6699
  state.events.exit?.("BinaryOpSymbol", state, result, eventData);
6653
6700
  return result;
@@ -14509,7 +14556,7 @@ ${input.slice(result.pos)}
14509
14556
  return result;
14510
14557
  }
14511
14558
  }
14512
- var TypeDeclarationRest$0 = $S(TypeKeyword, $Q(TrailingComment), IdentifierName, $E(TypeParameters), __, Equals, __, Type);
14559
+ var TypeDeclarationRest$0 = $S(TypeKeyword, $Q(TrailingComment), IdentifierName, $E(TypeParameters), __, Equals, $C($S($E(_), Type), $S(__, Type)));
14513
14560
  var TypeDeclarationRest$1 = $S(Interface, $Q(TrailingComment), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
14514
14561
  var TypeDeclarationRest$2 = $S(Namespace, $Q(TrailingComment), IdentifierName, NamespaceBlock);
14515
14562
  var TypeDeclarationRest$3 = FunctionSignature;
@@ -14581,7 +14628,7 @@ ${input.slice(result.pos)}
14581
14628
  return result;
14582
14629
  }
14583
14630
  }
14584
- var InterfaceExtendsClause$0 = $S(ExtendsToken, InterfaceExtendsTarget);
14631
+ var InterfaceExtendsClause$0 = $S(ExtendsToken, InterfaceExtendsTarget, $Q($S(Comma, InterfaceExtendsTarget)));
14585
14632
  function InterfaceExtendsClause(state) {
14586
14633
  let eventData;
14587
14634
  if (state.events) {
@@ -14772,7 +14819,7 @@ ${input.slice(result.pos)}
14772
14819
  return result;
14773
14820
  }
14774
14821
  }
14775
- var InterfaceProperty$0 = $S($C(TypeIndexSignature, PropertyName), TypeSuffix, InterfacePropertyDelimiter);
14822
+ var InterfaceProperty$0 = BasicInterfaceProperty;
14776
14823
  var InterfaceProperty$1 = $S(NonEmptyParameters, TypeSuffix, InterfacePropertyDelimiter);
14777
14824
  var InterfaceProperty$2 = $S(MethodSignature, InterfacePropertyDelimiter);
14778
14825
  function InterfaceProperty(state) {
@@ -14797,6 +14844,29 @@ ${input.slice(result.pos)}
14797
14844
  return result;
14798
14845
  }
14799
14846
  }
14847
+ var BasicInterfaceProperty$0 = $S($C(TypeIndexSignature, PropertyName), TypeSuffix, InterfacePropertyDelimiter);
14848
+ function BasicInterfaceProperty(state) {
14849
+ let eventData;
14850
+ if (state.events) {
14851
+ const result = state.events.enter?.("BasicInterfaceProperty", state);
14852
+ if (result) {
14853
+ if (result.cache)
14854
+ return result.cache;
14855
+ eventData = result.data;
14856
+ }
14857
+ }
14858
+ if (state.tokenize) {
14859
+ const result = $TOKEN("BasicInterfaceProperty", state, BasicInterfaceProperty$0(state));
14860
+ if (state.events)
14861
+ state.events.exit?.("BasicInterfaceProperty", state, result, eventData);
14862
+ return result;
14863
+ } else {
14864
+ const result = BasicInterfaceProperty$0(state);
14865
+ if (state.events)
14866
+ state.events.exit?.("BasicInterfaceProperty", state, result, eventData);
14867
+ return result;
14868
+ }
14869
+ }
14800
14870
  var InterfacePropertyDelimiter$0 = $S($Q(_), $C(Semicolon, Comma));
14801
14871
  var InterfacePropertyDelimiter$1 = $Y($S(__, CloseBrace));
14802
14872
  var InterfacePropertyDelimiter$2 = $Y(EOS);
@@ -15179,12 +15249,13 @@ ${input.slice(result.pos)}
15179
15249
  }
15180
15250
  }
15181
15251
  var TypePrimary$0 = InterfaceBlock;
15182
- var TypePrimary$1 = $S(__, OpenParen, Type, __, CloseParen);
15183
- var TypePrimary$2 = $S($E(_), TypeTuple);
15184
- var TypePrimary$3 = $S($E(_), ImportType);
15185
- var TypePrimary$4 = $S($E(_), FunctionType);
15252
+ var TypePrimary$1 = $S($E(_), FunctionType);
15253
+ var TypePrimary$2 = $S($E(_), InlineInterfaceLiteral);
15254
+ var TypePrimary$3 = $S($E(_), TypeTuple);
15255
+ var TypePrimary$4 = $S($E(_), ImportType);
15186
15256
  var TypePrimary$5 = $S($E(_), TypeLiteral);
15187
15257
  var TypePrimary$6 = $S($E(_), IdentifierName, $Q($S(Dot, IdentifierName)), $E(TypeArguments));
15258
+ var TypePrimary$7 = $S(__, OpenParen, Type, __, CloseParen);
15188
15259
  function TypePrimary(state) {
15189
15260
  let eventData;
15190
15261
  if (state.events) {
@@ -15196,12 +15267,12 @@ ${input.slice(result.pos)}
15196
15267
  }
15197
15268
  }
15198
15269
  if (state.tokenize) {
15199
- const result = $TOKEN("TypePrimary", state, TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state) || TypePrimary$5(state) || TypePrimary$6(state));
15270
+ const result = $TOKEN("TypePrimary", state, TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state) || TypePrimary$5(state) || TypePrimary$6(state) || TypePrimary$7(state));
15200
15271
  if (state.events)
15201
15272
  state.events.exit?.("TypePrimary", state, result, eventData);
15202
15273
  return result;
15203
15274
  } else {
15204
- const result = TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state) || TypePrimary$5(state) || TypePrimary$6(state);
15275
+ const result = TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state) || TypePrimary$5(state) || TypePrimary$6(state) || TypePrimary$7(state);
15205
15276
  if (state.events)
15206
15277
  state.events.exit?.("TypePrimary", state, result, eventData);
15207
15278
  return result;
@@ -15386,6 +15457,80 @@ ${input.slice(result.pos)}
15386
15457
  return result;
15387
15458
  }
15388
15459
  }
15460
+ var InlineInterfaceLiteral$0 = $S(InsertInlineOpenBrace, InlineBasicInterfaceProperty, $Q($S($C(IndentedFurther, $E(_)), InlineBasicInterfaceProperty)), InsertCloseBrace);
15461
+ function InlineInterfaceLiteral(state) {
15462
+ let eventData;
15463
+ if (state.events) {
15464
+ const result = state.events.enter?.("InlineInterfaceLiteral", state);
15465
+ if (result) {
15466
+ if (result.cache)
15467
+ return result.cache;
15468
+ eventData = result.data;
15469
+ }
15470
+ }
15471
+ if (state.tokenize) {
15472
+ const result = $TOKEN("InlineInterfaceLiteral", state, InlineInterfaceLiteral$0(state));
15473
+ if (state.events)
15474
+ state.events.exit?.("InlineInterfaceLiteral", state, result, eventData);
15475
+ return result;
15476
+ } else {
15477
+ const result = InlineInterfaceLiteral$0(state);
15478
+ if (state.events)
15479
+ state.events.exit?.("InlineInterfaceLiteral", state, result, eventData);
15480
+ return result;
15481
+ }
15482
+ }
15483
+ var InlineBasicInterfaceProperty$0 = $S($C(TypeIndexSignature, PropertyName), $E(QuestionMark), Colon, Type, InlineInterfacePropertyDelimiter);
15484
+ function InlineBasicInterfaceProperty(state) {
15485
+ let eventData;
15486
+ if (state.events) {
15487
+ const result = state.events.enter?.("InlineBasicInterfaceProperty", state);
15488
+ if (result) {
15489
+ if (result.cache)
15490
+ return result.cache;
15491
+ eventData = result.data;
15492
+ }
15493
+ }
15494
+ if (state.tokenize) {
15495
+ const result = $TOKEN("InlineBasicInterfaceProperty", state, InlineBasicInterfaceProperty$0(state));
15496
+ if (state.events)
15497
+ state.events.exit?.("InlineBasicInterfaceProperty", state, result, eventData);
15498
+ return result;
15499
+ } else {
15500
+ const result = InlineBasicInterfaceProperty$0(state);
15501
+ if (state.events)
15502
+ state.events.exit?.("InlineBasicInterfaceProperty", state, result, eventData);
15503
+ return result;
15504
+ }
15505
+ }
15506
+ var InlineInterfacePropertyDelimiter$0 = $C($S($E(_), Semicolon), CommaDelimiter);
15507
+ var InlineInterfacePropertyDelimiter$1 = $T($S($Y($S($C(IndentedFurther, $E(_)), InlineBasicInterfaceProperty)), InsertComma), function(value) {
15508
+ return value[1];
15509
+ });
15510
+ var InlineInterfacePropertyDelimiter$2 = $Y($S(__, $C($EXPECT($L29, fail, 'InlineInterfacePropertyDelimiter ":"'), $EXPECT($L15, fail, 'InlineInterfacePropertyDelimiter ")"'), $EXPECT($L28, fail, 'InlineInterfacePropertyDelimiter "]"'), $EXPECT($L17, fail, 'InlineInterfacePropertyDelimiter "}"'))));
15511
+ var InlineInterfacePropertyDelimiter$3 = $Y(EOS);
15512
+ function InlineInterfacePropertyDelimiter(state) {
15513
+ let eventData;
15514
+ if (state.events) {
15515
+ const result = state.events.enter?.("InlineInterfacePropertyDelimiter", state);
15516
+ if (result) {
15517
+ if (result.cache)
15518
+ return result.cache;
15519
+ eventData = result.data;
15520
+ }
15521
+ }
15522
+ if (state.tokenize) {
15523
+ const result = $TOKEN("InlineInterfacePropertyDelimiter", state, InlineInterfacePropertyDelimiter$0(state) || InlineInterfacePropertyDelimiter$1(state) || InlineInterfacePropertyDelimiter$2(state) || InlineInterfacePropertyDelimiter$3(state));
15524
+ if (state.events)
15525
+ state.events.exit?.("InlineInterfacePropertyDelimiter", state, result, eventData);
15526
+ return result;
15527
+ } else {
15528
+ const result = InlineInterfacePropertyDelimiter$0(state) || InlineInterfacePropertyDelimiter$1(state) || InlineInterfacePropertyDelimiter$2(state) || InlineInterfacePropertyDelimiter$3(state);
15529
+ if (state.events)
15530
+ state.events.exit?.("InlineInterfacePropertyDelimiter", state, result, eventData);
15531
+ return result;
15532
+ }
15533
+ }
15389
15534
  var TypeBinaryOp$0 = $TV($EXPECT($L78, fail, 'TypeBinaryOp "|"'), function($skip, $loc, $0, $1) {
15390
15535
  return { $loc, token: "|" };
15391
15536
  });
@@ -16631,6 +16776,33 @@ ${input.slice(result.pos)}
16631
16776
  return result;
16632
16777
  }
16633
16778
  }
16779
+ var ObjectIsEnabled$0 = $TV($EXPECT($L14, fail, 'ObjectIsEnabled ""'), function($skip, $loc, $0, $1) {
16780
+ if (module.config.objectIs)
16781
+ return;
16782
+ return $skip;
16783
+ });
16784
+ function ObjectIsEnabled(state) {
16785
+ let eventData;
16786
+ if (state.events) {
16787
+ const result = state.events.enter?.("ObjectIsEnabled", state);
16788
+ if (result) {
16789
+ if (result.cache)
16790
+ return result.cache;
16791
+ eventData = result.data;
16792
+ }
16793
+ }
16794
+ if (state.tokenize) {
16795
+ const result = $TOKEN("ObjectIsEnabled", state, ObjectIsEnabled$0(state));
16796
+ if (state.events)
16797
+ state.events.exit?.("ObjectIsEnabled", state, result, eventData);
16798
+ return result;
16799
+ } else {
16800
+ const result = ObjectIsEnabled$0(state);
16801
+ if (state.events)
16802
+ state.events.exit?.("ObjectIsEnabled", state, result, eventData);
16803
+ return result;
16804
+ }
16805
+ }
16634
16806
  var Reset$0 = $TV($EXPECT($L14, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
16635
16807
  module.indentLevels = [{
16636
16808
  level: 0,
@@ -16679,6 +16851,7 @@ ${input.slice(result.pos)}
16679
16851
  coffeeOf: false,
16680
16852
  coffeePrototype: false,
16681
16853
  implicitReturns: true,
16854
+ objectIs: false,
16682
16855
  react: false,
16683
16856
  solid: false,
16684
16857
  client: false,
@@ -16690,6 +16863,10 @@ ${input.slice(result.pos)}
16690
16863
  ts: true,
16691
16864
  children: [" as any"]
16692
16865
  };
16866
+ module.asConst = {
16867
+ ts: true,
16868
+ children: [" as const"]
16869
+ };
16693
16870
  module.prelude = [];
16694
16871
  const declareRef = {
16695
16872
  indexOf(indexOfRef) {
@@ -16706,6 +16883,13 @@ ${input.slice(result.pos)}
16706
16883
  };
16707
16884
  module.prelude.push(["", ["const ", hasPropRef, typeSuffix, " = {}.hasOwnProperty", module.asAny, "\n"]]);
16708
16885
  },
16886
+ is(isRef) {
16887
+ const typeSuffix = {
16888
+ ts: true,
16889
+ children: [": { <B, A extends B> (a: A, b: B): b is A, <A, B> (a: A, b: B): a is A & B }"]
16890
+ };
16891
+ module.prelude.push(["", ["const ", isRef, typeSuffix, " = Object.is", module.asAny, "\n"]]);
16892
+ },
16709
16893
  modulo(moduloRef) {
16710
16894
  const typeSuffix = {
16711
16895
  ts: true,
@@ -16765,6 +16949,12 @@ ${input.slice(result.pos)}
16765
16949
  declareRef[base](ref);
16766
16950
  return refs[base] = ref;
16767
16951
  };
16952
+ module.makeAsConst = function(node) {
16953
+ if (node.type === "Literal" && node.raw !== "null" || node.type === "ArrayExpression" || node.type === "ObjectExpression") {
16954
+ return { ...node, children: [...node.children, module.asConst] };
16955
+ }
16956
+ return node;
16957
+ };
16768
16958
  module.typeOfJSX = function(node) {
16769
16959
  switch (node.type) {
16770
16960
  case "JSXElement":
@@ -16844,6 +17034,9 @@ ${input.slice(result.pos)}
16844
17034
  ]) {
16845
17035
  module.config[option] = b;
16846
17036
  }
17037
+ if (b) {
17038
+ module.config.objectIs = false;
17039
+ }
16847
17040
  }
16848
17041
  });
16849
17042
  module.modifyString = function(str) {
@@ -17187,6 +17380,10 @@ ${input.slice(result.pos)}
17187
17380
  const op = expandedOps[i];
17188
17381
  if (op.special) {
17189
17382
  let [a, wsOp, op2, wsB, b] = expandedOps.slice(i - 2, i + 3);
17383
+ if (op2.asConst) {
17384
+ a = module.makeAsConst(a);
17385
+ b = module.makeAsConst(b);
17386
+ }
17190
17387
  let children;
17191
17388
  if (op2.call) {
17192
17389
  wsOp = module.insertTrimmingSpace(wsOp, "");
@@ -17196,11 +17393,21 @@ ${input.slice(result.pos)}
17196
17393
  } else {
17197
17394
  children = [wsOp, op2.call, "(", a, ",", wsB, b, ")", op2.suffix];
17198
17395
  }
17199
- } else if (op2.token === "instanceof" || op2.token === "in") {
17200
- children = ["!(", a, wsOp, op2, wsB, b, ")"];
17396
+ } else if (op2.method) {
17397
+ wsOp = module.insertTrimmingSpace(wsOp, "");
17398
+ wsB = module.insertTrimmingSpace(wsB, "");
17399
+ if (op2.reversed) {
17400
+ children = [wsB, b, wsOp, ".", op2.method, "(", a, ")"];
17401
+ } else {
17402
+ children = [a, wsOp, ".", op2.method, "(", wsB, b, ")"];
17403
+ }
17404
+ } else if (op2.token) {
17405
+ children = ["(", a, wsOp, op2, wsB, b, ")"];
17201
17406
  } else {
17202
17407
  throw new Error("Unknown operator: " + JSON.stringify(op2));
17203
17408
  }
17409
+ if (op2.negated)
17410
+ children.unshift("!");
17204
17411
  expandedOps.splice(i - 2, 5, {
17205
17412
  children
17206
17413
  });