@putout/printer 1.46.0 → 1.48.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,13 @@
1
+ 2023.04.14, v1.48.0
2
+
3
+ feature:
4
+ - d92667a @putout/printer: add support of TSParenthesizedType
5
+
6
+ 2023.04.14, v1.47.0
7
+
8
+ feature:
9
+ - a102b07 @putout/printer: add support of TSTypeAssertion, TSAsExpression
10
+
1
11
  2023.04.14, v1.46.0
2
12
 
3
13
  feature:
package/README.md CHANGED
@@ -11,6 +11,7 @@ Prints [**Babel AST**](https://github.com/coderaiser/estree-to-babel) to readabl
11
11
  - ☝️ Easily extandable with help of [Overrides](h#overrides).
12
12
 
13
13
  Supports:
14
+
14
15
  - ✅ **ES2023**;
15
16
  - ✅ **JSX**;
16
17
  - ✅ **TypeScript**;
@@ -69,6 +69,22 @@ module.exports = {
69
69
  indent.dec();
70
70
  write('}');
71
71
  },
72
+ TSTypeAssertion(path, {print}) {
73
+ print('<');
74
+ print('__typeAnnotation');
75
+ print('>');
76
+ print('__expression');
77
+ },
78
+ TSAsExpression(path, {print}) {
79
+ print('__expression');
80
+ print(' as ');
81
+ print('__typeAnnotation');
82
+ },
83
+ TSParenthesizedType(path, {print}) {
84
+ print('(');
85
+ print('__typeAnnotation');
86
+ print(')');
87
+ },
72
88
  TSUndefinedKeyword(path, {write}) {
73
89
  write('undefined');
74
90
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "1.46.0",
3
+ "version": "1.48.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Easiest possible opinionated Babel AST printer made with ❤️ to use in 🐊Putout",