@babel/plugin-proposal-decorators
Advanced tools
Comparing version 7.1.0 to 7.1.1
@@ -45,4 +45,8 @@ "use strict"; | ||
function value(body, params = []) { | ||
return _core().types.objectMethod("method", _core().types.identifier("value"), params, body); | ||
function value(body, params = [], async, generator) { | ||
const method = _core().types.objectMethod("method", _core().types.identifier("value"), params, body); | ||
method.async = !!async; | ||
method.generator = !!generator; | ||
return method; | ||
} | ||
@@ -110,3 +114,3 @@ | ||
}, true).replace(); | ||
const properties = [prop("kind", _core().types.stringLiteral(isMethod ? node.kind : "field")), prop("decorators", takeDecorators(path)), prop("static", node.static && _core().types.booleanLiteral(true)), prop("key", getKey(node)), isMethod ? value(node.body, node.params) : node.value ? value(_core().template.ast`{ return ${node.value} }`) : prop("value", scope.buildUndefinedNode())].filter(Boolean); | ||
const properties = [prop("kind", _core().types.stringLiteral(isMethod ? node.kind : "field")), prop("decorators", takeDecorators(path)), prop("static", node.static && _core().types.booleanLiteral(true)), prop("key", getKey(node)), isMethod ? value(node.body, node.params, node.async, node.generator) : node.value ? value(_core().template.ast`{ return ${node.value} }`) : prop("value", scope.buildUndefinedNode())].filter(Boolean); | ||
return _core().types.objectExpression(properties); | ||
@@ -113,0 +117,0 @@ } |
{ | ||
"name": "@babel/plugin-proposal-decorators", | ||
"version": "7.1.0", | ||
"version": "7.1.1", | ||
"author": "Logan Smyth <loganfsmyth@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18811
394