@putout/bundle 4.7.5 → 4.8.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/putout.js CHANGED
@@ -3570,7 +3570,7 @@ __export(lib_exports, {
3570
3570
  TSNullKeyword: () => TSNullKeyword,
3571
3571
  TSNumberKeyword: () => TSNumberKeyword,
3572
3572
  TSObjectKeyword: () => TSObjectKeyword,
3573
- TSOptionalType: () => TSOptionalType,
3573
+ TSOptionalType: () => TSOptionalType$1,
3574
3574
  TSParameterProperty: () => TSParameterProperty$1,
3575
3575
  TSParenthesizedType: () => TSParenthesizedType$1,
3576
3576
  TSPropertySignature: () => TSPropertySignature$1,
@@ -3581,7 +3581,7 @@ __export(lib_exports, {
3581
3581
  TSSymbolKeyword: () => TSSymbolKeyword,
3582
3582
  TSTYPEELEMENT_TYPES: () => TSTYPEELEMENT_TYPES,
3583
3583
  TSTYPE_TYPES: () => TSTYPE_TYPES,
3584
- TSTemplateLiteralType: () => TSTemplateLiteralType,
3584
+ TSTemplateLiteralType: () => TSTemplateLiteralType$1,
3585
3585
  TSThisType: () => TSThisType,
3586
3586
  TSTupleType: () => TSTupleType$1,
3587
3587
  TSTypeAliasDeclaration: () => TSTypeAliasDeclaration$1,
@@ -3634,7 +3634,7 @@ __export(lib_exports, {
3634
3634
  VoidTypeAnnotation: () => VoidTypeAnnotation,
3635
3635
  WHILE_TYPES: () => WHILE_TYPES,
3636
3636
  WhileStatement: () => WhileStatement$1,
3637
- WithStatement: () => WithStatement,
3637
+ WithStatement: () => WithStatement$1,
3638
3638
  YieldExpression: () => YieldExpression,
3639
3639
  __internal__deprecationWarning: () => deprecationWarning,
3640
3640
  addComment: () => addComment,
@@ -4153,7 +4153,7 @@ __export(lib_exports, {
4153
4153
  isForOfStatement: () => isForOfStatement$2,
4154
4154
  isForStatement: () => isForStatement,
4155
4155
  isForXStatement: () => isForXStatement,
4156
- isFunction: () => isFunction$7,
4156
+ isFunction: () => isFunction$8,
4157
4157
  isFunctionDeclaration: () => isFunctionDeclaration$3,
4158
4158
  isFunctionExpression: () => isFunctionExpression$1,
4159
4159
  isFunctionParameter: () => isFunctionParameter,
@@ -4161,7 +4161,7 @@ __export(lib_exports, {
4161
4161
  isFunctionTypeAnnotation: () => isFunctionTypeAnnotation,
4162
4162
  isFunctionTypeParam: () => isFunctionTypeParam,
4163
4163
  isGenericTypeAnnotation: () => isGenericTypeAnnotation,
4164
- isIdentifier: () => isIdentifier$g,
4164
+ isIdentifier: () => isIdentifier$h,
4165
4165
  isIfStatement: () => isIfStatement$3,
4166
4166
  isImmutable: () => isImmutable,
4167
4167
  isImport: () => isImport,
@@ -4185,14 +4185,14 @@ __export(lib_exports, {
4185
4185
  isJSXClosingFragment: () => isJSXClosingFragment,
4186
4186
  isJSXElement: () => isJSXElement$5,
4187
4187
  isJSXEmptyExpression: () => isJSXEmptyExpression,
4188
- isJSXExpressionContainer: () => isJSXExpressionContainer,
4188
+ isJSXExpressionContainer: () => isJSXExpressionContainer$1,
4189
4189
  isJSXFragment: () => isJSXFragment,
4190
4190
  isJSXIdentifier: () => isJSXIdentifier$3,
4191
4191
  isJSXMemberExpression: () => isJSXMemberExpression,
4192
4192
  isJSXNamespacedName: () => isJSXNamespacedName,
4193
4193
  isJSXOpeningElement: () => isJSXOpeningElement,
4194
4194
  isJSXOpeningFragment: () => isJSXOpeningFragment,
4195
- isJSXSpreadAttribute: () => isJSXSpreadAttribute,
4195
+ isJSXSpreadAttribute: () => isJSXSpreadAttribute$1,
4196
4196
  isJSXSpreadChild: () => isJSXSpreadChild,
4197
4197
  isJSXText: () => isJSXText$4,
4198
4198
  isLVal: () => isLVal,
@@ -4273,7 +4273,7 @@ __export(lib_exports, {
4273
4273
  isSymbolTypeAnnotation: () => isSymbolTypeAnnotation,
4274
4274
  isTSAnyKeyword: () => isTSAnyKeyword,
4275
4275
  isTSArrayType: () => isTSArrayType,
4276
- isTSAsExpression: () => isTSAsExpression,
4276
+ isTSAsExpression: () => isTSAsExpression$1,
4277
4277
  isTSBaseType: () => isTSBaseType,
4278
4278
  isTSBigIntKeyword: () => isTSBigIntKeyword,
4279
4279
  isTSBooleanKeyword: () => isTSBooleanKeyword,
@@ -4515,7 +4515,7 @@ __export(lib_exports, {
4515
4515
  tsNullKeyword: () => tsNullKeyword,
4516
4516
  tsNumberKeyword: () => tsNumberKeyword,
4517
4517
  tsObjectKeyword: () => tsObjectKeyword,
4518
- tsOptionalType: () => tsOptionalType,
4518
+ tsOptionalType: () => tsOptionalType$1,
4519
4519
  tsParameterProperty: () => tsParameterProperty$1,
4520
4520
  tsParenthesizedType: () => tsParenthesizedType$3,
4521
4521
  tsPropertySignature: () => tsPropertySignature$1,
@@ -4524,7 +4524,7 @@ __export(lib_exports, {
4524
4524
  tsSatisfiesExpression: () => tsSatisfiesExpression,
4525
4525
  tsStringKeyword: () => tsStringKeyword,
4526
4526
  tsSymbolKeyword: () => tsSymbolKeyword,
4527
- tsTemplateLiteralType: () => tsTemplateLiteralType,
4527
+ tsTemplateLiteralType: () => tsTemplateLiteralType$1,
4528
4528
  tsThisType: () => tsThisType,
4529
4529
  tsTupleType: () => tsTupleType$1,
4530
4530
  tsTypeAliasDeclaration: () => tsTypeAliasDeclaration$1,
@@ -4563,7 +4563,7 @@ __export(lib_exports, {
4563
4563
  voidPattern: () => voidPattern$1,
4564
4564
  voidTypeAnnotation: () => voidTypeAnnotation,
4565
4565
  whileStatement: () => whileStatement$1,
4566
- withStatement: () => withStatement,
4566
+ withStatement: () => withStatement$1,
4567
4567
  yieldExpression: () => yieldExpression,
4568
4568
  });
4569
4569
 
@@ -6229,7 +6229,7 @@ function isFunctionExpression$1(node, opts) {
6229
6229
  return opts == null || shallowEqual(node, opts);
6230
6230
  }
6231
6231
 
6232
- function isIdentifier$g(node, opts) {
6232
+ function isIdentifier$h(node, opts) {
6233
6233
  if (!node)
6234
6234
  return false;
6235
6235
 
@@ -7599,7 +7599,7 @@ function isJSXEmptyExpression(node, opts) {
7599
7599
  return opts == null || shallowEqual(node, opts);
7600
7600
  }
7601
7601
 
7602
- function isJSXExpressionContainer(node, opts) {
7602
+ function isJSXExpressionContainer$1(node, opts) {
7603
7603
  if (!node)
7604
7604
  return false;
7605
7605
 
@@ -7659,7 +7659,7 @@ function isJSXOpeningElement(node, opts) {
7659
7659
  return opts == null || shallowEqual(node, opts);
7660
7660
  }
7661
7661
 
7662
- function isJSXSpreadAttribute(node, opts) {
7662
+ function isJSXSpreadAttribute$1(node, opts) {
7663
7663
  if (!node)
7664
7664
  return false;
7665
7665
 
@@ -8359,7 +8359,7 @@ function isTSInstantiationExpression(node, opts) {
8359
8359
  return opts == null || shallowEqual(node, opts);
8360
8360
  }
8361
8361
 
8362
- function isTSAsExpression(node, opts) {
8362
+ function isTSAsExpression$1(node, opts) {
8363
8363
  if (!node)
8364
8364
  return false;
8365
8365
 
@@ -9070,7 +9070,7 @@ function isForXStatement(node, opts) {
9070
9070
  return opts == null || shallowEqual(node, opts);
9071
9071
  }
9072
9072
 
9073
- function isFunction$7(node, opts) {
9073
+ function isFunction$8(node, opts) {
9074
9074
  if (!node)
9075
9075
  return false;
9076
9076
 
@@ -9921,7 +9921,7 @@ function matchesPattern$1(member, match, allowPartial) {
9921
9921
  const node2 = nodes2[j];
9922
9922
  let value;
9923
9923
 
9924
- if (isIdentifier$g(node2)) {
9924
+ if (isIdentifier$h(node2)) {
9925
9925
  value = node2.name;
9926
9926
  } else if (isStringLiteral$a(node2)) {
9927
9927
  value = node2.value;
@@ -14967,7 +14967,7 @@ function whileStatement$1(test, body) {
14967
14967
  return node;
14968
14968
  }
14969
14969
 
14970
- function withStatement(object, body) {
14970
+ function withStatement$1(object, body) {
14971
14971
  const node = {
14972
14972
  type: 'WithStatement',
14973
14973
  object,
@@ -16916,7 +16916,7 @@ function tsTupleType$1(elementTypes) {
16916
16916
  return node;
16917
16917
  }
16918
16918
 
16919
- function tsOptionalType(typeAnnotation2) {
16919
+ function tsOptionalType$1(typeAnnotation2) {
16920
16920
  const node = {
16921
16921
  type: 'TSOptionalType',
16922
16922
  typeAnnotation: typeAnnotation2,
@@ -17057,7 +17057,7 @@ function tsMappedType$1(key, constraint, nameType = null, typeAnnotation2 = null
17057
17057
  return node;
17058
17058
  }
17059
17059
 
17060
- function tsTemplateLiteralType(quasis, types2) {
17060
+ function tsTemplateLiteralType$1(quasis, types2) {
17061
17061
  const node = {
17062
17062
  type: 'TSTemplateLiteralType',
17063
17063
  quasis,
@@ -17614,7 +17614,7 @@ var b = /* @__PURE__ */Object.freeze({
17614
17614
  tsNullKeyword,
17615
17615
  tsNumberKeyword,
17616
17616
  tsObjectKeyword,
17617
- tsOptionalType,
17617
+ tsOptionalType: tsOptionalType$1,
17618
17618
  tsParameterProperty: tsParameterProperty$1,
17619
17619
  tsParenthesizedType: tsParenthesizedType$3,
17620
17620
  tsPropertySignature: tsPropertySignature$1,
@@ -17623,7 +17623,7 @@ var b = /* @__PURE__ */Object.freeze({
17623
17623
  tsSatisfiesExpression,
17624
17624
  tsStringKeyword,
17625
17625
  tsSymbolKeyword,
17626
- tsTemplateLiteralType,
17626
+ tsTemplateLiteralType: tsTemplateLiteralType$1,
17627
17627
  tsThisType,
17628
17628
  tsTupleType: tsTupleType$1,
17629
17629
  tsTypeAliasDeclaration: tsTypeAliasDeclaration$1,
@@ -17660,7 +17660,7 @@ var b = /* @__PURE__ */Object.freeze({
17660
17660
  voidPattern: voidPattern$1,
17661
17661
  voidTypeAnnotation,
17662
17662
  whileStatement: whileStatement$1,
17663
- withStatement,
17663
+ withStatement: withStatement$1,
17664
17664
  yieldExpression,
17665
17665
  });
17666
17666
 
@@ -17723,7 +17723,7 @@ var UpdateExpression = alias('updateExpression');
17723
17723
  var VariableDeclaration$1 = alias('variableDeclaration');
17724
17724
  var VariableDeclarator = alias('variableDeclarator');
17725
17725
  var WhileStatement$1 = alias('whileStatement');
17726
- var WithStatement = alias('withStatement');
17726
+ var WithStatement$1 = alias('withStatement');
17727
17727
  var AssignmentPattern$1 = alias('assignmentPattern');
17728
17728
  var ArrayPattern$1 = alias('arrayPattern');
17729
17729
  var ArrowFunctionExpression$1 = alias('arrowFunctionExpression');
@@ -17888,7 +17888,7 @@ var TSTypeQuery$1 = alias('tsTypeQuery');
17888
17888
  var TSTypeLiteral$1 = alias('tsTypeLiteral');
17889
17889
  var TSArrayType = alias('tsArrayType');
17890
17890
  var TSTupleType$1 = alias('tsTupleType');
17891
- var TSOptionalType = alias('tsOptionalType');
17891
+ var TSOptionalType$1 = alias('tsOptionalType');
17892
17892
  var TSRestType = alias('tsRestType');
17893
17893
  var TSNamedTupleMember$1 = alias('tsNamedTupleMember');
17894
17894
  var TSUnionType$1 = alias('tsUnionType');
@@ -17899,7 +17899,7 @@ var TSParenthesizedType$1 = alias('tsParenthesizedType');
17899
17899
  var TSTypeOperator = alias('tsTypeOperator');
17900
17900
  var TSIndexedAccessType = alias('tsIndexedAccessType');
17901
17901
  var TSMappedType$1 = alias('tsMappedType');
17902
- var TSTemplateLiteralType = alias('tsTemplateLiteralType');
17902
+ var TSTemplateLiteralType$1 = alias('tsTemplateLiteralType');
17903
17903
  var TSLiteralType = alias('tsLiteralType');
17904
17904
  var TSClassImplements = alias('tsClassImplements');
17905
17905
  var TSInterfaceHeritage = alias('tsInterfaceHeritage');
@@ -17977,7 +17977,7 @@ function buildChildren(node) {
17977
17977
  continue;
17978
17978
  }
17979
17979
 
17980
- if (isJSXExpressionContainer(child))
17980
+ if (isJSXExpressionContainer$1(child))
17981
17981
  child = child.expression;
17982
17982
 
17983
17983
  if (isJSXEmptyExpression(child))
@@ -19270,7 +19270,7 @@ function createTypeAnnotationBasedOnTypeof(type) {
19270
19270
  }
19271
19271
 
19272
19272
  function getQualifiedName$1(node) {
19273
- return isIdentifier$g(node) ? node.name : `${node.id.name}.${getQualifiedName$1(node.qualification)}`;
19273
+ return isIdentifier$h(node) ? node.name : `${node.id.name}.${getQualifiedName$1(node.qualification)}`;
19274
19274
  }
19275
19275
 
19276
19276
  function removeTypeDuplicates$1(nodesIn) {
@@ -19354,7 +19354,7 @@ function createFlowUnionType(types2) {
19354
19354
  }
19355
19355
 
19356
19356
  function getQualifiedName(node) {
19357
- return isIdentifier$g(node) ? node.name : isThisExpression(node) ? 'this' : `${node.right.name}.${getQualifiedName(node.left)}`;
19357
+ return isIdentifier$h(node) ? node.name : isThisExpression(node) ? 'this' : `${node.right.name}.${getQualifiedName(node.left)}`;
19358
19358
  }
19359
19359
 
19360
19360
  function removeTypeDuplicates(nodesIn) {
@@ -19479,7 +19479,7 @@ function cloneNodeInternal(node, deep = true, withoutLoc = false, commentsCache)
19479
19479
  type: node.type,
19480
19480
  };
19481
19481
 
19482
- if (isIdentifier$g(node)) {
19482
+ if (isIdentifier$h(node)) {
19483
19483
  newNode.name = node.name;
19484
19484
 
19485
19485
  if (hasOwn(node, 'optional') && typeof node.optional === 'boolean') {
@@ -19705,7 +19705,7 @@ function toBlock(node, parent) {
19705
19705
  blockNodes = [];
19706
19706
  } else {
19707
19707
  if (!isStatement$7(node)) {
19708
- if (isFunction$7(parent)) {
19708
+ if (isFunction$8(parent)) {
19709
19709
  node = returnStatement$1(node);
19710
19710
  } else {
19711
19711
  node = expressionStatement$5(node);
@@ -19755,7 +19755,7 @@ function toBindingIdentifierName(name) {
19755
19755
  }
19756
19756
 
19757
19757
  function toComputedKey(node, key = node.key || node.property) {
19758
- if (!node.computed && isIdentifier$g(key))
19758
+ if (!node.computed && isIdentifier$h(key))
19759
19759
  key = stringLiteral$6(key.name);
19760
19760
 
19761
19761
  return key;
@@ -19773,7 +19773,7 @@ function toExpression$4(node) {
19773
19773
  if (isClass(node)) {
19774
19774
  node.type = 'ClassExpression';
19775
19775
  node.abstract = false;
19776
- } else if (isFunction$7(node)) {
19776
+ } else if (isFunction$8(node)) {
19777
19777
  node.type = 'FunctionExpression';
19778
19778
  }
19779
19779
 
@@ -19875,7 +19875,7 @@ function toKeyAlias(node, key = node.key) {
19875
19875
 
19876
19876
  if (node.kind === 'method') {
19877
19877
  return toKeyAlias.increment() + '';
19878
- } else if (isIdentifier$g(key)) {
19878
+ } else if (isIdentifier$h(key)) {
19879
19879
  alias2 = key.name;
19880
19880
  } else if (isStringLiteral$a(key)) {
19881
19881
  alias2 = JSON.stringify(key.value);
@@ -19913,7 +19913,7 @@ function toStatement$1(node, ignore) {
19913
19913
  if (isClass(node)) {
19914
19914
  mustHaveId = true;
19915
19915
  newType = 'ClassDeclaration';
19916
- } else if (isFunction$7(node)) {
19916
+ } else if (isFunction$8(node)) {
19917
19917
  mustHaveId = true;
19918
19918
  newType = 'FunctionDeclaration';
19919
19919
  } else if (isAssignmentExpression$3(node)) {
@@ -20145,7 +20145,7 @@ function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
20145
20145
  continue;
20146
20146
  }
20147
20147
 
20148
- if (isIdentifier$g(id)) {
20148
+ if (isIdentifier$h(id)) {
20149
20149
  if (duplicates) {
20150
20150
  const _ids = ids[id.name] = ids[id.name] || [];
20151
20151
  _ids.push(id);
@@ -20302,7 +20302,7 @@ function getFunctionName(node, parent) {
20302
20302
  if (!id)
20303
20303
  return null;
20304
20304
 
20305
- const name = isLiteral$4(id) ? getNameFromLiteralId(id) : isIdentifier$g(id) ? id.name : isPrivateName(id) ? id.id.name : null;
20305
+ const name = isLiteral$4(id) ? getNameFromLiteralId(id) : isIdentifier$h(id) ? id.name : isPrivateName(id) ? id.id.name : null;
20306
20306
 
20307
20307
  if (name == null)
20308
20308
  return null;
@@ -20405,7 +20405,7 @@ function isImmutable(node) {
20405
20405
  if (isType(node.type, 'Immutable'))
20406
20406
  return true;
20407
20407
 
20408
- if (isIdentifier$g(node)) {
20408
+ if (isIdentifier$h(node)) {
20409
20409
  if (node.name === 'undefined') {
20410
20410
  return true;
20411
20411
  } else {
@@ -20601,11 +20601,11 @@ function isReferenced(node, parent, grandparent) {
20601
20601
  }
20602
20602
 
20603
20603
  function isScope(node, parent) {
20604
- if (isBlockStatement$7(node) && (isFunction$7(parent) || isCatchClause(parent))) {
20604
+ if (isBlockStatement$7(node) && (isFunction$8(parent) || isCatchClause(parent))) {
20605
20605
  return false;
20606
20606
  }
20607
20607
 
20608
- if (isPattern(node) && (isFunction$7(parent) || isCatchClause(parent))) {
20608
+ if (isPattern(node) && (isFunction$8(parent) || isCatchClause(parent))) {
20609
20609
  return true;
20610
20610
  }
20611
20611
 
@@ -20613,7 +20613,7 @@ function isScope(node, parent) {
20613
20613
  }
20614
20614
 
20615
20615
  function isSpecifierDefault(specifier) {
20616
- return isImportDefaultSpecifier$1(specifier) || isIdentifier$g(specifier.imported || specifier.exported, {
20616
+ return isImportDefaultSpecifier$1(specifier) || isIdentifier$h(specifier.imported || specifier.exported, {
20617
20617
  name: 'default',
20618
20618
  });
20619
20619
  }
@@ -41744,8 +41744,6 @@ function DeclareExportDeclaration2(node) {
41744
41744
  this.word('default');
41745
41745
  this.space();
41746
41746
  }
41747
-
41748
- FlowExportDeclaration.call(this, node);
41749
41747
  }
41750
41748
 
41751
41749
  function DeclareExportAllDeclaration2(node) {
@@ -41848,35 +41846,6 @@ function EnumStringMember2(node) {
41848
41846
  enumInitializedMember(this, node);
41849
41847
  }
41850
41848
 
41851
- function FlowExportDeclaration(node) {
41852
- if (node.declaration) {
41853
- const declar = node.declaration;
41854
- this.print(declar);
41855
-
41856
- if (!isStatement$12(declar))
41857
- this.semicolon();
41858
- } else {
41859
- this.tokenChar(123);
41860
-
41861
- if (node.specifiers.length) {
41862
- this.space();
41863
- this.printList(node.specifiers);
41864
- this.space();
41865
- }
41866
-
41867
- this.tokenChar(125);
41868
-
41869
- if (node.source) {
41870
- this.space();
41871
- this.word('from');
41872
- this.space();
41873
- this.print(node.source);
41874
- }
41875
-
41876
- this.semicolon();
41877
- }
41878
- }
41879
-
41880
41849
  function ExistsTypeAnnotation2() {
41881
41850
  this.tokenChar(42);
41882
41851
  }
@@ -51414,7 +51383,7 @@ var is$3 = {};
51414
51383
  const {types: types$16} = bundle;
51415
51384
  const {
51416
51385
  isStringLiteral: isStringLiteral$9,
51417
- isIdentifier: isIdentifier$f,
51386
+ isIdentifier: isIdentifier$g,
51418
51387
  isIfStatement: isIfStatement$2,
51419
51388
  isStatement: isStatement$6,
51420
51389
  isForOfStatement: isForOfStatement$1,
@@ -51428,7 +51397,7 @@ const {
51428
51397
  const isParentProgram$1 = (path) => path.parentPath?.isProgram();
51429
51398
  const isParentBlock$3 = (path) => path.parentPath.isBlockStatement();
51430
51399
 
51431
- const isNext$p = (path) => {
51400
+ const isNext$q = (path) => {
51432
51401
  const next = path.getNextSibling();
51433
51402
 
51434
51403
  if (!next.node)
@@ -51442,8 +51411,8 @@ const isPrev$1 = (path) => {
51442
51411
  return next.node;
51443
51412
  };
51444
51413
 
51445
- const isNextParent$5 = (path) => isNext$p(path.parentPath);
51446
- const isLast$d = (path) => isParentProgram$1(path) && !isNext$p(path);
51414
+ const isNextParent$5 = (path) => isNext$q(path.parentPath);
51415
+ const isLast$d = (path) => isParentProgram$1(path) && !isNext$q(path);
51447
51416
 
51448
51417
  is$3.isNextObject = (a) => a
51449
51418
  .getNextSibling()
@@ -51457,7 +51426,7 @@ is$3.isFirst = (path) => path.node === path.parentPath.node.body?.[0];
51457
51426
  is$3.isPrevBody = (path) => path
51458
51427
  .getPrevSibling()
51459
51428
  .isBlockStatement();
51460
- is$3.isNext = isNext$p;
51429
+ is$3.isNext = isNext$q;
51461
51430
  is$3.isPrev = isPrev$1;
51462
51431
  is$3.isNextParent = isNextParent$5;
51463
51432
  is$3.isParentProgram = isParentProgram$1;
@@ -51486,7 +51455,7 @@ function isCoupleLines$9(path) {
51486
51455
  is$3.exists = (a) => a.node;
51487
51456
  is$3.isStringAndIdentifier = isStringAndIdentifier$2;
51488
51457
  function isStringAndIdentifier$2([a, b]) {
51489
- return isStringLiteral$9(a) && isIdentifier$f(b);
51458
+ return isStringLiteral$9(a) && isIdentifier$g(b);
51490
51459
  }
51491
51460
 
51492
51461
  const checkObject = (elements) => {
@@ -51519,11 +51488,11 @@ is$3.isSimpleAndNotEmptyObject = (elements) => {
51519
51488
  };
51520
51489
 
51521
51490
  is$3.isIdentifierAndIdentifier = ([a, b]) => {
51522
- return isIdentifier$f(a) && isIdentifier$f(b);
51491
+ return isIdentifier$g(a) && isIdentifier$g(b);
51523
51492
  };
51524
51493
 
51525
51494
  is$3.isStringAndMember = ([a, b]) => isStringLiteral$9(a) && isMemberExpression$7(b);
51526
- is$3.isIdentifierAndString = ([a, b]) => isIdentifier$f(a) && isStringLiteral$9(b);
51495
+ is$3.isIdentifierAndString = ([a, b]) => isIdentifier$g(a) && isStringLiteral$9(b);
51527
51496
  is$3.isStringAndArray = ([a, b]) => {
51528
51497
  if (!isStringLiteral$9(a))
51529
51498
  return false;
@@ -51602,14 +51571,14 @@ const WATER_MARK_BEFORE = '__putout_newline_before';
51602
51571
  const WATER_MARK_AFTER = '__putout_newline_after';
51603
51572
 
51604
51573
  mark.markBefore = markBefore$2;
51605
- mark.markAfter = markAfter$b;
51606
- mark.maybeMarkAfter = (a, path) => a && markAfter$b(path);
51574
+ mark.markAfter = markAfter$c;
51575
+ mark.maybeMarkAfter = (a, path) => a && markAfter$c(path);
51607
51576
 
51608
51577
  function markBefore$2(path) {
51609
51578
  path[WATER_MARK_BEFORE] = true;
51610
51579
  }
51611
51580
 
51612
- function markAfter$b(path) {
51581
+ function markAfter$c(path) {
51613
51582
  path[WATER_MARK_AFTER] = true;
51614
51583
  }
51615
51584
 
@@ -52012,7 +51981,7 @@ const {
52012
51981
  isUnaryExpression,
52013
51982
  isIfStatement: isIfStatement$1,
52014
51983
  isCallExpression: isCallExpression$8,
52015
- isIdentifier: isIdentifier$e,
51984
+ isIdentifier: isIdentifier$f,
52016
51985
  } = types$14;
52017
51986
 
52018
51987
  const isArgOfCall = (path) => path.parentPath?.isCallExpression() && path.parentPath.get('arguments.0') === path;
@@ -52022,10 +51991,10 @@ const isExcludedFromChain = satisfy$2([isUnaryExpression, isIfStatement$1]);
52022
51991
  const hasComment = ({type}) => type === 'CommentLine';
52023
51992
 
52024
51993
  const isInsideMemberCall = (path) => {
52025
- if (!isIdentifier$e(path.node.object))
51994
+ if (!isIdentifier$f(path.node.object))
52026
51995
  return false;
52027
51996
 
52028
- if (!isIdentifier$e(path.node.property))
51997
+ if (!isIdentifier$f(path.node.property))
52029
51998
  return false;
52030
51999
 
52031
52000
  return isCallExpression$8(path.parentPath.parentPath);
@@ -52091,7 +52060,7 @@ const {types: types$13} = bundle;
52091
52060
  const {
52092
52061
  isLast: isLast$c,
52093
52062
  isCoupleLines: isCoupleLines$8,
52094
- isNext: isNext$o,
52063
+ isNext: isNext$p,
52095
52064
  } = is$3;
52096
52065
 
52097
52066
  const {isLooksLikeChain: isLooksLikeChain$3} = isLooksLikeChain$4;
@@ -52226,7 +52195,7 @@ parseTrailingComments$2.parseTrailingComments = (path, printer, semantics, {curr
52226
52195
  }
52227
52196
 
52228
52197
  if (hasBody$1(path)) {
52229
- maybe.write.breakline(!isNext$o(path));
52198
+ maybe.write.breakline(!isNext$p(path));
52230
52199
  maybe.write.breakline(!n);
52231
52200
  }
52232
52201
 
@@ -52262,7 +52231,7 @@ function isPrevCall(path) {
52262
52231
 
52263
52232
  var parseComments$8 = {};
52264
52233
 
52265
- const {isNext: isNext$n} = is$3;
52234
+ const {isNext: isNext$o} = is$3;
52266
52235
 
52267
52236
  parseComments$8.parseComments = (path, {write, maybe}, semantics) => {
52268
52237
  if (!semantics.comments)
@@ -52278,7 +52247,7 @@ parseComments$8.parseComments = (path, {write, maybe}, semantics) => {
52278
52247
 
52279
52248
  for (const [i, {type, value}] of comments.entries()) {
52280
52249
  if (type === 'CommentLine') {
52281
- maybe.write.breakline(isNext$n(path) || !program);
52250
+ maybe.write.breakline(isNext$o(path) || !program);
52282
52251
  write('//');
52283
52252
  write(value);
52284
52253
 
@@ -52466,8 +52435,8 @@ arrowFunctionExpression.ArrowFunctionExpression = maybeParens$d((path, printer,
52466
52435
  var functionDeclaration = {};
52467
52436
 
52468
52437
  const {types: types$12} = bundle;
52469
- const {markAfter: markAfter$a} = mark;
52470
- const {isNext: isNext$m, isNextParent: isNextParent$4} = is$3;
52438
+ const {markAfter: markAfter$b} = mark;
52439
+ const {isNext: isNext$n, isNextParent: isNextParent$4} = is$3;
52471
52440
  const {printParams: printParams$b} = params;
52472
52441
 
52473
52442
  const not = (fn) => (...a) => !fn(...a);
@@ -52518,13 +52487,13 @@ functionDeclaration.FunctionDeclaration = {
52518
52487
  print.space();
52519
52488
  print('__body');
52520
52489
  },
52521
- afterSatisfy: () => [isNext$m, isNextParent$4, isInsideBlockStatement],
52490
+ afterSatisfy: () => [isNext$n, isNextParent$4, isInsideBlockStatement],
52522
52491
  after(path, {indent, maybe}) {
52523
- if (isNextAssign$1(path) || isNextFunction(path) || isNext$m(path))
52492
+ if (isNextAssign$1(path) || isNextFunction(path) || isNext$n(path))
52524
52493
  indent();
52525
52494
 
52526
52495
  maybe.write.newline(notInsideExportDefaultWithBody(path));
52527
- markAfter$a(path);
52496
+ markAfter$b(path);
52528
52497
  },
52529
52498
  };
52530
52499
 
@@ -52719,7 +52688,7 @@ const createPrintSpace = ({isNewline, printer}) => () => {
52719
52688
  };
52720
52689
 
52721
52690
  const {
52722
- isNext: isNext$l,
52691
+ isNext: isNext$m,
52723
52692
  hasTrailingComment: hasTrailingComment$3,
52724
52693
  } = is$3;
52725
52694
 
@@ -52732,7 +52701,7 @@ const noTrailingCommentAndNext = (path) => {
52732
52701
  if (hasTrailingComment$3(path))
52733
52702
  return false;
52734
52703
 
52735
- return isNext$l(path);
52704
+ return isNext$m(path);
52736
52705
  };
52737
52706
 
52738
52707
  const ClassMethod$1 = {
@@ -52869,7 +52838,7 @@ functions$1.ObjectMethod = ObjectMethod;
52869
52838
 
52870
52839
  var unaryExpressions$1 = {};
52871
52840
 
52872
- const {isLast: isLast$b, isNext: isNext$k} = is$3;
52841
+ const {isLast: isLast$b, isNext: isNext$l} = is$3;
52873
52842
  const {maybeParens: maybeParens$b} = maybeParens$e;
52874
52843
 
52875
52844
  const isWord = (a) => /^(delete|typeof|void|throw)$/.test(a);
@@ -52912,7 +52881,7 @@ unaryExpressions$1.ThrowStatement = (path, {print, indent, maybe}) => {
52912
52881
 
52913
52882
  print(';');
52914
52883
  maybe.print.newline(!isLast$b(path));
52915
- maybe.print.breakline(isNext$k(path));
52884
+ maybe.print.breakline(isNext$l(path));
52916
52885
  };
52917
52886
 
52918
52887
  function printUnary(name, {print}) {
@@ -52988,8 +52957,8 @@ maybeDeclare$6.maybeDeclare = (visit) => (path, printer, semantics) => {
52988
52957
 
52989
52958
  const {types: types$11} = bundle;
52990
52959
 
52991
- const {isNext: isNext$j} = is$3;
52992
- const {markAfter: markAfter$9} = mark;
52960
+ const {isNext: isNext$k} = is$3;
52961
+ const {markAfter: markAfter$a} = mark;
52993
52962
 
52994
52963
  const {maybeDeclare: maybeDeclare$5} = maybeDeclare$6;
52995
52964
  const {parseComments: parseComments$5} = comment;
@@ -53000,12 +52969,12 @@ const isInsideTSModuleBlock = (path) => {
53000
52969
  };
53001
52970
 
53002
52971
  const {
53003
- isFunction: isFunction$6,
52972
+ isFunction: isFunction$7,
53004
52973
  isTSModuleBlock: isTSModuleBlock$2,
53005
52974
  } = types$11;
53006
52975
 
53007
52976
  const isInsideExport = ({parentPath}) => parentPath.isExportDeclaration();
53008
- const isFunctionLike = (path) => isFunction$6(path.parentPath.parentPath);
52977
+ const isFunctionLike = (path) => isFunction$7(path.parentPath.parentPath);
53009
52978
  const hasBody = ({node}) => node.body.body.length;
53010
52979
 
53011
52980
  const classVisitor = maybeDecorators$2((path, printer, semantics) => {
@@ -53075,7 +53044,7 @@ _class.ClassDeclaration = {
53075
53044
  if (isFunctionLike(path))
53076
53045
  return true;
53077
53046
 
53078
- if (isNext$j(path))
53047
+ if (isNext$k(path))
53079
53048
  return true;
53080
53049
 
53081
53050
  return isInsideTSModuleBlock(path);
@@ -53085,7 +53054,7 @@ _class.ClassDeclaration = {
53085
53054
 
53086
53055
  if (!isFunctionLike(path) && hasBody(path)) {
53087
53056
  write.newline();
53088
- markAfter$9(path);
53057
+ markAfter$a(path);
53089
53058
  }
53090
53059
  },
53091
53060
  };
@@ -53282,7 +53251,7 @@ const {types: types$_} = bundle;
53282
53251
  const {
53283
53252
  isArrayExpression: isArrayExpression$7,
53284
53253
  isCallExpression: isCallExpression$6,
53285
- isIdentifier: isIdentifier$d,
53254
+ isIdentifier: isIdentifier$e,
53286
53255
  } = types$_;
53287
53256
 
53288
53257
  isThirdObjectInsideArray$1.isThirdObjectInsideArray = ({parentPath}) => {
@@ -53291,7 +53260,7 @@ isThirdObjectInsideArray$1.isThirdObjectInsideArray = ({parentPath}) => {
53291
53260
 
53292
53261
  const [, second] = parentPath.node.elements;
53293
53262
 
53294
- return isCallExpression$6(second) && !!isIdentifier$d(second);
53263
+ return isCallExpression$6(second) && !!isIdentifier$e(second);
53295
53264
  };
53296
53265
 
53297
53266
  const {types: types$Z} = bundle;
@@ -53569,9 +53538,9 @@ objectProperty$3.ObjectProperty = (path, printer, semantics) => {
53569
53538
 
53570
53539
  var objectPattern$1 = {};
53571
53540
 
53572
- var wrongShortand = {};
53541
+ var wrongShorthand$1 = {};
53573
53542
 
53574
- wrongShortand.wrongShorthand = ({computed, isAssign, keyPath, valuePath}) => {
53543
+ wrongShorthand$1.wrongShorthand = ({computed, isAssign, keyPath, valuePath}) => {
53575
53544
  return !computed && !isAssign && keyPath.node.name !== valuePath.node.name;
53576
53545
  };
53577
53546
 
@@ -53628,14 +53597,14 @@ var moreThenMaxPropertiesLengthInOneLine$1 = {};
53628
53597
  const {types: types$V} = bundle;
53629
53598
  const {
53630
53599
  isAssignmentPattern: isAssignmentPattern$2,
53631
- isIdentifier: isIdentifier$c,
53600
+ isIdentifier: isIdentifier$d,
53632
53601
  } = types$V;
53633
53602
 
53634
53603
  function getLength(left, right) {
53635
- if (isIdentifier$c(left) && isIdentifier$c(right))
53604
+ if (isIdentifier$d(left) && isIdentifier$d(right))
53636
53605
  return left.name.length + right.name.length;
53637
53606
 
53638
- if (isIdentifier$c(left))
53607
+ if (isIdentifier$d(left))
53639
53608
  return left.name.length;
53640
53609
 
53641
53610
  return 0;
@@ -53654,7 +53623,7 @@ moreThenMaxPropertiesLengthInOneLine$1.moreThenMaxPropertiesLengthInOneLine = (p
53654
53623
  return true;
53655
53624
  }
53656
53625
 
53657
- if (!isIdentifier$c(key))
53626
+ if (!isIdentifier$d(key))
53658
53627
  continue;
53659
53628
 
53660
53629
  const {name} = key;
@@ -53673,6 +53642,7 @@ const {
53673
53642
  isAssignmentPattern: isAssignmentPattern$1,
53674
53643
  isArrayExpression: isArrayExpression$5,
53675
53644
  isObjectExpression: isObjectExpression$7,
53645
+ isIdentifier: isIdentifier$c,
53676
53646
  } = types$U;
53677
53647
 
53678
53648
  calculateLongAssignPattern.calculateAssigns = (property, semantics) => {
@@ -53690,12 +53660,17 @@ calculateLongAssignPattern.calculateAssigns = (property, semantics) => {
53690
53660
  calculateLongAssignPattern.isLongAssignPattern = isLongAssignPattern$1;
53691
53661
 
53692
53662
  function isLongAssignPattern$1(path, semantics) {
53693
- if (!isAssignmentPattern$1(path.node.value))
53663
+ const {key, value} = path.node;
53664
+
53665
+ if (!isAssignmentPattern$1(value))
53694
53666
  return false;
53695
53667
 
53668
+ if (!isIdentifier$c(key))
53669
+ return true;
53670
+
53696
53671
  const {maxPropertiesLengthInOneLine} = semantics;
53697
53672
 
53698
- return path.node.key.name.length > maxPropertiesLengthInOneLine;
53673
+ return key.name.length > maxPropertiesLengthInOneLine;
53699
53674
  }
53700
53675
 
53701
53676
  function isComplexObject(node) {
@@ -53706,7 +53681,7 @@ function isComplexObject(node) {
53706
53681
  }
53707
53682
 
53708
53683
  const {types: types$T} = bundle;
53709
- const {wrongShorthand} = wrongShortand;
53684
+ const {wrongShorthand} = wrongShorthand$1;
53710
53685
 
53711
53686
  const {
53712
53687
  isForOf: isForOf$2,
@@ -53730,17 +53705,17 @@ const {
53730
53705
  isIdentifier: isIdentifier$b,
53731
53706
  isAssignmentPattern,
53732
53707
  isVariableDeclarator: isVariableDeclarator$2,
53733
- isFunction: isFunction$5,
53708
+ isFunction: isFunction$6,
53734
53709
  isObjectPattern: isObjectPattern$2,
53735
53710
  isForOfStatement,
53736
53711
  isVariableDeclaration: isVariableDeclaration$3,
53737
53712
  } = types$T;
53738
53713
 
53739
53714
  const isInsideFn = (path) => {
53740
- if (isFunction$5(path.parentPath))
53715
+ if (isFunction$6(path.parentPath))
53741
53716
  return true;
53742
53717
 
53743
- return isFunction$5(path.parentPath.parentPath);
53718
+ return isFunction$6(path.parentPath.parentPath);
53744
53719
  };
53745
53720
 
53746
53721
  function isIndent(path) {
@@ -53932,6 +53907,17 @@ function hasAssign(properties) {
53932
53907
  return false;
53933
53908
  }
53934
53909
 
53910
+ function hasComputed(properties) {
53911
+ for (const prop of properties) {
53912
+ const {computed} = prop.node;
53913
+
53914
+ if (computed)
53915
+ return true;
53916
+ }
53917
+
53918
+ return false;
53919
+ }
53920
+
53935
53921
  function hasAssignObject(path, maxPropertiesLengthInOneLine) {
53936
53922
  const {parentPath} = path;
53937
53923
 
@@ -53985,6 +53971,9 @@ function shouldAddNewline(path, semantics) {
53985
53971
  maxPropertiesInOneLine,
53986
53972
  });
53987
53973
 
53974
+ if (hasComputed(properties))
53975
+ return COUPLE_LINES;
53976
+
53988
53977
  const fnParam = isFunctionParam(path);
53989
53978
 
53990
53979
  if (hasObjectPattern(properties))
@@ -54310,6 +54299,7 @@ const {
54310
54299
  isJSXIdentifier: isJSXIdentifier$2,
54311
54300
  isTSTypeReference: isTSTypeReference$2,
54312
54301
  isTSTypeParameter,
54302
+ isTSAsExpression,
54313
54303
  } = types$O;
54314
54304
 
54315
54305
  extract$6.extract = extract$5;
@@ -54356,6 +54346,9 @@ function extract$5(node) {
54356
54346
  if (isTSTypeParameter(node))
54357
54347
  return extract$5(node.name);
54358
54348
 
54349
+ if (isTSAsExpression(node))
54350
+ return extract$5(node.expression);
54351
+
54359
54352
  const nodeTypes = [
54360
54353
  'Literals',
54361
54354
  'Identifiers',
@@ -54368,6 +54361,7 @@ function extract$5(node) {
54368
54361
  'JSXAttribute',
54369
54362
  'JSXText',
54370
54363
  'TSTypeParameter',
54364
+ 'TSAsExpression',
54371
54365
  ].join(', ');
54372
54366
 
54373
54367
  throw Error(`'operator.extract(node)' understands only ${nodeTypes} and TSTypeReference🤷, found: ${node.type}`);
@@ -55569,7 +55563,7 @@ const {
55569
55563
  isSpreadElement,
55570
55564
  isStringLiteral: isStringLiteral$4,
55571
55565
  isIdentifier: isIdentifier$6,
55572
- isFunction: isFunction$4,
55566
+ isFunction: isFunction$5,
55573
55567
  isCallExpression: isCallExpression$3,
55574
55568
  isObjectProperty,
55575
55569
  } = types$H;
@@ -55592,7 +55586,7 @@ const isSpreadBeforeObject = (a) => {
55592
55586
  if (argCall.isCallExpression()) {
55593
55587
  const [first] = argCall.get('arguments');
55594
55588
 
55595
- if (isFunction$4(first))
55589
+ if (isFunction$5(first))
55596
55590
  return false;
55597
55591
  }
55598
55592
 
@@ -56248,7 +56242,7 @@ var isInsideAssignNextAssignFunction = {};
56248
56242
  const {types: types$E} = bundle;
56249
56243
  const {
56250
56244
  isExpressionStatement: isExpressionStatement$2,
56251
- isFunction: isFunction$3,
56245
+ isFunction: isFunction$4,
56252
56246
  isAssignmentExpression,
56253
56247
  } = types$E;
56254
56248
 
@@ -56260,7 +56254,7 @@ isInsideAssignNextAssignFunction.isInsideAssignNextAssignFunction = (path) => {
56260
56254
 
56261
56255
  const next = path.getNextSibling();
56262
56256
 
56263
- if (isFunction$3(next) && next.node.leadingComments)
56257
+ if (isFunction$4(next) && next.node.leadingComments)
56264
56258
  return true;
56265
56259
 
56266
56260
  if (!isExpressionStatement$2(next))
@@ -56274,7 +56268,7 @@ isInsideAssignNextAssignFunction.isInsideAssignNextAssignFunction = (path) => {
56274
56268
  if (!isAssignmentExpression(next.node.expression))
56275
56269
  return false;
56276
56270
 
56277
- return isFunction$3(next.node.expression.right);
56271
+ return isFunction$4(next.node.expression.right);
56278
56272
  };
56279
56273
 
56280
56274
  var expressionStatementComments = {};
@@ -56544,7 +56538,7 @@ maybeSpaceAfterKeyword$3.maybeSpaceAfterKeyword = (path, {write}) => {
56544
56538
 
56545
56539
  const {types: types$C} = bundle;
56546
56540
  const {
56547
- isNext: isNext$i,
56541
+ isNext: isNext$j,
56548
56542
  isCoupleLines: isCoupleLines$3,
56549
56543
  isNewlineBetweenSiblings: isNewlineBetweenSiblings$1,
56550
56544
  exists: exists$7,
@@ -56630,7 +56624,7 @@ variableDeclaration.VariableDeclaration = {
56630
56624
  wasNewline = true;
56631
56625
  }
56632
56626
 
56633
- if (isParentBlock$2(path) && isNext$i(path) && (noTrailingComment$1(path) || isNewlineBetweenSiblings$1(path))) {
56627
+ if (isParentBlock$2(path) && isNext$j(path) && (noTrailingComment$1(path) || isNewlineBetweenSiblings$1(path))) {
56634
56628
  write.newline();
56635
56629
  wasNewline = true;
56636
56630
  }
@@ -56662,7 +56656,7 @@ variableDeclaration.VariableDeclaration = {
56662
56656
  };
56663
56657
 
56664
56658
  function noNextParentBlock(path) {
56665
- if (isNext$i(path))
56659
+ if (isNext$j(path))
56666
56660
  return false;
56667
56661
 
56668
56662
  return path.parentPath.isBlockStatement();
@@ -56708,7 +56702,7 @@ function isNextCoupleLines(path) {
56708
56702
  return isCoupleLines$3(next);
56709
56703
  }
56710
56704
 
56711
- const isLast$a = (path) => path.parentPath?.isProgram() && !isNext$i(path);
56705
+ const isLast$a = (path) => path.parentPath?.isProgram() && !isNext$j(path);
56712
56706
 
56713
56707
  function shouldAddNewlineBefore(path) {
56714
56708
  if (isFirst$1(path))
@@ -56760,10 +56754,10 @@ var ifStatement = {};
56760
56754
 
56761
56755
  const {types: types$B} = bundle;
56762
56756
 
56763
- const {markAfter: markAfter$8} = mark;
56757
+ const {markAfter: markAfter$9} = mark;
56764
56758
  const {
56765
56759
  exists: exists$6,
56766
- isNext: isNext$h,
56760
+ isNext: isNext$i,
56767
56761
  isInsideIf: isInsideIf$2,
56768
56762
  } = is$3;
56769
56763
 
@@ -56859,7 +56853,7 @@ ifStatement.IfStatement = {
56859
56853
  indent.dec();
56860
56854
  }
56861
56855
 
56862
- if (!isNext$h(path) && !consequent.isBlockStatement())
56856
+ if (!isNext$i(path) && !consequent.isBlockStatement())
56863
56857
  return;
56864
56858
 
56865
56859
  const nextPath = path.parentPath.getNextSibling();
@@ -56870,10 +56864,10 @@ ifStatement.IfStatement = {
56870
56864
  if (isLastEmptyInsideBody(path))
56871
56865
  print.newline();
56872
56866
  },
56873
- afterSatisfy: () => [isNext$h],
56867
+ afterSatisfy: () => [isNext$i],
56874
56868
  after: (path, {print}) => {
56875
56869
  print.linebreak();
56876
- markAfter$8(path);
56870
+ markAfter$9(path);
56877
56871
  },
56878
56872
  };
56879
56873
 
@@ -56881,14 +56875,14 @@ var forOfStatement = {};
56881
56875
 
56882
56876
  const {
56883
56877
  hasPrevNewline: hasPrevNewline$2,
56884
- markAfter: markAfter$7,
56878
+ markAfter: markAfter$8,
56885
56879
  markBefore,
56886
56880
  isMarkedAfter: isMarkedAfter$1,
56887
56881
  } = mark;
56888
56882
 
56889
56883
  const {
56890
56884
  isFirst,
56891
- isNext: isNext$g,
56885
+ isNext: isNext$h,
56892
56886
  isLast: isLast$9,
56893
56887
  } = is$3;
56894
56888
 
@@ -56925,7 +56919,7 @@ forOfStatement.ForOfStatement = {
56925
56919
  print('__body');
56926
56920
 
56927
56921
  const {length} = bodyPath.node.body;
56928
- maybe.print.newline(!length && !isLast$9(path) && !isNext$g(path));
56922
+ maybe.print.newline(!length && !isLast$9(path) && !isNext$h(path));
56929
56923
 
56930
56924
  return;
56931
56925
  }
@@ -56937,10 +56931,10 @@ forOfStatement.ForOfStatement = {
56937
56931
 
56938
56932
  maybe.markAfter(isMarkedAfter$1(bodyPath), path);
56939
56933
  },
56940
- afterIf: isNext$g,
56934
+ afterIf: isNext$h,
56941
56935
  after(path, {print}) {
56942
56936
  print.linebreak();
56943
- markAfter$7(path);
56937
+ markAfter$8(path);
56944
56938
  },
56945
56939
  };
56946
56940
 
@@ -57017,14 +57011,14 @@ function isTopCall(path) {
57017
57011
 
57018
57012
  const {types: types$z} = bundle;
57019
57013
  const {
57020
- isNext: isNext$f,
57014
+ isNext: isNext$g,
57021
57015
  isParentProgram,
57022
57016
  isLast: isLast$8,
57023
57017
  exists: exists$4,
57024
57018
  satisfy: satisfy$1,
57025
57019
  } = is$3;
57026
57020
 
57027
- const {markAfter: markAfter$6} = mark;
57021
+ const {markAfter: markAfter$7} = mark;
57028
57022
  const {parseComments: parseComments$3} = comment;
57029
57023
  const {insideIfWithNoBody} = insideIfWithNoBody$1;
57030
57024
  const {getDirectives: getDirectives$1} = getDirectives$2;
@@ -57112,20 +57106,20 @@ blockStatement.BlockStatement = {
57112
57106
  const {parentPath} = path;
57113
57107
 
57114
57108
  if (isObjectMethod(parentPath))
57115
- maybe.write(isNext$f(parentPath) || trailingComma, ',');
57109
+ maybe.write(isNext$g(parentPath) || trailingComma, ',');
57116
57110
  },
57117
57111
  afterIf: shouldAddNewlineAfter,
57118
57112
  after(path, {write}) {
57119
57113
  write.newline();
57120
- markAfter$6(path.parentPath);
57114
+ markAfter$7(path.parentPath);
57121
57115
  },
57122
57116
  };
57123
57117
 
57124
57118
  const isTopLevelWithNoNext = (path) => {
57125
- if (isNext$f(path))
57119
+ if (isNext$g(path))
57126
57120
  return false;
57127
57121
 
57128
- return !isNext$f(path.parentPath) && isParentProgram(path.parentPath);
57122
+ return !isNext$g(path.parentPath) && isParentProgram(path.parentPath);
57129
57123
  };
57130
57124
 
57131
57125
  const isInsideIfWithoutElseInsideFn = (path) => {
@@ -57134,7 +57128,7 @@ const isInsideIfWithoutElseInsideFn = (path) => {
57134
57128
 
57135
57129
  const isEmptyBodyNoNext = (path) => {
57136
57130
  const {parentPath} = path;
57137
- return parentPath.isStatement() && !path.node.body.length && !isNext$f(parentPath);
57131
+ return parentPath.isStatement() && !path.node.body.length && !isNext$g(parentPath);
57138
57132
  };
57139
57133
 
57140
57134
  const isLooksLikeInsideFn = ({parentPath}) => {
@@ -57188,7 +57182,7 @@ function isExportFunction(path) {
57188
57182
  if (!isExportDeclaration$2(path.parentPath?.parentPath))
57189
57183
  return false;
57190
57184
 
57191
- return !isNext$f(path.parentPath?.parentPath);
57185
+ return !isNext$g(path.parentPath?.parentPath);
57192
57186
  }
57193
57187
 
57194
57188
  function isNextIfAlternate(path) {
@@ -57245,7 +57239,7 @@ maybeSpaceAfterKeyword$1.maybeSpaceAfterKeyword = (path, {print}, semantics) =>
57245
57239
 
57246
57240
  const {types: types$y} = bundle;
57247
57241
 
57248
- const {isInsideLabel: isInsideLabel$3} = is$3;
57242
+ const {isInsideLabel: isInsideLabel$4} = is$3;
57249
57243
  const {
57250
57244
  isPrevBody,
57251
57245
  noTrailingComment,
@@ -57270,7 +57264,7 @@ returnStatement.ReturnStatement = {
57270
57264
  print(path, printer, semantics) {
57271
57265
  const {maybe, print} = printer;
57272
57266
 
57273
- maybe.indent(!isInsideLabel$3(path));
57267
+ maybe.indent(!isInsideLabel$4(path));
57274
57268
  print('return');
57275
57269
  maybeSpaceAfterKeyword(path, printer, semantics);
57276
57270
 
@@ -57315,7 +57309,7 @@ function isJSXWithComment(path) {
57315
57309
 
57316
57310
  var tryStatements = {};
57317
57311
 
57318
- const {isNext: isNext$e} = is$3;
57312
+ const {isNext: isNext$f} = is$3;
57319
57313
 
57320
57314
  tryStatements.TryStatement = {
57321
57315
  print(path, {print}) {
@@ -57334,7 +57328,7 @@ tryStatements.TryStatement = {
57334
57328
  print.newline();
57335
57329
  }
57336
57330
  },
57337
- afterSatisfy: () => [isNext$e],
57331
+ afterSatisfy: () => [isNext$f],
57338
57332
  after(path, {maybe, print}) {
57339
57333
  maybe.print.newline(!path.node.finalizer);
57340
57334
  print.breakline();
@@ -57367,7 +57361,7 @@ function isInsideBlock$1(path) {
57367
57361
 
57368
57362
  var debuggerStatement = {};
57369
57363
 
57370
- const {isNext: isNext$d, isInsideIf: isInsideIf$1} = is$3;
57364
+ const {isNext: isNext$e, isInsideIf: isInsideIf$1} = is$3;
57371
57365
  const isInsideBlock = (path) => path.parentPath.isBlockStatement();
57372
57366
 
57373
57367
  debuggerStatement.DebuggerStatement = {
@@ -57376,7 +57370,7 @@ debuggerStatement.DebuggerStatement = {
57376
57370
  print('debugger;');
57377
57371
  },
57378
57372
  afterSatisfy: () => [
57379
- isNext$d,
57373
+ isNext$e,
57380
57374
  isInsideBlock,
57381
57375
  isInsideIf$1,
57382
57376
  ],
@@ -57387,19 +57381,20 @@ debuggerStatement.DebuggerStatement = {
57387
57381
 
57388
57382
  var forStatement = {};
57389
57383
 
57384
+ const {isInsideLabel: isInsideLabel$3} = is$3;
57390
57385
  const {exists: exists$3} = is$3;
57391
57386
 
57392
- const {markAfter: markAfter$5} = mark;
57387
+ const {markAfter: markAfter$6} = mark;
57393
57388
 
57394
57389
  forStatement.ForStatement = {
57395
- print(path, {print, maybe, indent}) {
57390
+ print(path, {print, maybe}) {
57396
57391
  const {
57397
57392
  test,
57398
57393
  update,
57399
57394
  body,
57400
57395
  } = path.node;
57401
57396
 
57402
- indent();
57397
+ maybe.indent(!isInsideLabel$3(path));
57403
57398
  print('for');
57404
57399
  print.space();
57405
57400
  print('(');
@@ -57429,7 +57424,7 @@ forStatement.ForStatement = {
57429
57424
  },
57430
57425
  after(path, {print}) {
57431
57426
  print.linebreak();
57432
- markAfter$5(path);
57427
+ markAfter$6(path);
57433
57428
  },
57434
57429
  };
57435
57430
 
@@ -57679,7 +57674,7 @@ const {types: types$w} = bundle;
57679
57674
 
57680
57675
  const {isParentBlock: isParentBlock$1} = is$3;
57681
57676
  const {
57682
- markAfter: markAfter$4,
57677
+ markAfter: markAfter$5,
57683
57678
  isMarkedAfter,
57684
57679
  hasPrevNewline,
57685
57680
  } = mark;
@@ -57687,7 +57682,7 @@ const {
57687
57682
  const {
57688
57683
  isNewlineBetweenSiblings,
57689
57684
  exists: exists$2,
57690
- isNext: isNext$c,
57685
+ isNext: isNext$d,
57691
57686
  isLast: isLast$6,
57692
57687
  } = is$3;
57693
57688
 
@@ -57800,7 +57795,7 @@ exportDeclaration.ExportNamedDeclaration = {
57800
57795
  }
57801
57796
 
57802
57797
  print(';');
57803
- maybe.print.newline(isNext$c(path) || isInsideNamespace$1(path));
57798
+ maybe.print.newline(isNext$d(path) || isInsideNamespace$1(path));
57804
57799
 
57805
57800
  return;
57806
57801
  }
@@ -57828,7 +57823,7 @@ exportDeclaration.ExportNamedDeclaration = {
57828
57823
 
57829
57824
  print.newline();
57830
57825
 
57831
- markAfter$4(path);
57826
+ markAfter$5(path);
57832
57827
  },
57833
57828
  };
57834
57829
 
@@ -57849,8 +57844,8 @@ exportAllDeclaration.ExportAllDeclaration = (path, {print}) => {
57849
57844
 
57850
57845
  var whileStatement = {};
57851
57846
 
57852
- const {isNext: isNext$b} = is$3;
57853
- const {markAfter: markAfter$3} = mark;
57847
+ const {isNext: isNext$c} = is$3;
57848
+ const {markAfter: markAfter$4} = mark;
57854
57849
 
57855
57850
  whileStatement.WhileStatement = {
57856
57851
  print(path, {print, indent}) {
@@ -57872,18 +57867,18 @@ whileStatement.WhileStatement = {
57872
57867
  }
57873
57868
  },
57874
57869
  afterIf(path) {
57875
- return isNext$b(path);
57870
+ return isNext$c(path);
57876
57871
  },
57877
57872
  after(path, {print}) {
57878
57873
  print.linebreak();
57879
- markAfter$3(path);
57874
+ markAfter$4(path);
57880
57875
  },
57881
57876
  };
57882
57877
 
57883
57878
  var switchStatement = {};
57884
57879
 
57885
57880
  const {
57886
- isNext: isNext$a,
57881
+ isNext: isNext$b,
57887
57882
  exists: exists$1,
57888
57883
  isLast: isLast$5,
57889
57884
  } = is$3;
@@ -57949,10 +57944,10 @@ switchStatement.SwitchStatement = {
57949
57944
  print.indent();
57950
57945
  print('}');
57951
57946
 
57952
- if (!isNext$a(path) && !isLast$5(path))
57947
+ if (!isNext$b(path) && !isLast$5(path))
57953
57948
  print.newline();
57954
57949
  },
57955
- afterSatisfy: () => [isNext$a],
57950
+ afterSatisfy: () => [isNext$b],
57956
57951
  after(path, {print}) {
57957
57952
  print.breakline();
57958
57953
  print.newline();
@@ -57980,11 +57975,11 @@ forInStatement.ForInStatement = (path, {print, indent}) => {
57980
57975
  var exportDefaultDeclaration = {};
57981
57976
 
57982
57977
  const {types: types$v} = bundle;
57983
- const {isNext: isNext$9} = is$3;
57978
+ const {isNext: isNext$a} = is$3;
57984
57979
 
57985
57980
  const {
57986
57981
  isVariableDeclaration: isVariableDeclaration$1,
57987
- isFunction: isFunction$2,
57982
+ isFunction: isFunction$3,
57988
57983
  } = types$v;
57989
57984
 
57990
57985
  function shouldAddSemicolon(path) {
@@ -58001,7 +57996,7 @@ exportDefaultDeclaration.ExportDefaultDeclaration = {
58001
57996
  traverse(declaration);
58002
57997
  maybe.print(shouldAddSemicolon(declaration), ';');
58003
57998
  },
58004
- afterSatisfy: () => [isNext$9],
57999
+ afterSatisfy: () => [isNext$a],
58005
58000
  after(path, {print, maybe}) {
58006
58001
  print.newline();
58007
58002
  maybe.print.newline(!isVarAfterFn(path));
@@ -58016,7 +58011,7 @@ function isVarAfterFn(path) {
58016
58011
 
58017
58012
  const {declaration} = path.node;
58018
58013
 
58019
- return isFunction$2(declaration);
58014
+ return isFunction$3(declaration);
58020
58015
  }
58021
58016
 
58022
58017
  var breakStatement = {};
@@ -58149,6 +58144,39 @@ emptyStatement.EmptyStatement = (path, {write, maybe}) => {
58149
58144
  maybe.write.newline(!isLast$3(path) && !isLast$3(parentPath));
58150
58145
  };
58151
58146
 
58147
+ var withStatement = {};
58148
+
58149
+ const {isNext: isNext$9} = is$3;
58150
+ const {markAfter: markAfter$3} = mark;
58151
+
58152
+ withStatement.WithStatement = {
58153
+ print(path, {print, indent}) {
58154
+ indent();
58155
+ print('with');
58156
+ print.space();
58157
+ print('(');
58158
+ print('__object');
58159
+ print(')');
58160
+
58161
+ if (path.node.body.body) {
58162
+ print.space();
58163
+ print('__body');
58164
+ } else {
58165
+ indent.inc();
58166
+ print.newline();
58167
+ print('__body');
58168
+ indent.dec();
58169
+ }
58170
+ },
58171
+ afterIf(path) {
58172
+ return isNext$9(path);
58173
+ },
58174
+ after(path, {print}) {
58175
+ print.linebreak();
58176
+ markAfter$3(path);
58177
+ },
58178
+ };
58179
+
58152
58180
  const {ExpressionStatement} = expressionStatementExports;
58153
58181
  const {VariableDeclaration} = variableDeclaration;
58154
58182
  const {IfStatement} = ifStatement;
@@ -58172,6 +58200,7 @@ const {Program} = program$1;
58172
58200
  const {ContinueStatement} = continueStatement;
58173
58201
  const {LabeledStatement} = labeledStatement;
58174
58202
  const {EmptyStatement} = emptyStatement;
58203
+ const {WithStatement} = withStatement;
58175
58204
 
58176
58205
  const {
58177
58206
  ExportNamespaceSpecifier,
@@ -58208,18 +58237,19 @@ var statements$2 = {
58208
58237
  BreakStatement,
58209
58238
  ContinueStatement,
58210
58239
  WhileStatement,
58240
+ WithStatement,
58211
58241
  };
58212
58242
 
58213
58243
  var templateLiteral = {};
58214
58244
 
58215
- templateLiteral.TemplateLiteral = (path, {write, traverse}) => {
58245
+ var writeTemplateLiteral$2 = {};
58246
+
58247
+ writeTemplateLiteral$2.writeTemplateLiteral = (quasis, expressions, {write, traverse}) => {
58216
58248
  write('`');
58217
-
58218
58249
  let i = 0;
58219
- const expressions = path.get('expressions');
58220
58250
 
58221
- for (const element of path.node.quasis) {
58222
- write(element.value.raw);
58251
+ for (const element of quasis) {
58252
+ write(element.node.value.raw);
58223
58253
 
58224
58254
  const exp = expressions[i++];
58225
58255
 
@@ -58233,6 +58263,15 @@ templateLiteral.TemplateLiteral = (path, {write, traverse}) => {
58233
58263
  write('`');
58234
58264
  };
58235
58265
 
58266
+ const {writeTemplateLiteral: writeTemplateLiteral$1} = writeTemplateLiteral$2;
58267
+
58268
+ templateLiteral.TemplateLiteral = (path, printer) => {
58269
+ const expressions = path.get('expressions');
58270
+ const quasis = path.get('quasis');
58271
+
58272
+ writeTemplateLiteral$1(quasis, expressions, printer);
58273
+ };
58274
+
58236
58275
  var identifier$2 = {};
58237
58276
 
58238
58277
  var maybeGet = {};
@@ -58603,12 +58642,10 @@ tsTypeParameter.TSTypeParameter = (path, {write, traverse}) => {
58603
58642
 
58604
58643
  write(path.node.name.name);
58605
58644
 
58606
- if (!exists(constraint))
58607
- return;
58608
-
58609
- write(' extends ');
58610
-
58611
- traverse(constraint);
58645
+ if (exists(constraint)) {
58646
+ write(' extends ');
58647
+ traverse(constraint);
58648
+ }
58612
58649
 
58613
58650
  const defaultPath = path.get('default');
58614
58651
 
@@ -59312,6 +59349,24 @@ tsParenthesizedType$2.TSParenthesizedType = (path, {print}) => {
59312
59349
  print(')');
59313
59350
  };
59314
59351
 
59352
+ var tsTemplateLiteralType = {};
59353
+
59354
+ const {writeTemplateLiteral} = writeTemplateLiteral$2;
59355
+
59356
+ tsTemplateLiteralType.TSTemplateLiteralType = (path, printer) => {
59357
+ const quasis = path.get('quasis');
59358
+ const types = path.get('types');
59359
+
59360
+ writeTemplateLiteral(quasis, types, printer);
59361
+ };
59362
+
59363
+ var tsOptionalType = {};
59364
+
59365
+ tsOptionalType.TSOptionalType = (path, {print}) => {
59366
+ print('__typeAnnotation');
59367
+ print('?');
59368
+ };
59369
+
59315
59370
  const {isNext: isNext$1} = is$3;
59316
59371
  const {TSTypeLiteral} = tsTypeLiteral;
59317
59372
  const {TSTypeAliasDeclaration} = tsTypeAliasDeclaration;
@@ -59351,6 +59406,8 @@ const {TSInferType} = tsInferType;
59351
59406
  const {TSParameterProperty} = tsParameterPropertyExports;
59352
59407
  const {TSTypeQuery} = tsTypeQuery;
59353
59408
  const {TSParenthesizedType} = tsParenthesizedType$2;
59409
+ const {TSTemplateLiteralType} = tsTemplateLiteralType;
59410
+ const {TSOptionalType} = tsOptionalType;
59354
59411
 
59355
59412
  var typescript$2 = {
59356
59413
  TSAsExpression,
@@ -59367,6 +59424,8 @@ var typescript$2 = {
59367
59424
  TSImportType,
59368
59425
  TSUnionType,
59369
59426
  TSTypeQuery,
59427
+ TSTemplateLiteralType,
59428
+ TSOptionalType,
59370
59429
  TSBigIntKeyword(path, {write}) {
59371
59430
  write('bigint');
59372
59431
  },
@@ -59527,7 +59586,13 @@ var typescript$2 = {
59527
59586
  var jsxElement = {};
59528
59587
 
59529
59588
  const {types: types$r} = bundle;
59530
- const {isJSXElement: isJSXElement$2} = types$r;
59589
+ const {
59590
+ isJSXElement: isJSXElement$2,
59591
+ isJSXExpressionContainer,
59592
+ isFunction: isFunction$2,
59593
+ isJSXSpreadAttribute,
59594
+ } = types$r;
59595
+
59531
59596
  const isInsideArrow = ({parentPath}) => parentPath.isArrowFunctionExpression();
59532
59597
 
59533
59598
  jsxElement.JSXElement = {
@@ -59587,10 +59652,29 @@ function condition$1(path) {
59587
59652
  return path.parentPath.isVariableDeclarator();
59588
59653
  }
59589
59654
 
59590
- function isNeedIndent(path) {
59591
- const attributesCount = path.node.openingElement.attributes.length;
59655
+ function hasComplexAttribute(path) {
59656
+ const {attributes} = path.node.openingElement;
59592
59657
 
59593
- if (attributesCount > 2)
59658
+ for (const attribute of attributes) {
59659
+ const {value} = attribute;
59660
+
59661
+ if (isJSXSpreadAttribute(attribute))
59662
+ return true;
59663
+
59664
+ if (!isJSXExpressionContainer(value))
59665
+ continue;
59666
+
59667
+ const {expression} = value;
59668
+
59669
+ if (isFunction$2(expression))
59670
+ return true;
59671
+ }
59672
+
59673
+ return false;
59674
+ }
59675
+
59676
+ function isNeedIndent(path) {
59677
+ if (hasComplexAttribute(path))
59594
59678
  return false;
59595
59679
 
59596
59680
  const insideFn = path.parentPath.isArrowFunctionExpression();
@@ -61521,7 +61605,6 @@ babel$1.parse = function babelParse(source, overrides) {
61521
61605
  const parserOptions = {
61522
61606
  sourceFileName,
61523
61607
  sourceType: 'module',
61524
- tokens: true,
61525
61608
  ...options,
61526
61609
  errorRecovery: isRecovery,
61527
61610
  plugins: clean([
@@ -61537,6 +61620,7 @@ babel$1.parse = function babelParse(source, overrides) {
61537
61620
  if (printer === 'babel')
61538
61621
  assign$5(parserOptions, {
61539
61622
  createParenthesizedExpressions: true,
61623
+ tokens: true,
61540
61624
  });
61541
61625
 
61542
61626
  const ast = parse(source, parserOptions);
@@ -62803,7 +62887,7 @@ filterEnabledPlugins$2.filterEnabledPlugins = ({plugins, cookedRules}) => {
62803
62887
 
62804
62888
  const [status, currentPlugin] = maybeTuple(plugin);
62805
62889
 
62806
- if (!isExectRuleEnabled(name, status, cookedRules))
62890
+ if (!isExactRuleEnabled(name, status, cookedRules))
62807
62891
  continue;
62808
62892
 
62809
62893
  result.push(mergeRules(
@@ -62815,7 +62899,7 @@ filterEnabledPlugins$2.filterEnabledPlugins = ({plugins, cookedRules}) => {
62815
62899
  return result;
62816
62900
  };
62817
62901
 
62818
- function isExectRuleEnabled(name, status, rules) {
62902
+ function isExactRuleEnabled(name, status, rules) {
62819
62903
  if (status === 'on')
62820
62904
  return true;
62821
62905