@babel/plugin-transform-typescript
Advanced tools
Comparing version 7.0.0-beta.47 to 7.0.0-beta.48
@@ -11,3 +11,3 @@ "use strict"; | ||
_assert = function _assert() { | ||
_assert = function () { | ||
return data; | ||
@@ -22,3 +22,3 @@ }; | ||
_core = function _core() { | ||
_core = function () { | ||
return data; | ||
@@ -33,3 +33,5 @@ }; | ||
function transpileEnum(path, t) { | ||
const node = path.node; | ||
const { | ||
node | ||
} = path; | ||
@@ -36,0 +38,0 @@ if (node.declare) { |
@@ -11,3 +11,3 @@ "use strict"; | ||
_helperPluginUtils = function _helperPluginUtils() { | ||
_helperPluginUtils = function () { | ||
return data; | ||
@@ -22,3 +22,3 @@ }; | ||
_pluginSyntaxTypescript = function _pluginSyntaxTypescript() { | ||
_pluginSyntaxTypescript = function () { | ||
return data; | ||
@@ -33,3 +33,3 @@ }; | ||
_core = function _core() { | ||
_core = function () { | ||
return data; | ||
@@ -72,16 +72,3 @@ }; | ||
for (var _iterator = path.get("body"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { | ||
var _ref; | ||
if (_isArray) { | ||
if (_i >= _iterator.length) break; | ||
_ref = _iterator[_i++]; | ||
} else { | ||
_i = _iterator.next(); | ||
if (_i.done) break; | ||
_ref = _i.value; | ||
} | ||
const stmt = _ref; | ||
for (const stmt of path.get("body")) { | ||
if (_core().types.isImportDeclaration(stmt)) { | ||
@@ -95,15 +82,3 @@ if (stmt.node.specifiers.length === 0) { | ||
for (var _iterator2 = stmt.node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { | ||
var _ref2; | ||
if (_isArray2) { | ||
if (_i2 >= _iterator2.length) break; | ||
_ref2 = _iterator2[_i2++]; | ||
} else { | ||
_i2 = _iterator2.next(); | ||
if (_i2.done) break; | ||
_ref2 = _i2.value; | ||
} | ||
const specifier = _ref2; | ||
for (const specifier of stmt.node.specifiers) { | ||
const binding = stmt.scope.getBinding(specifier.local.name); | ||
@@ -121,4 +96,3 @@ | ||
} else { | ||
for (var _i3 = 0; _i3 < importsToRemove.length; _i3++) { | ||
const importPath = importsToRemove[_i3]; | ||
for (const importPath of importsToRemove) { | ||
importPath.remove(); | ||
@@ -150,3 +124,5 @@ } | ||
ClassMethod(path) { | ||
const node = path.node; | ||
const { | ||
node | ||
} = path; | ||
if (node.accessibility) node.accessibility = null; | ||
@@ -162,16 +138,3 @@ if (node.abstract) node.abstract = null; | ||
for (var _iterator3 = node.params, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { | ||
var _ref3; | ||
if (_isArray3) { | ||
if (_i4 >= _iterator3.length) break; | ||
_ref3 = _iterator3[_i4++]; | ||
} else { | ||
_i4 = _iterator3.next(); | ||
if (_i4.done) break; | ||
_ref3 = _i4.value; | ||
} | ||
const param = _ref3; | ||
for (const param of node.params) { | ||
if (param.type === "TSParameterProperty") { | ||
@@ -214,3 +177,5 @@ parameterProperties.push(param.parameter); | ||
ClassProperty(path) { | ||
const node = path.node; | ||
const { | ||
node | ||
} = path; | ||
@@ -235,3 +200,5 @@ if (!node.value) { | ||
ClassDeclaration(path) { | ||
const node = path.node; | ||
const { | ||
node | ||
} = path; | ||
@@ -325,16 +292,3 @@ if (node.declare) { | ||
function isImportTypeOnly(binding, programPath) { | ||
for (var _iterator4 = binding.referencePaths, _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { | ||
var _ref4; | ||
if (_isArray4) { | ||
if (_i5 >= _iterator4.length) break; | ||
_ref4 = _iterator4[_i5++]; | ||
} else { | ||
_i5 = _iterator4.next(); | ||
if (_i5.done) break; | ||
_ref4 = _i5.value; | ||
} | ||
const path = _ref4; | ||
for (const path of binding.referencePaths) { | ||
if (!isInType(path)) { | ||
@@ -341,0 +295,0 @@ return false; |
{ | ||
"name": "@babel/plugin-transform-typescript", | ||
"version": "7.0.0-beta.47", | ||
"version": "7.0.0-beta.48", | ||
"description": "Transform TypeScript into ES.next", | ||
@@ -13,12 +13,12 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-typescript", | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.0.0-beta.47", | ||
"@babel/plugin-syntax-typescript": "7.0.0-beta.47" | ||
"@babel/helper-plugin-utils": "7.0.0-beta.48", | ||
"@babel/plugin-syntax-typescript": "7.0.0-beta.48" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "7.0.0-beta.47" | ||
"@babel/core": "7.0.0-beta.48" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.47", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.47" | ||
"@babel/core": "7.0.0-beta.48", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.48" | ||
} | ||
} |
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
15366
436
+ Added@babel/code-frame@7.0.0-beta.48(transitive)
+ Added@babel/core@7.0.0-beta.48(transitive)
+ Added@babel/generator@7.0.0-beta.48(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.48(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.48(transitive)
+ Added@babel/helper-plugin-utils@7.0.0-beta.48(transitive)
+ Added@babel/helper-split-export-declaration@7.0.0-beta.48(transitive)
+ Added@babel/helpers@7.0.0-beta.48(transitive)
+ Added@babel/highlight@7.0.0-beta.48(transitive)
+ Added@babel/parser@7.0.0-beta.48(transitive)
+ Added@babel/plugin-syntax-typescript@7.0.0-beta.48(transitive)
+ Added@babel/template@7.0.0-beta.48(transitive)
+ Added@babel/traverse@7.0.0-beta.48(transitive)
+ Added@babel/types@7.0.0-beta.48(transitive)
- Removed@babel/code-frame@7.0.0-beta.47(transitive)
- Removed@babel/core@7.0.0-beta.47(transitive)
- Removed@babel/generator@7.0.0-beta.47(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.47(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.47(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.47(transitive)
- Removed@babel/helper-split-export-declaration@7.0.0-beta.47(transitive)
- Removed@babel/helpers@7.0.0-beta.47(transitive)
- Removed@babel/highlight@7.0.0-beta.47(transitive)
- Removed@babel/plugin-syntax-typescript@7.0.0-beta.47(transitive)
- Removed@babel/template@7.0.0-beta.47(transitive)
- Removed@babel/traverse@7.0.0-beta.47(transitive)
- Removed@babel/types@7.0.0-beta.47(transitive)
- Removedbabylon@7.0.0-beta.47(transitive)