@babel/plugin-transform-typescript
Advanced tools
Comparing version 7.12.16 to 7.12.17
@@ -340,16 +340,25 @@ "use strict"; | ||
Function({ | ||
node | ||
}) { | ||
Function(path) { | ||
const { | ||
node, | ||
scope | ||
} = path; | ||
if (node.typeParameters) node.typeParameters = null; | ||
if (node.returnType) node.returnType = null; | ||
const p0 = node.params[0]; | ||
const params = node.params; | ||
if (p0 && _core.types.isIdentifier(p0) && p0.name === "this") { | ||
node.params.shift(); | ||
if (params.length > 0 && _core.types.isIdentifier(params[0], { | ||
name: "this" | ||
})) { | ||
params.shift(); | ||
} | ||
node.params = node.params.map(p => { | ||
return p.type === "TSParameterProperty" ? p.parameter : p; | ||
}); | ||
const paramsPath = path.get("params"); | ||
for (const p of paramsPath) { | ||
if (p.type === "TSParameterProperty") { | ||
p.replaceWith(p.get("parameter")); | ||
scope.registerBinding("param", p); | ||
} | ||
} | ||
}, | ||
@@ -356,0 +365,0 @@ |
{ | ||
"name": "@babel/plugin-transform-typescript", | ||
"version": "7.12.16", | ||
"version": "7.12.17", | ||
"description": "Transform TypeScript into ES.next", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-create-class-features-plugin": "^7.12.16", | ||
"@babel/helper-create-class-features-plugin": "^7.12.17", | ||
"@babel/helper-plugin-utils": "^7.12.13", | ||
@@ -29,3 +29,3 @@ "@babel/plugin-syntax-typescript": "^7.12.13" | ||
"devDependencies": { | ||
"@babel/core": "7.12.16", | ||
"@babel/core": "7.12.17", | ||
"@babel/helper-plugin-test-runner": "7.12.13" | ||
@@ -32,0 +32,0 @@ }, |
26286
6
712
- Removedelectron-to-chromium@1.4.798(transitive)