@putout/printer 5.21.0 → 5.22.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/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2023.10.05, v5.22.0
2
+
3
+ feature:
4
+ - 8a98fa5 @putout/printer: TSTypeParameter inside TSMappedType: extends -> in (coderaiser/putout#185)
5
+
1
6
  2023.10.03, v5.21.0
2
7
 
3
8
  feature:
package/README.md CHANGED
@@ -283,7 +283,7 @@ print(ast, {
283
283
  });
284
284
  ```
285
285
 
286
- This is the same as `write('__left')` but more low-level, and supports only objects.
286
+ This is the same as `print('__left')` but more low-level, and supports only objects.
287
287
 
288
288
  ## Speed Comparison
289
289
 
@@ -3,7 +3,7 @@
3
3
  const {isNext} = require('../is');
4
4
  const {TSTypeLiteral} = require('./type/ts-type-literal');
5
5
  const {TSTypeAliasDeclaration} = require('./type/ts-type-alias-declaration');
6
- const {TSMappedType} = require('./ts-mapped-type');
6
+ const {TSMappedType} = require('./mapped-type/ts-mapped-type');
7
7
  const {TSConditionalType} = require('./ts-conditional-type');
8
8
  const {TSTypeParameter} = require('./type/ts-type-parameter');
9
9
  const {TSDeclareFunction} = require('./function/ts-declare-function');
@@ -17,7 +17,7 @@ module.exports.TSTypeParameter = (path, {write, traverse}) => {
17
17
  if (!exists(constraint))
18
18
  return;
19
19
 
20
- if (constraint.isTSTypeOperator()) {
20
+ if (constraint.isTSTypeOperator() || path.parentPath.isTSMappedType()) {
21
21
  write(' in ');
22
22
  } else {
23
23
  write(' extends ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "5.21.0",
3
+ "version": "5.22.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Simplest possible opinionated Babel AST printer for 🐊Putout",