Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-typescript

Package Overview
Dependencies
61
Maintainers
6
Versions
128
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.12.16 to 7.12.17

LICENSE

27

lib/index.js

@@ -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 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc