@putout/printer 3.0.0 → 3.0.2
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,17 @@
|
|
|
1
|
+
2023.08.09, v3.0.2
|
|
2
|
+
|
|
3
|
+
fix:
|
|
4
|
+
- d3af233 @putout/printer: generator
|
|
5
|
+
|
|
6
|
+
feature:
|
|
7
|
+
- b7ce82b 2putout/printer: TSFunctionType: parens
|
|
8
|
+
- ef67c67 @putout/printer: drop support of Babel < 8
|
|
9
|
+
|
|
10
|
+
2023.08.05, v3.0.1
|
|
11
|
+
|
|
12
|
+
feature:
|
|
13
|
+
- 3528d83 2putout/printer: TSFunctionType: parens
|
|
14
|
+
|
|
1
15
|
2023.08.05, v3.0.0
|
|
2
16
|
|
|
3
17
|
feature:
|
|
@@ -15,8 +15,14 @@ module.exports.FunctionDeclaration = {
|
|
|
15
15
|
|
|
16
16
|
maybe.print(async, 'async ');
|
|
17
17
|
|
|
18
|
-
print('function
|
|
19
|
-
|
|
18
|
+
print('function');
|
|
19
|
+
|
|
20
|
+
if (!generator) {
|
|
21
|
+
print(' ');
|
|
22
|
+
} else {
|
|
23
|
+
print('*');
|
|
24
|
+
print.space();
|
|
25
|
+
}
|
|
20
26
|
|
|
21
27
|
print('__id');
|
|
22
28
|
print('__typeParameters');
|
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
const {printParams} = require('../../expressions/function/params');
|
|
4
4
|
const {printReturnType} = require('./print-return-type');
|
|
5
|
+
const {
|
|
6
|
+
maybeParenOpen,
|
|
7
|
+
maybeParenClose,
|
|
8
|
+
} = require('../../expressions/unary-expression/parens');
|
|
5
9
|
|
|
6
10
|
module.exports.TSFunctionType = (path, printer, semantics) => {
|
|
7
11
|
const {print} = printer;
|
|
8
12
|
|
|
13
|
+
maybeParenOpen(path, printer);
|
|
9
14
|
printParams(path, printer, semantics);
|
|
10
15
|
print.space();
|
|
11
16
|
print('=>');
|
|
12
17
|
print.space();
|
|
13
18
|
printReturnType(path, printer);
|
|
19
|
+
maybeParenClose(path, printer);
|
|
14
20
|
};
|
package/package.json
CHANGED