nesquick 0.0.12 → 0.0.13
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/lib/cli/transformer.js +1 -7
- package/package.json +1 -1
package/lib/cli/transformer.js
CHANGED
|
@@ -36,12 +36,6 @@ function hasIdentifier(node) {
|
|
|
36
36
|
const transformer = context => {
|
|
37
37
|
return sourceFile => {
|
|
38
38
|
const visitorGeneric = node => {
|
|
39
|
-
if (TS.isJsxAttribute(node)) {
|
|
40
|
-
return TS.visitEachChild(node, visitorAttribute, context);
|
|
41
|
-
}
|
|
42
|
-
return TS.visitEachChild(node, visitorGeneric, context);
|
|
43
|
-
};
|
|
44
|
-
const visitorAttribute = node => {
|
|
45
39
|
if (TS.isJsxExpression(node)) {
|
|
46
40
|
return TS.visitEachChild(node, visitorExpression, context);
|
|
47
41
|
}
|
|
@@ -63,7 +57,7 @@ const transformer = context => {
|
|
|
63
57
|
return TS.factory.createArrowFunction(undefined, undefined, [], undefined, TS.factory.createToken(TS.SyntaxKind.EqualsGreaterThanToken), node);
|
|
64
58
|
}
|
|
65
59
|
}
|
|
66
|
-
else if (TS.isExpression(node) && hasIdentifier(node)) {
|
|
60
|
+
else if (!TS.isFunctionLike(node) && TS.isExpression(node) && hasIdentifier(node)) {
|
|
67
61
|
return TS.factory.createArrowFunction(undefined, undefined, [], undefined, TS.factory.createToken(TS.SyntaxKind.EqualsGreaterThanToken), node);
|
|
68
62
|
}
|
|
69
63
|
return node;
|