@danielx/civet 0.6.71 → 0.6.73

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
@@ -2262,9 +2262,17 @@ var Civet = (() => {
2262
2262
  const isMethod = f.type === "MethodDefinition";
2263
2263
  const isConstructor = isMethod && name === "constructor";
2264
2264
  const isVoid = isVoidType(returnType2?.t) || async && isPromiseVoidType(returnType2?.t) || !async && generator && isGeneratorVoidType(returnType2?.t);
2265
- const isBlock = block?.type === "BlockStatement";
2266
- if (!isVoid && !set && !isConstructor && isBlock) {
2267
- insertReturn(block);
2265
+ if (block?.type === "BlockStatement") {
2266
+ if (isVoid || set || isConstructor) {
2267
+ if (block.bare && block.implicitlyReturned) {
2268
+ block.children = [" {", ...block.children, " }"];
2269
+ block.bare = block.implicitlyReturned = false;
2270
+ }
2271
+ } else {
2272
+ if (!block.implicitlyReturned) {
2273
+ insertReturn(block);
2274
+ }
2275
+ }
2268
2276
  }
2269
2277
  }
2270
2278
  }
@@ -2671,8 +2679,8 @@ var Civet = (() => {
2671
2679
  }
2672
2680
  }
2673
2681
  function aggregateDuplicateBindings(bindings, ReservedWord) {
2674
- const props = gatherRecursiveAll(bindings, (n) => n.type === "BindingProperty");
2675
- const arrayBindings = gatherRecursiveAll(bindings, (n) => n.type === "ArrayBindingPattern");
2682
+ const props = gatherRecursiveAll(bindings, ($3) => $3.type === "BindingProperty");
2683
+ const arrayBindings = gatherRecursiveAll(bindings, ($4) => $4.type === "ArrayBindingPattern");
2676
2684
  arrayBindings.forEach((a) => {
2677
2685
  const { elements } = a;
2678
2686
  return elements.forEach((element) => {
@@ -2702,20 +2710,22 @@ var Civet = (() => {
2702
2710
  }
2703
2711
  }
2704
2712
  propsGroupedByName.forEach((shared, key) => {
2705
- if (!key)
2713
+ if (!key) {
2706
2714
  return;
2715
+ }
2707
2716
  if (ReservedWord({ fail() {
2708
2717
  } }, {
2709
2718
  pos: 0,
2710
2719
  input: key
2711
2720
  })) {
2712
- shared.forEach((p) => ({
2713
- aliasBinding: aliasBinding(p, makeRef(`_${key}`, key))
2714
- }));
2721
+ shared.forEach((p) => {
2722
+ return aliasBinding(p, makeRef(`_${key}`, key));
2723
+ });
2715
2724
  return;
2716
2725
  }
2717
- if (shared.length === 1)
2726
+ if (shared.length === 1) {
2718
2727
  return;
2728
+ }
2719
2729
  const refs = shared.map((p) => {
2720
2730
  const ref = makeRef(key);
2721
2731
  aliasBinding(p, ref);
@@ -2728,7 +2738,7 @@ var Civet = (() => {
2728
2738
  return declarations;
2729
2739
  }
2730
2740
  function processPatternMatching(statements, ReservedWord) {
2731
- gatherRecursiveAll(statements, (n) => n.type === "SwitchStatement").forEach((s) => {
2741
+ gatherRecursiveAll(statements, ($5) => $5.type === "SwitchStatement").forEach((s) => {
2732
2742
  const { caseBlock } = s;
2733
2743
  const { clauses } = caseBlock;
2734
2744
  for (const c of clauses) {
@@ -2742,7 +2752,7 @@ var Civet = (() => {
2742
2752
  }
2743
2753
  let errors = false;
2744
2754
  let isPattern = false;
2745
- if (clauses.some((c) => c.type === "PatternClause")) {
2755
+ if (clauses.some(($6) => $6.type === "PatternClause")) {
2746
2756
  isPattern = true;
2747
2757
  clauses.forEach((c) => {
2748
2758
  if (!(c.type === "PatternClause" || c.type === "DefaultClause")) {
@@ -2756,8 +2766,9 @@ var Civet = (() => {
2756
2766
  return;
2757
2767
  });
2758
2768
  }
2759
- if (errors || !isPattern)
2769
+ if (errors || !isPattern) {
2760
2770
  return;
2771
+ }
2761
2772
  let { condition } = s;
2762
2773
  if (condition.type === "ParenthesizedExpression") {
2763
2774
  condition = condition.expression;
@@ -2969,7 +2980,7 @@ var Civet = (() => {
2969
2980
  };
2970
2981
  }
2971
2982
  children.push(arg);
2972
- if (!children.some(($3) => $3?.type === "ReturnStatement") && children.some(($4) => $4 === ",")) {
2983
+ if (!children.some(($7) => $7?.type === "ReturnStatement") && children.some(($8) => $8 === ",")) {
2973
2984
  const { parent } = s;
2974
2985
  const parenthesizedExpression = makeLeftHandSideExpression({ ...s });
2975
2986
  Object.assign(s, parenthesizedExpression, {
@@ -3092,7 +3103,7 @@ var Civet = (() => {
3092
3103
  scopes.push(decs);
3093
3104
  const varIds = [];
3094
3105
  const assignmentStatements = findAssignments(statements, scopes);
3095
- const undeclaredIdentifiers = assignmentStatements.flatMap((a) => a.names);
3106
+ const undeclaredIdentifiers = assignmentStatements.flatMap(($9) => $9?.names || []);
3096
3107
  undeclaredIdentifiers.filter((x, i, a) => {
3097
3108
  if (!hasDec(x))
3098
3109
  return a.indexOf(x) === i;
@@ -3397,8 +3408,9 @@ var Civet = (() => {
3397
3408
  }
3398
3409
  ];
3399
3410
  }
3400
- if (rest.delim?.at(-1)?.token === ",") {
3401
- rest.delim.pop();
3411
+ if (Array.isArray(rest.delim) && rest.delim.at(-1)?.token === ",") {
3412
+ rest.delim = rest.delim.slice(0, -1);
3413
+ rest.children = [...rest.children.slice(0, -1), rest.delim];
3402
3414
  }
3403
3415
  const children = [...props, ...after, rest];
3404
3416
  return {
@@ -4143,6 +4155,7 @@ ${input.slice(result.pos)}
4143
4155
  ArrowFunction,
4144
4156
  FatArrow,
4145
4157
  TrailingDeclaration,
4158
+ TrailingPipe,
4146
4159
  FatArrowBody,
4147
4160
  ConditionalExpression,
4148
4161
  TernaryRest,
@@ -4576,6 +4589,7 @@ ${input.slice(result.pos)}
4576
4589
  If,
4577
4590
  Import,
4578
4591
  In,
4592
+ Infer,
4579
4593
  LetOrConst,
4580
4594
  Const,
4581
4595
  Is,
@@ -4674,6 +4688,9 @@ ${input.slice(result.pos)}
4674
4688
  UsingJSModeError,
4675
4689
  TypeDeclaration,
4676
4690
  TypeDeclarationRest,
4691
+ TypeAliasDeclaration,
4692
+ InterfaceDeclaration,
4693
+ NamespaceDeclaration,
4677
4694
  OptionalEquals,
4678
4695
  TypeLexicalDeclaration,
4679
4696
  TypeDeclarationBinding,
@@ -4701,7 +4718,7 @@ ${input.slice(result.pos)}
4701
4718
  EnumDeclaration,
4702
4719
  EnumBlock,
4703
4720
  NestedEnumProperties,
4704
- NestedEnumProperty,
4721
+ NestedEnumPropertyLine,
4705
4722
  EnumProperty,
4706
4723
  TypeProperty,
4707
4724
  TypeIndexSignature,
@@ -4960,66 +4977,66 @@ ${input.slice(result.pos)}
4960
4977
  var $L150 = $L("#");
4961
4978
  var $L151 = $L("if");
4962
4979
  var $L152 = $L("in");
4963
- var $L153 = $L("let");
4964
- var $L154 = $L("const");
4965
- var $L155 = $L("is");
4966
- var $L156 = $L("loop");
4967
- var $L157 = $L("new");
4968
- var $L158 = $L("not");
4969
- var $L159 = $L("of");
4970
- var $L160 = $L("[");
4971
- var $L161 = $L("operator");
4972
- var $L162 = $L("own");
4973
- var $L163 = $L("public");
4974
- var $L164 = $L("private");
4975
- var $L165 = $L("protected");
4976
- var $L166 = $L("||>");
4977
- var $L167 = $L("|\u25B7");
4978
- var $L168 = $L("|>=");
4979
- var $L169 = $L("\u25B7=");
4980
- var $L170 = $L("|>");
4981
- var $L171 = $L("\u25B7");
4982
- var $L172 = $L("readonly");
4983
- var $L173 = $L("return");
4984
- var $L174 = $L("satisfies");
4985
- var $L175 = $L("'");
4986
- var $L176 = $L("static");
4987
- var $L177 = $L("${");
4988
- var $L178 = $L("super");
4989
- var $L179 = $L("switch");
4990
- var $L180 = $L("target");
4991
- var $L181 = $L("then");
4992
- var $L182 = $L("this");
4993
- var $L183 = $L("throw");
4994
- var $L184 = $L('"""');
4995
- var $L185 = $L("'''");
4996
- var $L186 = $L("///");
4997
- var $L187 = $L("```");
4998
- var $L188 = $L("try");
4999
- var $L189 = $L("typeof");
5000
- var $L190 = $L("unless");
5001
- var $L191 = $L("until");
5002
- var $L192 = $L("using");
5003
- var $L193 = $L("var");
5004
- var $L194 = $L("void");
5005
- var $L195 = $L("when");
5006
- var $L196 = $L("while");
5007
- var $L197 = $L("yield");
5008
- var $L198 = $L("/>");
5009
- var $L199 = $L("</");
5010
- var $L200 = $L("<>");
5011
- var $L201 = $L("</>");
5012
- var $L202 = $L("<!--");
5013
- var $L203 = $L("-->");
5014
- var $L204 = $L("type");
5015
- var $L205 = $L("enum");
5016
- var $L206 = $L("interface");
5017
- var $L207 = $L("global");
5018
- var $L208 = $L("module");
5019
- var $L209 = $L("namespace");
5020
- var $L210 = $L("asserts");
5021
- var $L211 = $L("keyof");
5022
- var $L212 = $L("infer");
4980
+ var $L153 = $L("infer");
4981
+ var $L154 = $L("let");
4982
+ var $L155 = $L("const");
4983
+ var $L156 = $L("is");
4984
+ var $L157 = $L("loop");
4985
+ var $L158 = $L("new");
4986
+ var $L159 = $L("not");
4987
+ var $L160 = $L("of");
4988
+ var $L161 = $L("[");
4989
+ var $L162 = $L("operator");
4990
+ var $L163 = $L("own");
4991
+ var $L164 = $L("public");
4992
+ var $L165 = $L("private");
4993
+ var $L166 = $L("protected");
4994
+ var $L167 = $L("||>");
4995
+ var $L168 = $L("|\u25B7");
4996
+ var $L169 = $L("|>=");
4997
+ var $L170 = $L("\u25B7=");
4998
+ var $L171 = $L("|>");
4999
+ var $L172 = $L("\u25B7");
5000
+ var $L173 = $L("readonly");
5001
+ var $L174 = $L("return");
5002
+ var $L175 = $L("satisfies");
5003
+ var $L176 = $L("'");
5004
+ var $L177 = $L("static");
5005
+ var $L178 = $L("${");
5006
+ var $L179 = $L("super");
5007
+ var $L180 = $L("switch");
5008
+ var $L181 = $L("target");
5009
+ var $L182 = $L("then");
5010
+ var $L183 = $L("this");
5011
+ var $L184 = $L("throw");
5012
+ var $L185 = $L('"""');
5013
+ var $L186 = $L("'''");
5014
+ var $L187 = $L("///");
5015
+ var $L188 = $L("```");
5016
+ var $L189 = $L("try");
5017
+ var $L190 = $L("typeof");
5018
+ var $L191 = $L("unless");
5019
+ var $L192 = $L("until");
5020
+ var $L193 = $L("using");
5021
+ var $L194 = $L("var");
5022
+ var $L195 = $L("void");
5023
+ var $L196 = $L("when");
5024
+ var $L197 = $L("while");
5025
+ var $L198 = $L("yield");
5026
+ var $L199 = $L("/>");
5027
+ var $L200 = $L("</");
5028
+ var $L201 = $L("<>");
5029
+ var $L202 = $L("</>");
5030
+ var $L203 = $L("<!--");
5031
+ var $L204 = $L("-->");
5032
+ var $L205 = $L("type");
5033
+ var $L206 = $L("enum");
5034
+ var $L207 = $L("interface");
5035
+ var $L208 = $L("global");
5036
+ var $L209 = $L("module");
5037
+ var $L210 = $L("namespace");
5038
+ var $L211 = $L("asserts");
5039
+ var $L212 = $L("keyof");
5023
5040
  var $L213 = $L("???");
5024
5041
  var $L214 = $L("[]");
5025
5042
  var $L215 = $L("civet");
@@ -5756,12 +5773,23 @@ ${input.slice(result.pos)}
5756
5773
  function TrailingDeclaration(ctx, state) {
5757
5774
  return $EVENT(ctx, state, "TrailingDeclaration", TrailingDeclaration$0);
5758
5775
  }
5759
- var FatArrowBody$0 = $TS($S($N(EOS), NonPipelinePostfixedExpression, $N(TrailingDeclaration), $N(SemicolonDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
5776
+ var TrailingPipe$0 = $S($E(_), Pipe);
5777
+ function TrailingPipe(ctx, state) {
5778
+ return $EVENT(ctx, state, "TrailingPipe", TrailingPipe$0);
5779
+ }
5780
+ var FatArrowBody$0 = $TS($S($N(EOS), NonPipelinePostfixedExpression, $N(TrailingDeclaration), $N(TrailingPipe), $N(SemicolonDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5760
5781
  var exp = $2;
5761
5782
  if (exp.type === "ObjectExpression") {
5762
- return makeLeftHandSideExpression(exp);
5783
+ exp = makeLeftHandSideExpression(exp);
5763
5784
  }
5764
- return exp;
5785
+ const expressions = [exp];
5786
+ return {
5787
+ type: "BlockStatement",
5788
+ bare: true,
5789
+ expressions,
5790
+ children: [expressions],
5791
+ implicitlyReturned: true
5792
+ };
5765
5793
  });
5766
5794
  var FatArrowBody$1 = NoCommaBracedOrEmptyBlock;
5767
5795
  var FatArrowBody$$ = [FatArrowBody$0, FatArrowBody$1];
@@ -5891,7 +5919,7 @@ ${input.slice(result.pos)}
5891
5919
  return $EVENT(ctx, state, "ParenthesizedExpression", ParenthesizedExpression$0);
5892
5920
  }
5893
5921
  var ClassDeclaration$0 = $TS($S(ClassExpression), function($skip, $loc, $0, $1) {
5894
- if ($1.binding)
5922
+ if ($1.id)
5895
5923
  return $1;
5896
5924
  return makeLeftHandSideExpression($1);
5897
5925
  });
@@ -5908,6 +5936,7 @@ ${input.slice(result.pos)}
5908
5936
  decorators,
5909
5937
  abstract,
5910
5938
  binding,
5939
+ id: binding?.[0],
5911
5940
  heritage,
5912
5941
  body,
5913
5942
  children: $0
@@ -6225,7 +6254,8 @@ ${input.slice(result.pos)}
6225
6254
  name: id.name,
6226
6255
  children: [".", id]
6227
6256
  }],
6228
- privateShorthand: true
6257
+ privateShorthand: true,
6258
+ privateId: id
6229
6259
  };
6230
6260
  });
6231
6261
  var PrivateThis$$ = [PrivateThis$0, PrivateThis$1];
@@ -7411,7 +7441,10 @@ ${input.slice(result.pos)}
7411
7441
  var w = $2;
7412
7442
  var decl = $3;
7413
7443
  decl.names.forEach((name) => module.operators.add(name));
7414
- return [insertTrimmingSpace(w, ""), decl];
7444
+ return {
7445
+ ...decl,
7446
+ children: [insertTrimmingSpace(w, ""), ...decl.children]
7447
+ };
7415
7448
  });
7416
7449
  var OperatorDeclaration$1 = $TS($S(OperatorSignature, BracedBlock), function($skip, $loc, $0, $1, $2) {
7417
7450
  var signature = $1;
@@ -7433,7 +7466,10 @@ ${input.slice(result.pos)}
7433
7466
  var ids = $4;
7434
7467
  module.operators.add(id.name);
7435
7468
  ids.forEach(([, , id2]) => module.operators.add(id2.name));
7436
- return [];
7469
+ return {
7470
+ id,
7471
+ children: []
7472
+ };
7437
7473
  });
7438
7474
  var OperatorDeclaration$$ = [OperatorDeclaration$0, OperatorDeclaration$1, OperatorDeclaration$2];
7439
7475
  function OperatorDeclaration(ctx, state) {
@@ -8320,14 +8356,17 @@ ${input.slice(result.pos)}
8320
8356
  function NestedImplicitPropertyDefinitions(ctx, state) {
8321
8357
  return $EVENT(ctx, state, "NestedImplicitPropertyDefinitions", NestedImplicitPropertyDefinitions$0);
8322
8358
  }
8323
- var NestedImplicitPropertyDefinition$0 = $TS($S(Nested, NamedProperty, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
8324
- var ws = $1;
8325
- var prop = $2;
8326
- var delimiter = $3;
8327
- return {
8359
+ var NestedImplicitPropertyDefinition$0 = $TS($S(Nested, $P($S($E(_), NamedProperty, ObjectPropertyDelimiter))), function($skip, $loc, $0, $1, $2) {
8360
+ var indent = $1;
8361
+ var props = $2;
8362
+ return props.map(([ws, prop, delimiter], i) => ({
8328
8363
  ...prop,
8329
- children: [...ws, ...prop.children, delimiter]
8330
- };
8364
+ children: [
8365
+ ...i === 0 ? [indent, ws] : [ws],
8366
+ ...prop.children,
8367
+ delimiter
8368
+ ]
8369
+ }));
8331
8370
  });
8332
8371
  function NestedImplicitPropertyDefinition(ctx, state) {
8333
8372
  return $EVENT(ctx, state, "NestedImplicitPropertyDefinition", NestedImplicitPropertyDefinition$0);
@@ -8725,7 +8764,12 @@ ${input.slice(result.pos)}
8725
8764
  v = insertTrimmingSpace(p, "");
8726
8765
  break;
8727
8766
  case "Property":
8728
- v = insertTrimmingSpace(p.value, "");
8767
+ const { value: value2 } = p;
8768
+ if (value2.privateShorthand) {
8769
+ v = value2.privateId;
8770
+ } else {
8771
+ v = insertTrimmingSpace(value2, "");
8772
+ }
8729
8773
  break;
8730
8774
  }
8731
8775
  const exp = processCallMemberExpression({
@@ -10804,18 +10848,45 @@ ${input.slice(result.pos)}
10804
10848
  children: [exp, $0.slice(1)]
10805
10849
  };
10806
10850
  });
10807
- var ExportDeclaration$1 = $TS($S($E(Decorators), Export, __, Default, __, $C(HoistableDeclaration, ClassDeclaration, ExtendedExpression)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
10851
+ var ExportDeclaration$1 = $TS($S($E(Decorators), Export, __, Default, __, $N(FunctionDeclaration), $C(LexicalDeclaration, VariableStatement, TypeAliasDeclaration, NamespaceDeclaration, EnumDeclaration, OperatorDeclaration)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
10852
+ var declaration = $7;
10853
+ let id, error;
10854
+ if (declaration.id) {
10855
+ id = declaration.id;
10856
+ } else if (declaration.names) {
10857
+ if (declaration.names.length !== 1) {
10858
+ error = {
10859
+ type: "Error",
10860
+ message: `export default with ${declaration.names.length} variable declaration (should be 1)`
10861
+ };
10862
+ }
10863
+ id = declaration.names[0];
10864
+ } else {
10865
+ throw new Error("Could not find name of declaration in export default");
10866
+ }
10867
+ return [
10868
+ declaration,
10869
+ { children: [";"], ts: declaration.ts },
10870
+ error ?? {
10871
+ type: "ExportDeclaration",
10872
+ declaration: id,
10873
+ ts: declaration.ts,
10874
+ children: [...$0.slice(0, -2), id]
10875
+ }
10876
+ ];
10877
+ });
10878
+ var ExportDeclaration$2 = $TS($S($E(Decorators), Export, __, Default, __, $C(HoistableDeclaration, ClassDeclaration, InterfaceDeclaration, ExtendedExpression)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
10808
10879
  var declaration = $6;
10809
- return { type: "ExportDeclaration", declaration, children: $0 };
10880
+ return { type: "ExportDeclaration", declaration, ts: declaration.ts, children: $0 };
10810
10881
  });
10811
- var ExportDeclaration$2 = $TS($S(Export, __, ExportFromClause, __, FromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
10882
+ var ExportDeclaration$3 = $TS($S(Export, __, ExportFromClause, __, FromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
10812
10883
  return { type: "ExportDeclaration", ts: $3.ts, children: $0 };
10813
10884
  });
10814
- var ExportDeclaration$3 = $TS($S($E(Decorators), Export, __, $C(Declaration, VariableStatement, TypeAndNamedExports, ExportVarDec)), function($skip, $loc, $0, $1, $2, $3, $4) {
10885
+ var ExportDeclaration$4 = $TS($S($E(Decorators), Export, __, $C(Declaration, VariableStatement, TypeAndNamedExports, ExportVarDec)), function($skip, $loc, $0, $1, $2, $3, $4) {
10815
10886
  var declaration = $4;
10816
10887
  return { type: "ExportDeclaration", declaration, ts: declaration.ts, children: $0 };
10817
10888
  });
10818
- var ExportDeclaration$$ = [ExportDeclaration$0, ExportDeclaration$1, ExportDeclaration$2, ExportDeclaration$3];
10889
+ var ExportDeclaration$$ = [ExportDeclaration$0, ExportDeclaration$1, ExportDeclaration$2, ExportDeclaration$3, ExportDeclaration$4];
10819
10890
  function ExportDeclaration(ctx, state) {
10820
10891
  return $EVENT_C(ctx, state, "ExportDeclaration", ExportDeclaration$$);
10821
10892
  }
@@ -10979,6 +11050,7 @@ ${input.slice(result.pos)}
10979
11050
  var VariableStatement$0 = $TS($S(Var, __, VariableDeclarationList), function($skip, $loc, $0, $1, $2, $3) {
10980
11051
  return {
10981
11052
  ...$3,
11053
+ names: $3.names,
10982
11054
  children: [$1, ...$2, ...$3.children]
10983
11055
  };
10984
11056
  });
@@ -11154,7 +11226,7 @@ ${input.slice(result.pos)}
11154
11226
  var flags = $4;
11155
11227
  let hasSubstitutions = body.some((part) => part.type === "Substitution");
11156
11228
  if (hasSubstitutions) {
11157
- const result = [
11229
+ const children = [
11158
11230
  { ...open, token: "RegExp(`" },
11159
11231
  // Escape backticks, backslashes, and '$' in the body text
11160
11232
  body.map(
@@ -11166,13 +11238,16 @@ ${input.slice(result.pos)}
11166
11238
  "`"
11167
11239
  ];
11168
11240
  if (flags.length) {
11169
- result.push(
11241
+ children.push(
11170
11242
  ", ",
11171
11243
  JSON.stringify(flags)
11172
11244
  );
11173
11245
  }
11174
- result.push({ ...close, token: ")" });
11175
- return result;
11246
+ children.push({ ...close, token: ")" });
11247
+ return {
11248
+ type: "RegularExpressionLiteral",
11249
+ children
11250
+ };
11176
11251
  }
11177
11252
  return {
11178
11253
  type: "RegularExpressionLiteral",
@@ -11739,19 +11814,25 @@ ${input.slice(result.pos)}
11739
11814
  function In(ctx, state) {
11740
11815
  return $EVENT(ctx, state, "In", In$0);
11741
11816
  }
11742
- var LetOrConst$0 = $TS($S($C($EXPECT($L153, 'LetOrConst "let"'), $EXPECT($L154, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11817
+ var Infer$0 = $TS($S($EXPECT($L153, 'Infer "infer"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11818
+ return { $loc, token: $1 };
11819
+ });
11820
+ function Infer(ctx, state) {
11821
+ return $EVENT(ctx, state, "Infer", Infer$0);
11822
+ }
11823
+ var LetOrConst$0 = $TS($S($C($EXPECT($L154, 'LetOrConst "let"'), $EXPECT($L155, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11743
11824
  return { $loc, token: $1 };
11744
11825
  });
11745
11826
  function LetOrConst(ctx, state) {
11746
11827
  return $EVENT(ctx, state, "LetOrConst", LetOrConst$0);
11747
11828
  }
11748
- var Const$0 = $TS($S($EXPECT($L154, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11829
+ var Const$0 = $TS($S($EXPECT($L155, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11749
11830
  return { $loc, token: $1 };
11750
11831
  });
11751
11832
  function Const(ctx, state) {
11752
11833
  return $EVENT(ctx, state, "Const", Const$0);
11753
11834
  }
11754
- var Is$0 = $TS($S($EXPECT($L155, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11835
+ var Is$0 = $TS($S($EXPECT($L156, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11755
11836
  return { $loc, token: $1 };
11756
11837
  });
11757
11838
  function Is(ctx, state) {
@@ -11763,25 +11844,25 @@ ${input.slice(result.pos)}
11763
11844
  function LetOrConstOrVar(ctx, state) {
11764
11845
  return $EVENT_C(ctx, state, "LetOrConstOrVar", LetOrConstOrVar$$);
11765
11846
  }
11766
- var Loop$0 = $TS($S($EXPECT($L156, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11847
+ var Loop$0 = $TS($S($EXPECT($L157, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11767
11848
  return { $loc, token: "while(true)" };
11768
11849
  });
11769
11850
  function Loop(ctx, state) {
11770
11851
  return $EVENT(ctx, state, "Loop", Loop$0);
11771
11852
  }
11772
- var New$0 = $TS($S($EXPECT($L157, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11853
+ var New$0 = $TS($S($EXPECT($L158, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11773
11854
  return { $loc, token: $1 };
11774
11855
  });
11775
11856
  function New(ctx, state) {
11776
11857
  return $EVENT(ctx, state, "New", New$0);
11777
11858
  }
11778
- var Not$0 = $TS($S($EXPECT($L158, 'Not "not"'), NonIdContinue, $N($S($E(_), $EXPECT($L14, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
11859
+ var Not$0 = $TS($S($EXPECT($L159, 'Not "not"'), NonIdContinue, $N($S($E(_), $EXPECT($L14, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
11779
11860
  return { $loc, token: "!" };
11780
11861
  });
11781
11862
  function Not(ctx, state) {
11782
11863
  return $EVENT(ctx, state, "Not", Not$0);
11783
11864
  }
11784
- var Of$0 = $TS($S($EXPECT($L159, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11865
+ var Of$0 = $TS($S($EXPECT($L160, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11785
11866
  return { $loc, token: $1 };
11786
11867
  });
11787
11868
  function Of(ctx, state) {
@@ -11799,7 +11880,7 @@ ${input.slice(result.pos)}
11799
11880
  function OpenBrace(ctx, state) {
11800
11881
  return $EVENT(ctx, state, "OpenBrace", OpenBrace$0);
11801
11882
  }
11802
- var OpenBracket$0 = $TV($EXPECT($L160, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
11883
+ var OpenBracket$0 = $TV($EXPECT($L161, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
11803
11884
  return { $loc, token: $1 };
11804
11885
  });
11805
11886
  function OpenBracket(ctx, state) {
@@ -11811,43 +11892,43 @@ ${input.slice(result.pos)}
11811
11892
  function OpenParen(ctx, state) {
11812
11893
  return $EVENT(ctx, state, "OpenParen", OpenParen$0);
11813
11894
  }
11814
- var Operator$0 = $TS($S($EXPECT($L161, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11895
+ var Operator$0 = $TS($S($EXPECT($L162, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11815
11896
  return { $loc, token: $1 };
11816
11897
  });
11817
11898
  function Operator(ctx, state) {
11818
11899
  return $EVENT(ctx, state, "Operator", Operator$0);
11819
11900
  }
11820
- var Own$0 = $TS($S($EXPECT($L162, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11901
+ var Own$0 = $TS($S($EXPECT($L163, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11821
11902
  return { $loc, token: $1 };
11822
11903
  });
11823
11904
  function Own(ctx, state) {
11824
11905
  return $EVENT(ctx, state, "Own", Own$0);
11825
11906
  }
11826
- var Public$0 = $TS($S($EXPECT($L163, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11907
+ var Public$0 = $TS($S($EXPECT($L164, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11827
11908
  return { $loc, token: $1 };
11828
11909
  });
11829
11910
  function Public(ctx, state) {
11830
11911
  return $EVENT(ctx, state, "Public", Public$0);
11831
11912
  }
11832
- var Private$0 = $TS($S($EXPECT($L164, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11913
+ var Private$0 = $TS($S($EXPECT($L165, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11833
11914
  return { $loc, token: $1 };
11834
11915
  });
11835
11916
  function Private(ctx, state) {
11836
11917
  return $EVENT(ctx, state, "Private", Private$0);
11837
11918
  }
11838
- var Protected$0 = $TS($S($EXPECT($L165, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11919
+ var Protected$0 = $TS($S($EXPECT($L166, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11839
11920
  return { $loc, token: $1 };
11840
11921
  });
11841
11922
  function Protected(ctx, state) {
11842
11923
  return $EVENT(ctx, state, "Protected", Protected$0);
11843
11924
  }
11844
- var Pipe$0 = $TV($C($EXPECT($L166, 'Pipe "||>"'), $EXPECT($L167, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
11925
+ var Pipe$0 = $TV($C($EXPECT($L167, 'Pipe "||>"'), $EXPECT($L168, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
11845
11926
  return { $loc, token: "||>" };
11846
11927
  });
11847
- var Pipe$1 = $TV($C($EXPECT($L168, 'Pipe "|>="'), $EXPECT($L169, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
11928
+ var Pipe$1 = $TV($C($EXPECT($L169, 'Pipe "|>="'), $EXPECT($L170, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
11848
11929
  return { $loc, token: "|>=" };
11849
11930
  });
11850
- var Pipe$2 = $TV($C($EXPECT($L170, 'Pipe "|>"'), $EXPECT($L171, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
11931
+ var Pipe$2 = $TV($C($EXPECT($L171, 'Pipe "|>"'), $EXPECT($L172, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
11851
11932
  return { $loc, token: "|>" };
11852
11933
  });
11853
11934
  var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
@@ -11860,19 +11941,19 @@ ${input.slice(result.pos)}
11860
11941
  function QuestionMark(ctx, state) {
11861
11942
  return $EVENT(ctx, state, "QuestionMark", QuestionMark$0);
11862
11943
  }
11863
- var Readonly$0 = $TS($S($EXPECT($L172, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11944
+ var Readonly$0 = $TS($S($EXPECT($L173, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11864
11945
  return { $loc, token: $1, ts: true };
11865
11946
  });
11866
11947
  function Readonly(ctx, state) {
11867
11948
  return $EVENT(ctx, state, "Readonly", Readonly$0);
11868
11949
  }
11869
- var Return$0 = $TS($S($EXPECT($L173, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11950
+ var Return$0 = $TS($S($EXPECT($L174, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11870
11951
  return { $loc, token: $1 };
11871
11952
  });
11872
11953
  function Return(ctx, state) {
11873
11954
  return $EVENT(ctx, state, "Return", Return$0);
11874
11955
  }
11875
- var Satisfies$0 = $TS($S($EXPECT($L174, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11956
+ var Satisfies$0 = $TS($S($EXPECT($L175, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11876
11957
  return { $loc, token: $1 };
11877
11958
  });
11878
11959
  function Satisfies(ctx, state) {
@@ -11884,7 +11965,7 @@ ${input.slice(result.pos)}
11884
11965
  function Semicolon(ctx, state) {
11885
11966
  return $EVENT(ctx, state, "Semicolon", Semicolon$0);
11886
11967
  }
11887
- var SingleQuote$0 = $TV($EXPECT($L175, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
11968
+ var SingleQuote$0 = $TV($EXPECT($L176, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
11888
11969
  return { $loc, token: $1 };
11889
11970
  });
11890
11971
  function SingleQuote(ctx, state) {
@@ -11896,7 +11977,7 @@ ${input.slice(result.pos)}
11896
11977
  function Star(ctx, state) {
11897
11978
  return $EVENT(ctx, state, "Star", Star$0);
11898
11979
  }
11899
- var Static$0 = $TS($S($EXPECT($L176, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11980
+ var Static$0 = $TS($S($EXPECT($L177, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11900
11981
  return { $loc, token: $1 };
11901
11982
  });
11902
11983
  var Static$1 = $TS($S($EXPECT($L120, 'Static "@"'), $N($C($EXPECT($L4, 'Static "("'), $EXPECT($L120, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
@@ -11906,127 +11987,127 @@ ${input.slice(result.pos)}
11906
11987
  function Static(ctx, state) {
11907
11988
  return $EVENT_C(ctx, state, "Static", Static$$);
11908
11989
  }
11909
- var SubstitutionStart$0 = $TV($EXPECT($L177, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
11990
+ var SubstitutionStart$0 = $TV($EXPECT($L178, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
11910
11991
  return { $loc, token: $1 };
11911
11992
  });
11912
11993
  function SubstitutionStart(ctx, state) {
11913
11994
  return $EVENT(ctx, state, "SubstitutionStart", SubstitutionStart$0);
11914
11995
  }
11915
- var Super$0 = $TS($S($EXPECT($L178, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11996
+ var Super$0 = $TS($S($EXPECT($L179, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11916
11997
  return { $loc, token: $1 };
11917
11998
  });
11918
11999
  function Super(ctx, state) {
11919
12000
  return $EVENT(ctx, state, "Super", Super$0);
11920
12001
  }
11921
- var Switch$0 = $TS($S($EXPECT($L179, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12002
+ var Switch$0 = $TS($S($EXPECT($L180, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11922
12003
  return { $loc, token: $1 };
11923
12004
  });
11924
12005
  function Switch(ctx, state) {
11925
12006
  return $EVENT(ctx, state, "Switch", Switch$0);
11926
12007
  }
11927
- var Target$0 = $TS($S($EXPECT($L180, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12008
+ var Target$0 = $TS($S($EXPECT($L181, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11928
12009
  return { $loc, token: $1 };
11929
12010
  });
11930
12011
  function Target(ctx, state) {
11931
12012
  return $EVENT(ctx, state, "Target", Target$0);
11932
12013
  }
11933
- var Then$0 = $TS($S(__, $EXPECT($L181, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
12014
+ var Then$0 = $TS($S(__, $EXPECT($L182, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
11934
12015
  return { $loc, token: "" };
11935
12016
  });
11936
12017
  function Then(ctx, state) {
11937
12018
  return $EVENT(ctx, state, "Then", Then$0);
11938
12019
  }
11939
- var This$0 = $TS($S($EXPECT($L182, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12020
+ var This$0 = $TS($S($EXPECT($L183, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11940
12021
  return { $loc, token: $1 };
11941
12022
  });
11942
12023
  function This(ctx, state) {
11943
12024
  return $EVENT(ctx, state, "This", This$0);
11944
12025
  }
11945
- var Throw$0 = $TS($S($EXPECT($L183, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12026
+ var Throw$0 = $TS($S($EXPECT($L184, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11946
12027
  return { $loc, token: $1 };
11947
12028
  });
11948
12029
  function Throw(ctx, state) {
11949
12030
  return $EVENT(ctx, state, "Throw", Throw$0);
11950
12031
  }
11951
- var TripleDoubleQuote$0 = $TV($EXPECT($L184, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
12032
+ var TripleDoubleQuote$0 = $TV($EXPECT($L185, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
11952
12033
  return { $loc, token: "`" };
11953
12034
  });
11954
12035
  function TripleDoubleQuote(ctx, state) {
11955
12036
  return $EVENT(ctx, state, "TripleDoubleQuote", TripleDoubleQuote$0);
11956
12037
  }
11957
- var TripleSingleQuote$0 = $TV($EXPECT($L185, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
12038
+ var TripleSingleQuote$0 = $TV($EXPECT($L186, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
11958
12039
  return { $loc, token: "`" };
11959
12040
  });
11960
12041
  function TripleSingleQuote(ctx, state) {
11961
12042
  return $EVENT(ctx, state, "TripleSingleQuote", TripleSingleQuote$0);
11962
12043
  }
11963
- var TripleSlash$0 = $TV($EXPECT($L186, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
12044
+ var TripleSlash$0 = $TV($EXPECT($L187, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
11964
12045
  return { $loc, token: "/" };
11965
12046
  });
11966
12047
  function TripleSlash(ctx, state) {
11967
12048
  return $EVENT(ctx, state, "TripleSlash", TripleSlash$0);
11968
12049
  }
11969
- var TripleTick$0 = $TV($EXPECT($L187, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
12050
+ var TripleTick$0 = $TV($EXPECT($L188, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
11970
12051
  return { $loc, token: "`" };
11971
12052
  });
11972
12053
  function TripleTick(ctx, state) {
11973
12054
  return $EVENT(ctx, state, "TripleTick", TripleTick$0);
11974
12055
  }
11975
- var Try$0 = $TS($S($EXPECT($L188, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12056
+ var Try$0 = $TS($S($EXPECT($L189, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11976
12057
  return { $loc, token: $1 };
11977
12058
  });
11978
12059
  function Try(ctx, state) {
11979
12060
  return $EVENT(ctx, state, "Try", Try$0);
11980
12061
  }
11981
- var Typeof$0 = $TS($S($EXPECT($L189, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12062
+ var Typeof$0 = $TS($S($EXPECT($L190, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11982
12063
  return { $loc, token: $1 };
11983
12064
  });
11984
12065
  function Typeof(ctx, state) {
11985
12066
  return $EVENT(ctx, state, "Typeof", Typeof$0);
11986
12067
  }
11987
- var Unless$0 = $TS($S($EXPECT($L190, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12068
+ var Unless$0 = $TS($S($EXPECT($L191, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11988
12069
  return { $loc, token: $1, negated: true };
11989
12070
  });
11990
12071
  function Unless(ctx, state) {
11991
12072
  return $EVENT(ctx, state, "Unless", Unless$0);
11992
12073
  }
11993
- var Until$0 = $TS($S($EXPECT($L191, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12074
+ var Until$0 = $TS($S($EXPECT($L192, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
11994
12075
  return { $loc, token: $1 };
11995
12076
  });
11996
12077
  function Until(ctx, state) {
11997
12078
  return $EVENT(ctx, state, "Until", Until$0);
11998
12079
  }
11999
- var Using$0 = $TS($S($EXPECT($L192, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12080
+ var Using$0 = $TS($S($EXPECT($L193, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12000
12081
  return { $loc, token: $1 };
12001
12082
  });
12002
12083
  function Using(ctx, state) {
12003
12084
  return $EVENT(ctx, state, "Using", Using$0);
12004
12085
  }
12005
- var Var$0 = $TS($S($EXPECT($L193, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12086
+ var Var$0 = $TS($S($EXPECT($L194, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12006
12087
  return { $loc, token: $1 };
12007
12088
  });
12008
12089
  function Var(ctx, state) {
12009
12090
  return $EVENT(ctx, state, "Var", Var$0);
12010
12091
  }
12011
- var Void$0 = $TS($S($EXPECT($L194, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12092
+ var Void$0 = $TS($S($EXPECT($L195, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12012
12093
  return { $loc, token: $1 };
12013
12094
  });
12014
12095
  function Void(ctx, state) {
12015
12096
  return $EVENT(ctx, state, "Void", Void$0);
12016
12097
  }
12017
- var When$0 = $TS($S($EXPECT($L195, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12098
+ var When$0 = $TS($S($EXPECT($L196, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12018
12099
  return { $loc, token: "case" };
12019
12100
  });
12020
12101
  function When(ctx, state) {
12021
12102
  return $EVENT(ctx, state, "When", When$0);
12022
12103
  }
12023
- var While$0 = $TS($S($EXPECT($L196, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12104
+ var While$0 = $TS($S($EXPECT($L197, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12024
12105
  return { $loc, token: $1 };
12025
12106
  });
12026
12107
  function While(ctx, state) {
12027
12108
  return $EVENT(ctx, state, "While", While$0);
12028
12109
  }
12029
- var Yield$0 = $TS($S($EXPECT($L197, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12110
+ var Yield$0 = $TS($S($EXPECT($L198, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12030
12111
  return { $loc, token: $1, type: "Yield" };
12031
12112
  });
12032
12113
  function Yield(ctx, state) {
@@ -12105,7 +12186,7 @@ ${input.slice(result.pos)}
12105
12186
  function JSXElement(ctx, state) {
12106
12187
  return $EVENT_C(ctx, state, "JSXElement", JSXElement$$);
12107
12188
  }
12108
- var JSXSelfClosingElement$0 = $TS($S($EXPECT($L16, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L198, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12189
+ var JSXSelfClosingElement$0 = $TS($S($EXPECT($L16, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L199, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12109
12190
  return { type: "JSXElement", children: $0, tag: $2 };
12110
12191
  });
12111
12192
  function JSXSelfClosingElement(ctx, state) {
@@ -12139,7 +12220,7 @@ ${input.slice(result.pos)}
12139
12220
  function JSXOptionalClosingElement(ctx, state) {
12140
12221
  return $EVENT_C(ctx, state, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
12141
12222
  }
12142
- var JSXClosingElement$0 = $S($EXPECT($L199, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L37, 'JSXClosingElement ">"'));
12223
+ var JSXClosingElement$0 = $S($EXPECT($L200, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L37, 'JSXClosingElement ">"'));
12143
12224
  function JSXClosingElement(ctx, state) {
12144
12225
  return $EVENT(ctx, state, "JSXClosingElement", JSXClosingElement$0);
12145
12226
  }
@@ -12160,7 +12241,7 @@ ${input.slice(result.pos)}
12160
12241
  ];
12161
12242
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
12162
12243
  });
12163
- var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L200, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12244
+ var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L201, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12164
12245
  var children = $3;
12165
12246
  $0 = $0.slice(1);
12166
12247
  return {
@@ -12173,7 +12254,7 @@ ${input.slice(result.pos)}
12173
12254
  function JSXFragment(ctx, state) {
12174
12255
  return $EVENT_C(ctx, state, "JSXFragment", JSXFragment$$);
12175
12256
  }
12176
- var PushJSXOpeningFragment$0 = $TV($EXPECT($L200, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
12257
+ var PushJSXOpeningFragment$0 = $TV($EXPECT($L201, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
12177
12258
  module.JSXTagStack.push("");
12178
12259
  return $1;
12179
12260
  });
@@ -12190,7 +12271,7 @@ ${input.slice(result.pos)}
12190
12271
  function JSXOptionalClosingFragment(ctx, state) {
12191
12272
  return $EVENT_C(ctx, state, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
12192
12273
  }
12193
- var JSXClosingFragment$0 = $EXPECT($L201, 'JSXClosingFragment "</>"');
12274
+ var JSXClosingFragment$0 = $EXPECT($L202, 'JSXClosingFragment "</>"');
12194
12275
  function JSXClosingFragment(ctx, state) {
12195
12276
  return $EVENT(ctx, state, "JSXClosingFragment", JSXClosingFragment$0);
12196
12277
  }
@@ -12664,7 +12745,7 @@ ${input.slice(result.pos)}
12664
12745
  function JSXChild(ctx, state) {
12665
12746
  return $EVENT_C(ctx, state, "JSXChild", JSXChild$$);
12666
12747
  }
12667
- var JSXComment$0 = $TS($S($EXPECT($L202, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L203, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
12748
+ var JSXComment$0 = $TS($S($EXPECT($L203, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L204, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
12668
12749
  return ["{/*", $2, "*/}"];
12669
12750
  });
12670
12751
  function JSXComment(ctx, state) {
@@ -12751,21 +12832,66 @@ ${input.slice(result.pos)}
12751
12832
  var TypeDeclaration$0 = $T($S($E($S(Export, $E(_))), $S(Declare, $E(_)), TypeLexicalDeclaration), function(value) {
12752
12833
  return { "ts": true, "children": value };
12753
12834
  });
12754
- var TypeDeclaration$1 = $T($S($E($S(Export, $E(_))), $E($S(Declare, $E(_))), TypeDeclarationRest), function(value) {
12755
- return { "ts": true, "children": value };
12835
+ var TypeDeclaration$1 = $TS($S($E($S(Export, $E(_))), $E($S(Declare, $E(_))), TypeDeclarationRest), function($skip, $loc, $0, $1, $2, $3) {
12836
+ var export_ = $1;
12837
+ var declare = $2;
12838
+ var t = $3;
12839
+ return {
12840
+ ...t,
12841
+ ts: true,
12842
+ export: export_,
12843
+ declare,
12844
+ children: [export_, declare, ...t.children]
12845
+ };
12756
12846
  });
12757
12847
  var TypeDeclaration$$ = [TypeDeclaration$0, TypeDeclaration$1];
12758
12848
  function TypeDeclaration(ctx, state) {
12759
12849
  return $EVENT_C(ctx, state, "TypeDeclaration", TypeDeclaration$$);
12760
12850
  }
12761
- var TypeDeclarationRest$0 = $S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters), OptionalEquals, $C($S($E(_), Type), $S(__, Type)));
12762
- var TypeDeclarationRest$1 = $S(Interface, $E(_), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
12763
- var TypeDeclarationRest$2 = $S(Namespace, $E(_), IdentifierName, ModuleBlock);
12851
+ var TypeDeclarationRest$0 = TypeAliasDeclaration;
12852
+ var TypeDeclarationRest$1 = InterfaceDeclaration;
12853
+ var TypeDeclarationRest$2 = NamespaceDeclaration;
12764
12854
  var TypeDeclarationRest$3 = FunctionSignature;
12765
12855
  var TypeDeclarationRest$$ = [TypeDeclarationRest$0, TypeDeclarationRest$1, TypeDeclarationRest$2, TypeDeclarationRest$3];
12766
12856
  function TypeDeclarationRest(ctx, state) {
12767
12857
  return $EVENT_C(ctx, state, "TypeDeclarationRest", TypeDeclarationRest$$);
12768
12858
  }
12859
+ var TypeAliasDeclaration$0 = $TS($S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters), OptionalEquals, $C($S($E(_), Type), $S(__, Type))), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12860
+ var id = $3;
12861
+ return {
12862
+ type: "TypeDeclaration",
12863
+ id,
12864
+ children: $0,
12865
+ ts: true
12866
+ };
12867
+ });
12868
+ function TypeAliasDeclaration(ctx, state) {
12869
+ return $EVENT(ctx, state, "TypeAliasDeclaration", TypeAliasDeclaration$0);
12870
+ }
12871
+ var InterfaceDeclaration$0 = $TS($S(Interface, $E(_), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12872
+ var id = $3;
12873
+ return {
12874
+ type: "InterfaceDeclaration",
12875
+ id,
12876
+ children: $0,
12877
+ ts: true
12878
+ };
12879
+ });
12880
+ function InterfaceDeclaration(ctx, state) {
12881
+ return $EVENT(ctx, state, "InterfaceDeclaration", InterfaceDeclaration$0);
12882
+ }
12883
+ var NamespaceDeclaration$0 = $TS($S(Namespace, $E(_), IdentifierName, ModuleBlock), function($skip, $loc, $0, $1, $2, $3, $4) {
12884
+ var id = $3;
12885
+ return {
12886
+ type: "NamespaceDeclaration",
12887
+ id,
12888
+ children: $0,
12889
+ ts: true
12890
+ };
12891
+ });
12892
+ function NamespaceDeclaration(ctx, state) {
12893
+ return $EVENT(ctx, state, "NamespaceDeclaration", NamespaceDeclaration$0);
12894
+ }
12769
12895
  var OptionalEquals$0 = $S(__, Equals);
12770
12896
  var OptionalEquals$1 = $T($S($Y(IndentedFurther), InsertSpaceEquals), function(value) {
12771
12897
  return value[1];
@@ -12796,37 +12922,37 @@ ${input.slice(result.pos)}
12796
12922
  function InterfaceExtendsTarget(ctx, state) {
12797
12923
  return $EVENT(ctx, state, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
12798
12924
  }
12799
- var TypeKeyword$0 = $TS($S($EXPECT($L204, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12925
+ var TypeKeyword$0 = $TS($S($EXPECT($L205, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12800
12926
  return { $loc, token: $1 };
12801
12927
  });
12802
12928
  function TypeKeyword(ctx, state) {
12803
12929
  return $EVENT(ctx, state, "TypeKeyword", TypeKeyword$0);
12804
12930
  }
12805
- var Enum$0 = $TS($S($EXPECT($L205, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12931
+ var Enum$0 = $TS($S($EXPECT($L206, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12806
12932
  return { $loc, token: $1 };
12807
12933
  });
12808
12934
  function Enum(ctx, state) {
12809
12935
  return $EVENT(ctx, state, "Enum", Enum$0);
12810
12936
  }
12811
- var Interface$0 = $TS($S($EXPECT($L206, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12937
+ var Interface$0 = $TS($S($EXPECT($L207, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12812
12938
  return { $loc, token: $1 };
12813
12939
  });
12814
12940
  function Interface(ctx, state) {
12815
12941
  return $EVENT(ctx, state, "Interface", Interface$0);
12816
12942
  }
12817
- var Global$0 = $TS($S($EXPECT($L207, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12943
+ var Global$0 = $TS($S($EXPECT($L208, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12818
12944
  return { $loc, token: $1 };
12819
12945
  });
12820
12946
  function Global(ctx, state) {
12821
12947
  return $EVENT(ctx, state, "Global", Global$0);
12822
12948
  }
12823
- var Module$0 = $TS($S($EXPECT($L208, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12949
+ var Module$0 = $TS($S($EXPECT($L209, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12824
12950
  return { $loc, token: $1 };
12825
12951
  });
12826
12952
  function Module(ctx, state) {
12827
12953
  return $EVENT(ctx, state, "Module", Module$0);
12828
12954
  }
12829
- var Namespace$0 = $TS($S($EXPECT($L209, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12955
+ var Namespace$0 = $TS($S($EXPECT($L210, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12830
12956
  return { $loc, token: $1 };
12831
12957
  });
12832
12958
  function Namespace(ctx, state) {
@@ -12928,9 +13054,10 @@ ${input.slice(result.pos)}
12928
13054
  children: $0
12929
13055
  };
12930
13056
  const names = new Set(block.properties.map((p) => p.name.name));
12931
- return [
12932
- ts,
12933
- {
13057
+ return {
13058
+ type: "EnumDeclaration",
13059
+ id,
13060
+ children: [ts, {
12934
13061
  js: true,
12935
13062
  children: [
12936
13063
  ["let ", id, " = {};\n"],
@@ -12972,8 +13099,8 @@ ${input.slice(result.pos)}
12972
13099
  }
12973
13100
  })
12974
13101
  ]
12975
- }
12976
- ];
13102
+ }]
13103
+ };
12977
13104
  });
12978
13105
  function EnumDeclaration(ctx, state) {
12979
13106
  return $EVENT(ctx, state, "EnumDeclaration", EnumDeclaration$0);
@@ -13003,26 +13130,26 @@ ${input.slice(result.pos)}
13003
13130
  function EnumBlock(ctx, state) {
13004
13131
  return $EVENT_C(ctx, state, "EnumBlock", EnumBlock$$);
13005
13132
  }
13006
- var NestedEnumProperties$0 = $TS($S(PushIndent, $Q(NestedEnumProperty), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
13133
+ var NestedEnumProperties$0 = $TS($S(PushIndent, $Q(NestedEnumPropertyLine), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
13007
13134
  var props = $2;
13008
13135
  if (!props.length)
13009
13136
  return $skip;
13010
13137
  return {
13011
- properties: props.map((p) => p.property),
13138
+ properties: props.flat().map((p) => p.property),
13012
13139
  children: $0
13013
13140
  };
13014
13141
  });
13015
13142
  function NestedEnumProperties(ctx, state) {
13016
13143
  return $EVENT(ctx, state, "NestedEnumProperties", NestedEnumProperties$0);
13017
13144
  }
13018
- var NestedEnumProperty$0 = $TS($S(Nested, EnumProperty), function($skip, $loc, $0, $1, $2) {
13019
- return {
13020
- property: $2,
13021
- children: $0
13022
- };
13145
+ var NestedEnumPropertyLine$0 = $TS($S($S(Nested, EnumProperty), $Q($S($E(_), EnumProperty))), function($skip, $loc, $0, $1, $2) {
13146
+ return [$1, ...$2].map((pair) => ({
13147
+ property: pair[1],
13148
+ children: pair
13149
+ }));
13023
13150
  });
13024
- function NestedEnumProperty(ctx, state) {
13025
- return $EVENT(ctx, state, "NestedEnumProperty", NestedEnumProperty$0);
13151
+ function NestedEnumPropertyLine(ctx, state) {
13152
+ return $EVENT(ctx, state, "NestedEnumPropertyLine", NestedEnumPropertyLine$0);
13026
13153
  }
13027
13154
  var EnumProperty$0 = $TS($S(Identifier, $E($S(__, Equals, ExtendedExpression)), ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
13028
13155
  var name = $1;
@@ -13099,7 +13226,7 @@ ${input.slice(result.pos)}
13099
13226
  function ReturnTypeSuffix(ctx, state) {
13100
13227
  return $EVENT(ctx, state, "ReturnTypeSuffix", ReturnTypeSuffix$0);
13101
13228
  }
13102
- var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L210, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
13229
+ var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L211, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
13103
13230
  var asserts = $1;
13104
13231
  var t = $2;
13105
13232
  if (asserts) {
@@ -13120,7 +13247,7 @@ ${input.slice(result.pos)}
13120
13247
  function ReturnType(ctx, state) {
13121
13248
  return $EVENT(ctx, state, "ReturnType", ReturnType$0);
13122
13249
  }
13123
- var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L155, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
13250
+ var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L156, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
13124
13251
  var lhs = $1;
13125
13252
  var rhs = $2;
13126
13253
  if (!rhs)
@@ -13154,7 +13281,7 @@ ${input.slice(result.pos)}
13154
13281
  function TypeBinary(ctx, state) {
13155
13282
  return $EVENT(ctx, state, "TypeBinary", TypeBinary$0);
13156
13283
  }
13157
- var TypeUnary$0 = $TS($S($Q($S(__, TypeUnaryOp, NonIdContinue)), TypePrimary, $Q(TypeUnarySuffix)), function($skip, $loc, $0, $1, $2, $3) {
13284
+ var TypeUnary$0 = $TS($S($Q($S(__, TypeUnaryOp)), TypePrimary, $Q(TypeUnarySuffix)), function($skip, $loc, $0, $1, $2, $3) {
13158
13285
  var prefix = $1;
13159
13286
  var t = $2;
13160
13287
  var suffix = $3;
@@ -13178,10 +13305,9 @@ ${input.slice(result.pos)}
13178
13305
  function TypeUnarySuffix(ctx, state) {
13179
13306
  return $EVENT_C(ctx, state, "TypeUnarySuffix", TypeUnarySuffix$$);
13180
13307
  }
13181
- var TypeUnaryOp$0 = $S($EXPECT($L211, 'TypeUnaryOp "keyof"'), NonIdContinue);
13182
- var TypeUnaryOp$1 = $S($EXPECT($L212, 'TypeUnaryOp "infer"'), NonIdContinue);
13183
- var TypeUnaryOp$2 = $S($EXPECT($L172, 'TypeUnaryOp "readonly"'), NonIdContinue);
13184
- var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1, TypeUnaryOp$2];
13308
+ var TypeUnaryOp$0 = $S($EXPECT($L212, 'TypeUnaryOp "keyof"'), NonIdContinue);
13309
+ var TypeUnaryOp$1 = $S($EXPECT($L173, 'TypeUnaryOp "readonly"'), NonIdContinue);
13310
+ var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
13185
13311
  function TypeUnaryOp(ctx, state) {
13186
13312
  return $EVENT_C(ctx, state, "TypeUnaryOp", TypeUnaryOp$$);
13187
13313
  }
@@ -13216,19 +13342,20 @@ ${input.slice(result.pos)}
13216
13342
  function UnknownAlias(ctx, state) {
13217
13343
  return $EVENT(ctx, state, "UnknownAlias", UnknownAlias$0);
13218
13344
  }
13219
- var TypePrimary$0 = $TS($S($E(_), Typeof, $E(_), ConditionalExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
13345
+ var TypePrimary$0 = $S($E(_), Infer, $E(_), IdentifierName, $E($S(NotDedented, ExtendsToken, Type)));
13346
+ var TypePrimary$1 = $TS($S($E(_), Typeof, $E(_), UnaryExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
13220
13347
  return {
13221
13348
  type: "TypeofType",
13222
13349
  children: $0
13223
13350
  };
13224
13351
  });
13225
- var TypePrimary$1 = $TS($S($E(_), TypeTuple), function($skip, $loc, $0, $1, $2) {
13352
+ var TypePrimary$2 = $TS($S($E(_), TypeTuple), function($skip, $loc, $0, $1, $2) {
13226
13353
  return { ...$2, children: [$1, ...$2.children] };
13227
13354
  });
13228
- var TypePrimary$2 = InterfaceBlock;
13229
- var TypePrimary$3 = $S($E(_), FunctionType);
13230
- var TypePrimary$4 = $S($E(_), InlineInterfaceLiteral);
13231
- var TypePrimary$5 = $TS($S($E(_), ImportType), function($skip, $loc, $0, $1, $2) {
13355
+ var TypePrimary$3 = InterfaceBlock;
13356
+ var TypePrimary$4 = $S($E(_), FunctionType);
13357
+ var TypePrimary$5 = $S($E(_), InlineInterfaceLiteral);
13358
+ var TypePrimary$6 = $TS($S($E(_), ImportType), function($skip, $loc, $0, $1, $2) {
13232
13359
  var t = $2;
13233
13360
  return {
13234
13361
  type: "ImportType",
@@ -13236,7 +13363,7 @@ ${input.slice(result.pos)}
13236
13363
  children: $0
13237
13364
  };
13238
13365
  });
13239
- var TypePrimary$6 = $TS($S($E(_), TypeLiteral), function($skip, $loc, $0, $1, $2) {
13366
+ var TypePrimary$7 = $TS($S($E(_), TypeLiteral), function($skip, $loc, $0, $1, $2) {
13240
13367
  var t = $2;
13241
13368
  return {
13242
13369
  type: "LiteralType",
@@ -13244,7 +13371,7 @@ ${input.slice(result.pos)}
13244
13371
  children: $0
13245
13372
  };
13246
13373
  });
13247
- var TypePrimary$7 = $TS($S($E(_), UnknownAlias), function($skip, $loc, $0, $1, $2) {
13374
+ var TypePrimary$8 = $TS($S($E(_), UnknownAlias), function($skip, $loc, $0, $1, $2) {
13248
13375
  return {
13249
13376
  type: "IdentifierType",
13250
13377
  children: $0,
@@ -13252,7 +13379,7 @@ ${input.slice(result.pos)}
13252
13379
  args: void 0
13253
13380
  };
13254
13381
  });
13255
- var TypePrimary$8 = $TS($S($E(_), IdentifierName, $Q($S(Dot, IdentifierName)), $E(TypeArguments)), function($skip, $loc, $0, $1, $2, $3, $4) {
13382
+ var TypePrimary$9 = $TS($S($E(_), IdentifierName, $Q($S(Dot, IdentifierName)), $E(TypeArguments)), function($skip, $loc, $0, $1, $2, $3, $4) {
13256
13383
  var args = $4;
13257
13384
  return {
13258
13385
  type: "IdentifierType",
@@ -13261,13 +13388,13 @@ ${input.slice(result.pos)}
13261
13388
  args
13262
13389
  };
13263
13390
  });
13264
- var TypePrimary$9 = $TS($S($E(_), OpenParen, $C(Type, $S(EOS, Type)), __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
13391
+ var TypePrimary$10 = $TS($S($E(_), OpenParen, $C(Type, $S(EOS, Type)), __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
13265
13392
  return {
13266
13393
  type: "ParenthesizedType",
13267
13394
  children: $0
13268
13395
  };
13269
13396
  });
13270
- var TypePrimary$$ = [TypePrimary$0, TypePrimary$1, TypePrimary$2, TypePrimary$3, TypePrimary$4, TypePrimary$5, TypePrimary$6, TypePrimary$7, TypePrimary$8, TypePrimary$9];
13397
+ var TypePrimary$$ = [TypePrimary$0, TypePrimary$1, TypePrimary$2, TypePrimary$3, TypePrimary$4, TypePrimary$5, TypePrimary$6, TypePrimary$7, TypePrimary$8, TypePrimary$9, TypePrimary$10];
13271
13398
  function TypePrimary(ctx, state) {
13272
13399
  return $EVENT_C(ctx, state, "TypePrimary", TypePrimary$$);
13273
13400
  }
@@ -13343,11 +13470,7 @@ ${input.slice(result.pos)}
13343
13470
  return [$1, $2, $3, $7, $5, $6, $4];
13344
13471
  return $0;
13345
13472
  });
13346
- var TypeConditional$2 = $TS($S(TypeBinary, $E($S($E(IndentedFurther), ExtendsToken, Type))), function($skip, $loc, $0, $1, $2) {
13347
- if (!$2)
13348
- return $1;
13349
- return $0;
13350
- });
13473
+ var TypeConditional$2 = TypeBinary;
13351
13474
  var TypeConditional$$ = [TypeConditional$0, TypeConditional$1, TypeConditional$2];
13352
13475
  function TypeConditional(ctx, state) {
13353
13476
  return $EVENT_C(ctx, state, "TypeConditional", TypeConditional$$);
@@ -13419,7 +13542,7 @@ ${input.slice(result.pos)}
13419
13542
  }
13420
13543
  var TypeLiteral$0 = TypeTemplateLiteral;
13421
13544
  var TypeLiteral$1 = Literal;
13422
- var TypeLiteral$2 = $TS($S($EXPECT($L194, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13545
+ var TypeLiteral$2 = $TS($S($EXPECT($L195, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13423
13546
  return { type: "VoidType", $loc, token: $1 };
13424
13547
  });
13425
13548
  var TypeLiteral$3 = $TV($EXPECT($L214, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
@@ -13505,7 +13628,7 @@ ${input.slice(result.pos)}
13505
13628
  function TypeParameters(ctx, state) {
13506
13629
  return $EVENT(ctx, state, "TypeParameters", TypeParameters$0);
13507
13630
  }
13508
- var TypeParameter$0 = $S(__, $E($S($EXPECT($L154, 'TypeParameter "const"'), $E(_))), Identifier, $E(TypeConstraint), $E(TypeInitializer), TypeParameterDelimiter);
13631
+ var TypeParameter$0 = $S(__, $E($S($EXPECT($L155, 'TypeParameter "const"'), $E(_))), Identifier, $E(TypeConstraint), $E(TypeInitializer), TypeParameterDelimiter);
13509
13632
  function TypeParameter(ctx, state) {
13510
13633
  return $EVENT(ctx, state, "TypeParameter", TypeParameter$0);
13511
13634
  }
@@ -14317,6 +14440,7 @@ ${input.slice(result.pos)}
14317
14440
  exports.ArrowFunction = ArrowFunction;
14318
14441
  exports.FatArrow = FatArrow;
14319
14442
  exports.TrailingDeclaration = TrailingDeclaration;
14443
+ exports.TrailingPipe = TrailingPipe;
14320
14444
  exports.FatArrowBody = FatArrowBody;
14321
14445
  exports.ConditionalExpression = ConditionalExpression;
14322
14446
  exports.TernaryRest = TernaryRest;
@@ -14750,6 +14874,7 @@ ${input.slice(result.pos)}
14750
14874
  exports.If = If;
14751
14875
  exports.Import = Import;
14752
14876
  exports.In = In;
14877
+ exports.Infer = Infer;
14753
14878
  exports.LetOrConst = LetOrConst;
14754
14879
  exports.Const = Const;
14755
14880
  exports.Is = Is;
@@ -14848,6 +14973,9 @@ ${input.slice(result.pos)}
14848
14973
  exports.UsingJSModeError = UsingJSModeError;
14849
14974
  exports.TypeDeclaration = TypeDeclaration;
14850
14975
  exports.TypeDeclarationRest = TypeDeclarationRest;
14976
+ exports.TypeAliasDeclaration = TypeAliasDeclaration;
14977
+ exports.InterfaceDeclaration = InterfaceDeclaration;
14978
+ exports.NamespaceDeclaration = NamespaceDeclaration;
14851
14979
  exports.OptionalEquals = OptionalEquals;
14852
14980
  exports.TypeLexicalDeclaration = TypeLexicalDeclaration;
14853
14981
  exports.TypeDeclarationBinding = TypeDeclarationBinding;
@@ -14875,7 +15003,7 @@ ${input.slice(result.pos)}
14875
15003
  exports.EnumDeclaration = EnumDeclaration;
14876
15004
  exports.EnumBlock = EnumBlock;
14877
15005
  exports.NestedEnumProperties = NestedEnumProperties;
14878
- exports.NestedEnumProperty = NestedEnumProperty;
15006
+ exports.NestedEnumPropertyLine = NestedEnumPropertyLine;
14879
15007
  exports.EnumProperty = EnumProperty;
14880
15008
  exports.TypeProperty = TypeProperty;
14881
15009
  exports.TypeIndexSignature = TypeIndexSignature;