@putout/printer 1.46.0 → 1.47.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.04.14, v1.47.0
2
+
3
+ feature:
4
+ - a102b07 @putout/printer: add support of TSTypeAssertion, TSAsExpression
5
+
1
6
  2023.04.14, v1.46.0
2
7
 
3
8
  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,17 @@ 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
+ },
72
83
  TSUndefinedKeyword(path, {write}) {
73
84
  write('undefined');
74
85
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "1.46.0",
3
+ "version": "1.47.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",