Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-syntax-typescript

Package Overview
Dependencies
Maintainers
4
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-syntax-typescript - npm Package Compare versions

Comparing version 7.20.0 to 7.21.4

72

lib/index.js

@@ -7,53 +7,51 @@ "use strict";

exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
function removePlugin(plugins, name) {
const indices = [];
plugins.forEach((plugin, i) => {
const n = Array.isArray(plugin) ? plugin[0] : plugin;
if (n === name) {
indices.unshift(i);
{
var removePlugin = function (plugins, name) {
const indices = [];
plugins.forEach((plugin, i) => {
const n = Array.isArray(plugin) ? plugin[0] : plugin;
if (n === name) {
indices.unshift(i);
}
});
for (const i of indices) {
plugins.splice(i, 1);
}
});
for (const i of indices) {
plugins.splice(i, 1);
}
};
}
var _default = (0, _helperPluginUtils.declare)((api, {
disallowAmbiguousJSXLike,
dts,
isTSX
}) => {
var _default = (0, _helperPluginUtils.declare)((api, opts) => {
api.assertVersion(7);
const {
disallowAmbiguousJSXLike,
dts
} = opts;
{
var {
isTSX
} = opts;
}
return {
name: "syntax-typescript",
manipulateOptions(opts, parserOpts) {
const {
plugins
} = parserOpts;
removePlugin(plugins, "flow");
removePlugin(plugins, "jsx");
plugins.push(["typescript", {
{
const {
plugins
} = parserOpts;
removePlugin(plugins, "flow");
removePlugin(plugins, "jsx");
plugins.push("objectRestSpread", "classProperties");
if (isTSX) {
plugins.push("jsx");
}
}
parserOpts.plugins.push(["typescript", {
disallowAmbiguousJSXLike,
dts
}], "classProperties");
{
plugins.push("objectRestSpread");
}
if (isTSX) {
plugins.push("jsx");
}
}]);
}
};
});
exports.default = _default;
//# sourceMappingURL=index.js.map
{
"name": "@babel/plugin-syntax-typescript",
"version": "7.20.0",
"version": "7.21.4",
"description": "Allow parsing of TypeScript syntax",

@@ -21,3 +21,3 @@ "repository": {

"dependencies": {
"@babel/helper-plugin-utils": "^7.19.0"
"@babel/helper-plugin-utils": "^7.20.2"
},

@@ -28,3 +28,3 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "^7.19.6",
"@babel/core": "^7.21.4",
"@babel/helper-plugin-test-runner": "^7.18.6"

@@ -31,0 +31,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc