@putout/babel 3.0.0 → 3.1.0

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/bundle/index.js CHANGED
@@ -507,9 +507,9 @@ var require_picocolors = __commonJS({
507
507
  module2.exports.createColors = createColors2;
508
508
  }
509
509
  });
510
- // node_modules/js-tokens/index.js
510
+ // node_modules/@babel/code-frame/node_modules/js-tokens/index.js
511
511
  var require_js_tokens = __commonJS({
512
- "node_modules/js-tokens/index.js": function(exports2, module2) {
512
+ "node_modules/@babel/code-frame/node_modules/js-tokens/index.js": function(exports2, module2) {
513
513
  var Identifier2;
514
514
  var JSXIdentifier2;
515
515
  var JSXPunctuator;
@@ -2104,12 +2104,12 @@ var require_browser = __commonJS({
2104
2104
  var require_has_flag = __commonJS({
2105
2105
  "node_modules/has-flag/index.js": function(exports2, module2) {
2106
2106
  "use strict";
2107
- module2.exports = function(flag, argv) {
2108
- argv = argv || process.argv;
2107
+ module2.exports = function(flag) {
2108
+ var argv = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.argv;
2109
2109
  var prefix2 = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
2110
- var pos = argv.indexOf(prefix2 + flag);
2111
- var terminatorPos = argv.indexOf("--");
2112
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
2110
+ var position = argv.indexOf(prefix2 + flag);
2111
+ var terminatorPosition = argv.indexOf("--");
2112
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
2113
2113
  };
2114
2114
  }
2115
2115
  });
@@ -2118,16 +2118,23 @@ var require_supports_color = __commonJS({
2118
2118
  "node_modules/supports-color/index.js": function(exports2, module2) {
2119
2119
  "use strict";
2120
2120
  var os = require("os");
2121
+ var tty = require("tty");
2121
2122
  var hasFlag = require_has_flag();
2122
2123
  var env = process.env;
2123
2124
  var forceColor;
2124
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
2125
- forceColor = false;
2125
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
2126
+ forceColor = 0;
2126
2127
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
2127
- forceColor = true;
2128
+ forceColor = 1;
2128
2129
  }
2129
2130
  if ("FORCE_COLOR" in env) {
2130
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
2131
+ if (env.FORCE_COLOR === "true") {
2132
+ forceColor = 1;
2133
+ } else if (env.FORCE_COLOR === "false") {
2134
+ forceColor = 0;
2135
+ } else {
2136
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
2137
+ }
2131
2138
  }
2132
2139
  function translateLevel(level) {
2133
2140
  if (level === 0) {
@@ -2140,8 +2147,8 @@ var require_supports_color = __commonJS({
2140
2147
  has16m: level >= 3
2141
2148
  };
2142
2149
  }
2143
- function supportsColor(stream) {
2144
- if (forceColor === false) {
2150
+ function supportsColor(haveStream, streamIsTTY) {
2151
+ if (forceColor === 0) {
2145
2152
  return 0;
2146
2153
  }
2147
2154
  if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
@@ -2150,13 +2157,16 @@ var require_supports_color = __commonJS({
2150
2157
  if (hasFlag("color=256")) {
2151
2158
  return 2;
2152
2159
  }
2153
- if (stream && !stream.isTTY && forceColor !== true) {
2160
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
2154
2161
  return 0;
2155
2162
  }
2156
- var min = forceColor ? 1 : 0;
2163
+ var min = forceColor || 0;
2164
+ if (env.TERM === "dumb") {
2165
+ return min;
2166
+ }
2157
2167
  if (process.platform === "win32") {
2158
2168
  var osRelease = os.release().split(".");
2159
- if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
2169
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
2160
2170
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
2161
2171
  }
2162
2172
  return 1;
@@ -2166,7 +2176,9 @@ var require_supports_color = __commonJS({
2166
2176
  "TRAVIS",
2167
2177
  "CIRCLECI",
2168
2178
  "APPVEYOR",
2169
- "GITLAB_CI"
2179
+ "GITLAB_CI",
2180
+ "GITHUB_ACTIONS",
2181
+ "BUILDKITE"
2170
2182
  ].some(function(sign) {
2171
2183
  return sign in env;
2172
2184
  }) || env.CI_NAME === "codeship") {
@@ -2198,19 +2210,16 @@ var require_supports_color = __commonJS({
2198
2210
  if ("COLORTERM" in env) {
2199
2211
  return 1;
2200
2212
  }
2201
- if (env.TERM === "dumb") {
2202
- return min;
2203
- }
2204
2213
  return min;
2205
2214
  }
2206
2215
  function getSupportLevel(stream) {
2207
- var level = supportsColor(stream);
2216
+ var level = supportsColor(stream, stream && stream.isTTY);
2208
2217
  return translateLevel(level);
2209
2218
  }
2210
2219
  module2.exports = {
2211
2220
  supportsColor: getSupportLevel,
2212
- stdout: getSupportLevel(process.stdout),
2213
- stderr: getSupportLevel(process.stderr)
2221
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
2222
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
2214
2223
  };
2215
2224
  }
2216
2225
  });
@@ -5075,6 +5084,7 @@ var require_globals = __commonJS({
5075
5084
  assertType: false,
5076
5085
  beforeAll: false,
5077
5086
  beforeEach: false,
5087
+ chai: false,
5078
5088
  describe: false,
5079
5089
  expect: false,
5080
5090
  expectTypeOf: false,
@@ -6298,6 +6308,9 @@ __export(lib_exports, {
6298
6308
  TSTYPE_TYPES: function() {
6299
6309
  return TSTYPE_TYPES;
6300
6310
  },
6311
+ TSTemplateLiteralType: function() {
6312
+ return tsTemplateLiteralType;
6313
+ },
6301
6314
  TSThisType: function() {
6302
6315
  return tsThisType;
6303
6316
  },
@@ -7246,6 +7259,9 @@ __export(lib_exports, {
7246
7259
  assertTSSymbolKeyword: function() {
7247
7260
  return assertTSSymbolKeyword;
7248
7261
  },
7262
+ assertTSTemplateLiteralType: function() {
7263
+ return assertTSTemplateLiteralType;
7264
+ },
7249
7265
  assertTSThisType: function() {
7250
7266
  return assertTSThisType;
7251
7267
  },
@@ -8506,6 +8522,9 @@ __export(lib_exports, {
8506
8522
  isTSSymbolKeyword: function() {
8507
8523
  return isTSSymbolKeyword;
8508
8524
  },
8525
+ isTSTemplateLiteralType: function() {
8526
+ return isTSTemplateLiteralType;
8527
+ },
8509
8528
  isTSThisType: function() {
8510
8529
  return isTSThisType;
8511
8530
  },
@@ -9103,6 +9122,9 @@ __export(lib_exports, {
9103
9122
  tsSymbolKeyword: function() {
9104
9123
  return tsSymbolKeyword;
9105
9124
  },
9125
+ tsTemplateLiteralType: function() {
9126
+ return tsTemplateLiteralType;
9127
+ },
9106
9128
  tsThisType: function() {
9107
9129
  return tsThisType;
9108
9130
  },
@@ -11745,6 +11767,11 @@ function isTSMappedType(node, opts) {
11745
11767
  if (node.type !== "TSMappedType") return false;
11746
11768
  return opts == null || shallowEqual(node, opts);
11747
11769
  }
11770
+ function isTSTemplateLiteralType(node, opts) {
11771
+ if (!node) return false;
11772
+ if (node.type !== "TSTemplateLiteralType") return false;
11773
+ return opts == null || shallowEqual(node, opts);
11774
+ }
11748
11775
  function isTSLiteralType(node, opts) {
11749
11776
  if (!node) return false;
11750
11777
  if (node.type !== "TSLiteralType") return false;
@@ -12376,6 +12403,7 @@ function isDeclaration(node, opts) {
12376
12403
  case "TSTypeAliasDeclaration":
12377
12404
  case "TSEnumDeclaration":
12378
12405
  case "TSModuleDeclaration":
12406
+ case "TSImportEqualsDeclaration":
12379
12407
  break;
12380
12408
  case "Placeholder":
12381
12409
  if (node.expectedNode === "Declaration") break;
@@ -12444,6 +12472,7 @@ function isTSEntityName(node, opts) {
12444
12472
  if (!node) return false;
12445
12473
  switch(node.type){
12446
12474
  case "Identifier":
12475
+ case "ThisExpression":
12447
12476
  case "TSQualifiedName":
12448
12477
  break;
12449
12478
  case "Placeholder":
@@ -12888,6 +12917,7 @@ function isTypeScript(node, opts) {
12888
12917
  case "TSTypeOperator":
12889
12918
  case "TSIndexedAccessType":
12890
12919
  case "TSMappedType":
12920
+ case "TSTemplateLiteralType":
12891
12921
  case "TSLiteralType":
12892
12922
  case "TSClassImplements":
12893
12923
  case "TSInterfaceHeritage":
@@ -12968,6 +12998,7 @@ function isTSType(node, opts) {
12968
12998
  case "TSTypeOperator":
12969
12999
  case "TSIndexedAccessType":
12970
13000
  case "TSMappedType":
13001
+ case "TSTemplateLiteralType":
12971
13002
  case "TSLiteralType":
12972
13003
  case "TSClassImplements":
12973
13004
  case "TSInterfaceHeritage":
@@ -12995,6 +13026,7 @@ function isTSBaseType(node, opts) {
12995
13026
  case "TSUnknownKeyword":
12996
13027
  case "TSVoidKeyword":
12997
13028
  case "TSThisType":
13029
+ case "TSTemplateLiteralType":
12998
13030
  case "TSLiteralType":
12999
13031
  break;
13000
13032
  default:
@@ -14747,7 +14779,8 @@ defineType$4("SwitchStatement", {
14747
14779
  });
14748
14780
  defineType$4("ThisExpression", {
14749
14781
  aliases: [
14750
- "Expression"
14782
+ "Expression",
14783
+ "TSEntityName"
14751
14784
  ]
14752
14785
  });
14753
14786
  defineType$4("ThrowStatement", {
@@ -15978,6 +16011,10 @@ defineType$4("ClassPrivateProperty", {
15978
16011
  validate: assertValueType("boolean"),
15979
16012
  optional: true
15980
16013
  },
16014
+ optional: {
16015
+ validate: assertValueType("boolean"),
16016
+ optional: true
16017
+ },
15981
16018
  definite: {
15982
16019
  validate: assertValueType("boolean"),
15983
16020
  optional: true
@@ -17431,6 +17468,7 @@ defineType("TSPropertySignature", {
17431
17468
  readonly: validateOptional(bool),
17432
17469
  typeAnnotation: validateOptionalType("TSTypeAnnotation"),
17433
17470
  kind: {
17471
+ optional: true,
17434
17472
  validate: assertOneOf("get", "set")
17435
17473
  }
17436
17474
  })
@@ -17754,6 +17792,26 @@ defineType("TSMappedType", {
17754
17792
  nameType: validateOptionalType("TSType")
17755
17793
  })
17756
17794
  });
17795
+ defineType("TSTemplateLiteralType", {
17796
+ aliases: [
17797
+ "TSType",
17798
+ "TSBaseType"
17799
+ ],
17800
+ visitor: [
17801
+ "quasis",
17802
+ "types"
17803
+ ],
17804
+ fields: {
17805
+ quasis: validateArrayOfType("TemplateElement"),
17806
+ types: {
17807
+ validate: chain(assertValueType("array"), assertEach(assertNodeType("TSType")), function(node, key, val) {
17808
+ if (node.quasis.length !== val.length + 1) {
17809
+ throw new TypeError("Number of ".concat(node.type, " quasis should be exactly one more than the number of types.\nExpected ").concat(val.length + 1, " quasis but got ").concat(node.quasis.length));
17810
+ }
17811
+ })
17812
+ }
17813
+ }
17814
+ });
17757
17815
  defineType("TSLiteralType", {
17758
17816
  aliases: [
17759
17817
  "TSType",
@@ -17998,21 +18056,21 @@ defineType("TSImportType", {
17998
18056
  });
17999
18057
  defineType("TSImportEqualsDeclaration", {
18000
18058
  aliases: [
18001
- "Statement"
18059
+ "Statement",
18060
+ "Declaration"
18002
18061
  ],
18003
18062
  visitor: [
18004
18063
  "id",
18005
18064
  "moduleReference"
18006
18065
  ],
18007
- fields: {
18008
- isExport: validate$2(bool),
18066
+ fields: Object.assign({}, {}, {
18009
18067
  id: validateType("Identifier"),
18010
18068
  moduleReference: validateType("TSEntityName", "TSExternalModuleReference"),
18011
18069
  importKind: {
18012
18070
  validate: assertOneOf("type", "value"),
18013
18071
  optional: true
18014
18072
  }
18015
- }
18073
+ })
18016
18074
  });
18017
18075
  defineType("TSExternalModuleReference", {
18018
18076
  visitor: [
@@ -20235,8 +20293,7 @@ function tsPropertySignature(key) {
20235
20293
  var node = {
20236
20294
  type: "TSPropertySignature",
20237
20295
  key: key,
20238
- typeAnnotation: typeAnnotation2,
20239
- kind: null
20296
+ typeAnnotation: typeAnnotation2
20240
20297
  };
20241
20298
  var defs = NODE_FIELDS.TSPropertySignature;
20242
20299
  validate(defs.key, node, "key", key, 1);
@@ -20555,6 +20612,17 @@ function tsMappedType(key, constraint) {
20555
20612
  validate(defs.typeAnnotation, node, "typeAnnotation", typeAnnotation2, 1);
20556
20613
  return node;
20557
20614
  }
20615
+ function tsTemplateLiteralType(quasis, types2) {
20616
+ var node = {
20617
+ type: "TSTemplateLiteralType",
20618
+ quasis: quasis,
20619
+ types: types2
20620
+ };
20621
+ var defs = NODE_FIELDS.TSTemplateLiteralType;
20622
+ validate(defs.quasis, node, "quasis", quasis, 1);
20623
+ validate(defs.types, node, "types", types2, 1);
20624
+ return node;
20625
+ }
20558
20626
  function tsLiteralType(literal) {
20559
20627
  var node = {
20560
20628
  type: "TSLiteralType",
@@ -20743,8 +20811,7 @@ function tsImportEqualsDeclaration(id, moduleReference) {
20743
20811
  var node = {
20744
20812
  type: "TSImportEqualsDeclaration",
20745
20813
  id: id,
20746
- moduleReference: moduleReference,
20747
- isExport: null
20814
+ moduleReference: moduleReference
20748
20815
  };
20749
20816
  var defs = NODE_FIELDS.TSImportEqualsDeclaration;
20750
20817
  validate(defs.id, node, "id", id, 1);
@@ -21579,6 +21646,9 @@ function assertTSIndexedAccessType(node, opts) {
21579
21646
  function assertTSMappedType(node, opts) {
21580
21647
  assert("TSMappedType", node, opts);
21581
21648
  }
21649
+ function assertTSTemplateLiteralType(node, opts) {
21650
+ assert("TSTemplateLiteralType", node, opts);
21651
+ }
21582
21652
  function assertTSLiteralType(node, opts) {
21583
21653
  assert("TSLiteralType", node, opts);
21584
21654
  }
@@ -21945,7 +22015,7 @@ function createFlowUnionType(types2) {
21945
22015
  }
21946
22016
  }
21947
22017
  function getQualifiedName(node) {
21948
- return isIdentifier(node) ? node.name : "".concat(node.right.name, ".").concat(getQualifiedName(node.left));
22018
+ return isIdentifier(node) ? node.name : isThisExpression(node) ? "this" : "".concat(node.right.name, ".").concat(getQualifiedName(node.left));
21949
22019
  }
21950
22020
  function removeTypeDuplicates(nodesIn) {
21951
22021
  var nodes2 = Array.from(nodesIn);
@@ -22856,6 +22926,9 @@ var keys = {
22856
22926
  ImportDeclaration: [
22857
22927
  "specifiers"
22858
22928
  ],
22929
+ TSImportEqualsDeclaration: [
22930
+ "id"
22931
+ ],
22859
22932
  ExportSpecifier: [
22860
22933
  "exported"
22861
22934
  ],
@@ -23636,9 +23709,9 @@ var UnparenthesizedPipeBodyDescriptions = /* @__PURE__ */ new Set([
23636
23709
  "ConditionalExpression",
23637
23710
  "YieldExpression"
23638
23711
  ]);
23639
- var PipelineOperatorErrors = {
23712
+ var PipelineOperatorErrors = Object.assign({
23640
23713
  PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",
23641
- PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',
23714
+ PipeTopicRequiresHackPipes: 'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',
23642
23715
  PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
23643
23716
  PipeTopicUnconfiguredToken: function(param) {
23644
23717
  var token = param.token;
@@ -23650,14 +23723,8 @@ var PipelineOperatorErrors = {
23650
23723
  return "Hack-style pipe body cannot be an unparenthesized ".concat(toNodeDescription({
23651
23724
  type: type
23652
23725
  }), "; please wrap it in parentheses.");
23653
- },
23654
- PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
23655
- PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
23656
- PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
23657
- PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
23658
- PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
23659
- PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'
23660
- };
23726
+ }
23727
+ }, {});
23661
23728
  var _excluded = [
23662
23729
  "message"
23663
23730
  ];
@@ -24039,17 +24106,18 @@ var estree = function(superClass) {
24039
24106
  if (typeParameters) {
24040
24107
  delete node.typeParameters;
24041
24108
  funcNode.typeParameters = typeParameters;
24042
- funcNode.start = typeParameters.start;
24043
- funcNode.loc.start = typeParameters.loc.start;
24109
+ this.resetStartLocationFromNode(funcNode, typeParameters);
24044
24110
  }
24045
24111
  if (type === "ClassPrivateMethod") {
24046
24112
  node.computed = false;
24047
24113
  }
24048
- if (node.abstract && this.hasPlugin("typescript")) {
24114
+ if (this.hasPlugin("typescript")) {
24049
24115
  if (!funcNode.body) {
24050
24116
  funcNode.type = "TSEmptyBodyFunctionExpression";
24051
24117
  }
24052
- return this.finishNode(node, "TSAbstractMethodDefinition");
24118
+ if (node.abstract) {
24119
+ return this.finishNode(node, "TSAbstractMethodDefinition");
24120
+ }
24053
24121
  }
24054
24122
  return this.finishNode(node, "MethodDefinition");
24055
24123
  }
@@ -33758,7 +33826,7 @@ var typescript = function(superClass) {
33758
33826
  }
33759
33827
  this.expect(11);
33760
33828
  if (this.eat(16)) {
33761
- node.qualifier = this.tsParseEntityName();
33829
+ node.qualifier = this.tsParseEntityName(1 | 2);
33762
33830
  }
33763
33831
  if (this.match(47)) {
33764
33832
  {
@@ -33770,14 +33838,24 @@ var typescript = function(superClass) {
33770
33838
  },
33771
33839
  {
33772
33840
  key: "tsParseEntityName",
33773
- value: function tsParseEntityName() {
33774
- var allowReservedWords = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
33775
- var entity = this.parseIdentifier(allowReservedWords);
33841
+ value: function tsParseEntityName(flags) {
33842
+ var entity;
33843
+ if (flags & 1 && this.match(78)) {
33844
+ if (flags & 2) {
33845
+ entity = this.parseIdentifier(true);
33846
+ } else {
33847
+ var node = this.startNode();
33848
+ this.next();
33849
+ entity = this.finishNode(node, "ThisExpression");
33850
+ }
33851
+ } else {
33852
+ entity = this.parseIdentifier(!!(flags & 1));
33853
+ }
33776
33854
  while(this.eat(16)){
33777
- var node = this.startNodeAtNode(entity);
33778
- node.left = entity;
33779
- node.right = this.parseIdentifier(allowReservedWords);
33780
- entity = this.finishNode(node, "TSQualifiedName");
33855
+ var node1 = this.startNodeAtNode(entity);
33856
+ node1.left = entity;
33857
+ node1.right = this.parseIdentifier(!!(flags & 1));
33858
+ entity = this.finishNode(node1, "TSQualifiedName");
33781
33859
  }
33782
33860
  return entity;
33783
33861
  }
@@ -33786,7 +33864,7 @@ var typescript = function(superClass) {
33786
33864
  key: "tsParseTypeReference",
33787
33865
  value: function tsParseTypeReference() {
33788
33866
  var node = this.startNode();
33789
- node.typeName = this.tsParseEntityName();
33867
+ node.typeName = this.tsParseEntityName(1);
33790
33868
  if (!this.hasPrecedingLineBreak() && this.match(47)) {
33791
33869
  {
33792
33870
  node.typeArguments = this.tsParseTypeArguments();
@@ -33822,7 +33900,9 @@ var typescript = function(superClass) {
33822
33900
  if (this.match(83)) {
33823
33901
  node.exprName = this.tsParseImportType();
33824
33902
  } else {
33825
- node.exprName = this.tsParseEntityName();
33903
+ {
33904
+ node.exprName = this.tsParseEntityName(1);
33905
+ }
33826
33906
  }
33827
33907
  if (!this.hasPrecedingLineBreak() && this.match(47)) {
33828
33908
  {
@@ -34157,8 +34237,9 @@ var typescript = function(superClass) {
34157
34237
  {
34158
34238
  key: "tsParseTupleElementType",
34159
34239
  value: function tsParseTupleElementType() {
34160
- var startLoc = this.state.startLoc;
34240
+ var restStartLoc = this.state.startLoc;
34161
34241
  var rest = this.eat(21);
34242
+ var startLoc = this.state.startLoc;
34162
34243
  var labeled;
34163
34244
  var label;
34164
34245
  var optional;
@@ -34173,12 +34254,11 @@ var typescript = function(superClass) {
34173
34254
  type = this.tsParseType();
34174
34255
  } else if (chAfterWord === 63) {
34175
34256
  optional = true;
34176
- var startLoc2 = this.state.startLoc;
34177
34257
  var wordName = this.state.value;
34178
34258
  var typeOrLabel = this.tsParseNonArrayType();
34179
34259
  if (this.lookaheadCharCode() === 58) {
34180
34260
  labeled = true;
34181
- label = this.createIdentifier(this.startNodeAt(startLoc2), wordName);
34261
+ label = this.createIdentifier(this.startNodeAt(startLoc), wordName);
34182
34262
  this.expect(17);
34183
34263
  this.expect(14);
34184
34264
  type = this.tsParseType();
@@ -34195,7 +34275,7 @@ var typescript = function(superClass) {
34195
34275
  if (labeled) {
34196
34276
  var labeledNode;
34197
34277
  if (label) {
34198
- labeledNode = this.startNodeAtNode(label);
34278
+ labeledNode = this.startNodeAt(startLoc);
34199
34279
  labeledNode.optional = optional;
34200
34280
  labeledNode.label = label;
34201
34281
  labeledNode.elementType = type;
@@ -34204,7 +34284,7 @@ var typescript = function(superClass) {
34204
34284
  this.raise(TSErrors.TupleOptionalAfterType, this.state.lastTokStartLoc);
34205
34285
  }
34206
34286
  } else {
34207
- labeledNode = this.startNodeAtNode(type);
34287
+ labeledNode = this.startNodeAt(startLoc);
34208
34288
  labeledNode.optional = optional;
34209
34289
  this.raise(TSErrors.InvalidTupleMemberLabel, type);
34210
34290
  labeledNode.label = type;
@@ -34212,12 +34292,12 @@ var typescript = function(superClass) {
34212
34292
  }
34213
34293
  type = this.finishNode(labeledNode, "TSNamedTupleMember");
34214
34294
  } else if (optional) {
34215
- var optionalTypeNode = this.startNodeAtNode(type);
34295
+ var optionalTypeNode = this.startNodeAt(startLoc);
34216
34296
  optionalTypeNode.typeAnnotation = type;
34217
34297
  type = this.finishNode(optionalTypeNode, "TSOptionalType");
34218
34298
  }
34219
34299
  if (rest) {
34220
- var restNode = this.startNodeAt(startLoc);
34300
+ var restNode = this.startNodeAt(restStartLoc);
34221
34301
  restNode.typeAnnotation = type;
34222
34302
  type = this.finishNode(restNode, "TSRestType");
34223
34303
  }
@@ -34271,9 +34351,32 @@ var typescript = function(superClass) {
34271
34351
  {
34272
34352
  key: "tsParseTemplateLiteralType",
34273
34353
  value: function tsParseTemplateLiteralType() {
34274
- var node = this.startNode();
34275
- node.literal = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseTemplate", this).call(this, false);
34276
- return this.finishNode(node, "TSLiteralType");
34354
+ {
34355
+ var startLoc = this.state.startLoc;
34356
+ var curElt = this.parseTemplateElement(false);
34357
+ var quasis = [
34358
+ curElt
34359
+ ];
34360
+ if (curElt.tail) {
34361
+ var node = this.startNodeAt(startLoc);
34362
+ var literal = this.startNodeAt(startLoc);
34363
+ literal.expressions = [];
34364
+ literal.quasis = quasis;
34365
+ node.literal = this.finishNode(literal, "TemplateLiteral");
34366
+ return this.finishNode(node, "TSLiteralType");
34367
+ } else {
34368
+ var substitutions = [];
34369
+ while(!curElt.tail){
34370
+ substitutions.push(this.tsParseType());
34371
+ this.readTemplateContinuation();
34372
+ quasis.push(curElt = this.parseTemplateElement(false));
34373
+ }
34374
+ var node1 = this.startNodeAt(startLoc);
34375
+ node1.types = substitutions;
34376
+ node1.quasis = quasis;
34377
+ return this.finishNode(node1, "TSTemplateLiteralType");
34378
+ }
34379
+ }
34277
34380
  }
34278
34381
  },
34279
34382
  {
@@ -34361,15 +34464,16 @@ var typescript = function(superClass) {
34361
34464
  {
34362
34465
  key: "tsParseArrayTypeOrHigher",
34363
34466
  value: function tsParseArrayTypeOrHigher() {
34467
+ var startLoc = this.state.startLoc;
34364
34468
  var type = this.tsParseNonArrayType();
34365
34469
  while(!this.hasPrecedingLineBreak() && this.eat(0)){
34366
34470
  if (this.match(3)) {
34367
- var node = this.startNodeAtNode(type);
34471
+ var node = this.startNodeAt(startLoc);
34368
34472
  node.elementType = type;
34369
34473
  this.expect(3);
34370
34474
  type = this.finishNode(node, "TSArrayType");
34371
34475
  } else {
34372
- var node1 = this.startNodeAtNode(type);
34476
+ var node1 = this.startNodeAt(startLoc);
34373
34477
  node1.objectType = type;
34374
34478
  node1.indexType = this.tsParseType();
34375
34479
  this.expect(3);
@@ -34708,8 +34812,8 @@ var typescript = function(superClass) {
34708
34812
  var originalStartLoc = this.state.startLoc;
34709
34813
  var delimitedList = this.tsParseDelimitedList("HeritageClauseElement", function() {
34710
34814
  var node = _this.startNode();
34711
- node.expression = _this.tsParseEntityName();
34712
34815
  {
34816
+ node.expression = _this.tsParseEntityName(1);
34713
34817
  if (_this.match(47)) {
34714
34818
  node.typeArguments = _this.tsParseTypeArguments();
34715
34819
  }
@@ -34901,7 +35005,7 @@ var typescript = function(superClass) {
34901
35005
  key: "tsParseModuleOrNamespaceDeclaration",
34902
35006
  value: function tsParseModuleOrNamespaceDeclaration(node) {
34903
35007
  var nested = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
34904
- node.id = this.tsParseEntityName();
35008
+ node.id = this.tsParseEntityName(1);
34905
35009
  if (node.id.type === "Identifier") {
34906
35010
  this.checkIdentifier(node.id, 1024);
34907
35011
  }
@@ -34942,7 +35046,6 @@ var typescript = function(superClass) {
34942
35046
  {
34943
35047
  key: "tsParseImportEqualsDeclaration",
34944
35048
  value: function tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) {
34945
- node.isExport = isExport || false;
34946
35049
  node.id = maybeDefaultIdentifier || this.parseIdentifier();
34947
35050
  this.checkIdentifier(node.id, 4096);
34948
35051
  this.expect(29);
@@ -34964,7 +35067,7 @@ var typescript = function(superClass) {
34964
35067
  {
34965
35068
  key: "tsParseModuleReference",
34966
35069
  value: function tsParseModuleReference() {
34967
- return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
35070
+ return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(0);
34968
35071
  }
34969
35072
  },
34970
35073
  {
@@ -35544,15 +35647,20 @@ var typescript = function(superClass) {
35544
35647
  key: "parseExport",
35545
35648
  value: function parseExport(node, decorators) {
35546
35649
  if (this.match(83)) {
35650
+ var nodeImportEquals = this.startNode();
35547
35651
  this.next();
35548
- var nodeImportEquals = node;
35549
35652
  var maybeDefaultIdentifier = null;
35550
35653
  if (this.isContextual(130) && this.isPotentialImportPhase(false)) {
35551
35654
  maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false);
35552
35655
  } else {
35553
35656
  nodeImportEquals.importKind = "value";
35554
35657
  }
35555
- return this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true);
35658
+ var declaration = this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true);
35659
+ {
35660
+ node.declaration = declaration;
35661
+ node.specifiers = [];
35662
+ return this.finishNode(node, "ExportNamedDeclaration");
35663
+ }
35556
35664
  } else if (this.eat(29)) {
35557
35665
  var assign = node;
35558
35666
  assign.expression = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseExpression", this).call(this);
@@ -35833,7 +35941,7 @@ var typescript = function(superClass) {
35833
35941
  if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) {
35834
35942
  node.exportKind = "type";
35835
35943
  }
35836
- if (isDeclare) {
35944
+ if (isDeclare && declaration.type !== "TSImportEqualsDeclaration") {
35837
35945
  this.resetStartLocation(declaration, startLoc);
35838
35946
  declaration.declare = true;
35839
35947
  }
@@ -36998,11 +37106,6 @@ function validatePlugins(pluginsMap) {
36998
37106
  pluginsMap.get("recordAndTuple")
36999
37107
  ]), "`."));
37000
37108
  }
37001
- } else if (proposal === "smart" && tupleSyntaxIsHash) {
37002
- throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `'.concat(JSON.stringify([
37003
- "recordAndTuple",
37004
- pluginsMap.get("recordAndTuple")
37005
- ]), "`."));
37006
37109
  }
37007
37110
  }
37008
37111
  if (pluginsMap.has("moduleAttributes")) {
@@ -37309,16 +37412,6 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
37309
37412
  prec = tokenOperatorPrecedence(42);
37310
37413
  }
37311
37414
  this.next();
37312
- if (op === 39 && this.hasPlugin([
37313
- "pipelineOperator",
37314
- {
37315
- proposal: "minimal"
37316
- }
37317
- ])) {
37318
- if (this.state.type === 96 && this.prodParam.hasAwait) {
37319
- throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, this.state.startLoc);
37320
- }
37321
- }
37322
37415
  node.right = this.parseExprOpRightExpr(op, prec);
37323
37416
  var finishedNode = this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
37324
37417
  var nextOp = this.state.type;
@@ -37335,7 +37428,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
37335
37428
  key: "parseExprOpRightExpr",
37336
37429
  value: function parseExprOpRightExpr(op, prec) {
37337
37430
  var _this = this;
37338
- var startLoc = this.state.startLoc;
37431
+ this.state.startLoc;
37339
37432
  switch(op){
37340
37433
  case 39:
37341
37434
  switch(this.getPluginOption("pipelineOperator", "proposal")){
@@ -37343,13 +37436,6 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
37343
37436
  return this.withTopicBindingContext(function() {
37344
37437
  return _this.parseHackPipeBody();
37345
37438
  });
37346
- case "smart":
37347
- return this.withTopicBindingContext(function() {
37348
- if (_this.prodParam.hasYield && _this.isContextual(108)) {
37349
- throw _this.raise(Errors.PipeBodyIsTighter, _this.state.startLoc);
37350
- }
37351
- return _this.parseSmartPipelineBodyInStyle(_this.parseExprOpBaseRightExpr(op, prec), startLoc);
37352
- });
37353
37439
  case "fsharp":
37354
37440
  return this.withSoloAwaitPermittingContext(function() {
37355
37441
  return _this.parseFSharpPipelineBody(prec);
@@ -37926,12 +38012,13 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
37926
38012
  key: "finishTopicReference",
37927
38013
  value: function finishTopicReference(node, startLoc, pipeProposal, tokenType) {
37928
38014
  if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) {
37929
- var nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference";
37930
- if (!this.topicReferenceIsAllowedInCurrentContext()) {
37931
- this.raise(pipeProposal === "smart" ? Errors.PrimaryTopicNotAllowed : Errors.PipeTopicUnbound, startLoc);
38015
+ {
38016
+ if (!this.topicReferenceIsAllowedInCurrentContext()) {
38017
+ this.raise(Errors.PipeTopicUnbound, startLoc);
38018
+ }
38019
+ this.registerTopicReference();
38020
+ return this.finishNode(node, "TopicReference");
37932
38021
  }
37933
- this.registerTopicReference();
37934
- return this.finishNode(node, nodeType);
37935
38022
  } else {
37936
38023
  throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, {
37937
38024
  token: tokenLabelName(tokenType)
@@ -39036,23 +39123,7 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
39036
39123
  {
39037
39124
  key: "withSmartMixTopicForbiddingContext",
39038
39125
  value: function withSmartMixTopicForbiddingContext(callback) {
39039
- if (this.hasPlugin([
39040
- "pipelineOperator",
39041
- {
39042
- proposal: "smart"
39043
- }
39044
- ])) {
39045
- var outerContextTopicState = this.state.topicContext;
39046
- this.state.topicContext = {
39047
- maxNumOfResolvableTopics: 0,
39048
- maxTopicIndex: null
39049
- };
39050
- try {
39051
- return callback();
39052
- } finally{
39053
- this.state.topicContext = outerContextTopicState;
39054
- }
39055
- } else {
39126
+ {
39056
39127
  return callback();
39057
39128
  }
39058
39129
  }
@@ -44116,18 +44187,51 @@ function TSAsExpression(node, parent) {
44116
44187
  }
44117
44188
  return Binary(node, parent);
44118
44189
  }
44190
+ function TSConditionalType$1(node, parent) {
44191
+ var parentType = parent.type;
44192
+ if (parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType" || parentType === "TSTypeOperator" || parentType === "TSTypeParameter") {
44193
+ return true;
44194
+ }
44195
+ if ((parentType === "TSIntersectionType" || parentType === "TSUnionType") && parent.types[0] === node) {
44196
+ return true;
44197
+ }
44198
+ if (parentType === "TSConditionalType" && (parent.checkType === node || parent.extendsType === node)) {
44199
+ return true;
44200
+ }
44201
+ return false;
44202
+ }
44119
44203
  function TSUnionType$1(node, parent) {
44120
44204
  var parentType = parent.type;
44121
- return parentType === "TSArrayType" || parentType === "TSOptionalType" || parentType === "TSIntersectionType" || parentType === "TSRestType";
44205
+ return parentType === "TSIntersectionType" || parentType === "TSTypeOperator" || parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType";
44206
+ }
44207
+ function TSIntersectionType$1(node, parent) {
44208
+ var parentType = parent.type;
44209
+ return parentType === "TSTypeOperator" || parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType";
44122
44210
  }
44123
44211
  function TSInferType$1(node, parent) {
44124
44212
  var parentType = parent.type;
44125
- return parentType === "TSArrayType" || parentType === "TSOptionalType";
44213
+ if (parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType") {
44214
+ return true;
44215
+ }
44216
+ if (node.typeParameter.constraint) {
44217
+ if ((parentType === "TSIntersectionType" || parentType === "TSUnionType") && parent.types[0] === node) {
44218
+ return true;
44219
+ }
44220
+ }
44221
+ return false;
44222
+ }
44223
+ function TSTypeOperator$1(node, parent) {
44224
+ var parentType = parent.type;
44225
+ return parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSOptionalType";
44126
44226
  }
44127
44227
  function TSInstantiationExpression$1(node, parent) {
44128
44228
  var parentType = parent.type;
44129
44229
  return (parentType === "CallExpression" || parentType === "OptionalCallExpression" || parentType === "NewExpression" || parentType === "TSInstantiationExpression") && !!parent.typeArguments;
44130
44230
  }
44231
+ function TSFunctionType$1(node, parent) {
44232
+ var parentType = parent.type;
44233
+ return parentType === "TSIntersectionType" || parentType === "TSUnionType" || parentType === "TSTypeOperator" || parentType === "TSOptionalType" || parentType === "TSArrayType" || parentType === "TSIndexedAccessType" && parent.objectType === node || parentType === "TSConditionalType" && (parent.checkType === node || parent.extendsType === node);
44234
+ }
44131
44235
  function BinaryExpression(node, parent, tokenContext, inForStatementInit) {
44132
44236
  return node.operator === "in" && inForStatementInit;
44133
44237
  }
@@ -44243,11 +44347,15 @@ var parens = /* @__PURE__ */ Object.freeze({
44243
44347
  OptionalMemberExpression: OptionalMemberExpression$1,
44244
44348
  SequenceExpression: SequenceExpression$1,
44245
44349
  TSAsExpression: TSAsExpression,
44350
+ TSConditionalType: TSConditionalType$1,
44351
+ TSConstructorType: TSFunctionType$1,
44352
+ TSFunctionType: TSFunctionType$1,
44246
44353
  TSInferType: TSInferType$1,
44247
44354
  TSInstantiationExpression: TSInstantiationExpression$1,
44248
- TSIntersectionType: TSUnionType$1,
44355
+ TSIntersectionType: TSIntersectionType$1,
44249
44356
  TSSatisfiesExpression: TSAsExpression,
44250
44357
  TSTypeAssertion: UnaryLike,
44358
+ TSTypeOperator: TSTypeOperator$1,
44251
44359
  TSUnionType: TSUnionType$1,
44252
44360
  UnaryLike: UnaryLike,
44253
44361
  UnionTypeAnnotation: UnionTypeAnnotation$1,
@@ -44746,19 +44854,21 @@ function TaggedTemplateExpression(node) {
44746
44854
  function TemplateElement() {
44747
44855
  throw new Error("TemplateElement printing is handled in TemplateLiteral");
44748
44856
  }
44749
- function TemplateLiteral(node) {
44857
+ function _printTemplate(node, substitutions) {
44750
44858
  var quasis = node.quasis;
44751
44859
  var partRaw = "`";
44752
- for(var i = 0; i < quasis.length; i++){
44860
+ for(var i = 0; i < quasis.length - 1; i++){
44753
44861
  partRaw += quasis[i].value.raw;
44754
- if (i + 1 < quasis.length) {
44755
- this.token(partRaw + "${", true);
44756
- this.print(node.expressions[i]);
44757
- partRaw = "}";
44758
- }
44862
+ this.token(partRaw + "${", true);
44863
+ this.print(substitutions[i]);
44864
+ partRaw = "}";
44759
44865
  }
44866
+ partRaw += quasis[quasis.length - 1].value.raw;
44760
44867
  this.token(partRaw + "`", true);
44761
44868
  }
44869
+ function TemplateLiteral(node) {
44870
+ this._printTemplate(node, node.expressions);
44871
+ }
44762
44872
  var isCallExpression3 = lib_exports.isCallExpression, isLiteral2 = lib_exports.isLiteral, isMemberExpression2 = lib_exports.isMemberExpression, isNewExpression3 = lib_exports.isNewExpression, isPattern2 = lib_exports.isPattern;
44763
44873
  function UnaryExpression(node) {
44764
44874
  var operator = node.operator;
@@ -45406,11 +45516,14 @@ function ClassAccessorProperty(node) {
45406
45516
  }
45407
45517
  function ClassPrivateProperty(node) {
45408
45518
  this.printJoin(node.decorators);
45409
- if (node.static) {
45410
- this.word("static");
45411
- this.space();
45412
- }
45519
+ this.tsPrintClassMemberModifiers(node);
45413
45520
  this.print(node.key);
45521
+ if (node.optional) {
45522
+ this.tokenChar(63);
45523
+ }
45524
+ if (node.definite) {
45525
+ this.tokenChar(33);
45526
+ }
45414
45527
  this.print(node.typeAnnotation);
45415
45528
  if (node.value) {
45416
45529
  this.space();
@@ -47199,6 +47312,9 @@ function tokenIfPlusMinus(self, tok) {
47199
47312
  self.token(tok);
47200
47313
  }
47201
47314
  }
47315
+ function TSTemplateLiteralType(node) {
47316
+ this._printTemplate(node, node.types);
47317
+ }
47202
47318
  function TSLiteralType(node) {
47203
47319
  this.print(node.literal);
47204
47320
  }
@@ -47350,11 +47466,7 @@ function TSImportType(node) {
47350
47466
  }
47351
47467
  }
47352
47468
  function TSImportEqualsDeclaration(node) {
47353
- var isExport = node.isExport, id = node.id, moduleReference = node.moduleReference;
47354
- if (isExport) {
47355
- this.word("export");
47356
- this.space();
47357
- }
47469
+ var id = node.id, moduleReference = node.moduleReference;
47358
47470
  this.word("import");
47359
47471
  this.space();
47360
47472
  this.print(id);
@@ -47401,19 +47513,20 @@ function tsPrintSignatureDeclarationBase(node) {
47401
47513
  this.print(returnType);
47402
47514
  }
47403
47515
  function tsPrintClassMemberModifiers(node) {
47404
- var isField = node.type === "ClassAccessorProperty" || node.type === "ClassProperty";
47516
+ var isPrivateField = node.type === "ClassPrivateProperty";
47517
+ var isPublicField = node.type === "ClassAccessorProperty" || node.type === "ClassProperty";
47405
47518
  printModifiersList(this, node, [
47406
- isField && node.declare && "declare",
47407
- node.accessibility
47519
+ isPublicField && node.declare && "declare",
47520
+ !isPrivateField && node.accessibility
47408
47521
  ]);
47409
47522
  if (node.static) {
47410
47523
  this.word("static");
47411
47524
  this.space();
47412
47525
  }
47413
47526
  printModifiersList(this, node, [
47414
- node.override && "override",
47415
- node.abstract && "abstract",
47416
- isField && node.readonly && "readonly"
47527
+ !isPrivateField && node.override && "override",
47528
+ !isPrivateField && node.abstract && "abstract",
47529
+ (isPublicField || isPrivateField) && node.readonly && "readonly"
47417
47530
  ]);
47418
47531
  }
47419
47532
  function printBraced(printer, node, cb) {
@@ -47683,6 +47796,7 @@ var generatorFunctions = /* @__PURE__ */ Object.freeze({
47683
47796
  TSSatisfiesExpression: TSTypeExpression2,
47684
47797
  TSStringKeyword: TSStringKeyword,
47685
47798
  TSSymbolKeyword: TSSymbolKeyword,
47799
+ TSTemplateLiteralType: TSTemplateLiteralType,
47686
47800
  TSThisType: TSThisType,
47687
47801
  TSTupleType: TSTupleType,
47688
47802
  TSTypeAliasDeclaration: TSTypeAliasDeclaration,
@@ -47738,6 +47852,7 @@ var generatorFunctions = /* @__PURE__ */ Object.freeze({
47738
47852
  _params: _params,
47739
47853
  _predicate: _predicate,
47740
47854
  _printAttributes: _printAttributes,
47855
+ _printTemplate: _printTemplate,
47741
47856
  _shouldPrintArrowParamsParens: _shouldPrintArrowParamsParens,
47742
47857
  _shouldPrintDecoratorsBeforeExport: _shouldPrintDecoratorsBeforeExport,
47743
47858
  _variance: _variance,
@@ -49153,7 +49268,7 @@ function verify$1(visitor) {
49153
49268
  }
49154
49269
  if (shouldIgnoreKey(nodeType)) continue;
49155
49270
  if (!TYPES2.includes(nodeType)) {
49156
- throw new Error("You gave us a visitor for the node type ".concat(nodeType, " but it's not a valid type in @babel/traverse ", "8.0.0-alpha.15"));
49271
+ throw new Error("You gave us a visitor for the node type ".concat(nodeType, " but it's not a valid type in @babel/traverse ", "8.0.0-alpha.16"));
49157
49272
  }
49158
49273
  var visitors2 = visitor[nodeType];
49159
49274
  if ((typeof visitors2 === "undefined" ? "undefined" : _type_of(visitors2)) === "object") {
@@ -49809,7 +49924,15 @@ var collectorVisitor = {
49809
49924
  var parent = path.scope.getBlockParent();
49810
49925
  parent.registerDeclaration(path);
49811
49926
  },
49927
+ TSImportEqualsDeclaration: function TSImportEqualsDeclaration(path) {
49928
+ var parent = path.scope.getBlockParent();
49929
+ parent.registerDeclaration(path);
49930
+ },
49812
49931
  ReferencedIdentifier: function ReferencedIdentifier(path, state) {
49932
+ if (isTSQualifiedName(path.parent) && path.parent.right === path.node) {
49933
+ return;
49934
+ }
49935
+ if (path.parentPath.isTSImportEqualsDeclaration()) return;
49813
49936
  state.references.push(path);
49814
49937
  },
49815
49938
  ForXStatement: function ForXStatement(path, state) {