🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@babel/plugin-syntax-decorators

Package Overview
Dependencies
Maintainers
4
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-syntax-decorators

Allow parsing of decorators

7.27.1
latest
Source
npm
Version published
Weekly downloads
11M
12.22%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-syntax-decorators?

The @babel/plugin-syntax-decorators package is a plugin for Babel, a JavaScript compiler, that allows Babel to parse and understand decorator syntax. Decorators are a stage 2 proposal for JavaScript and provide a way to add annotations and a meta-programming syntax for class declarations and members. Decorators can be used to annotate and modify classes and properties at design time.

What are @babel/plugin-syntax-decorators's main functionalities?

Parsing decorator syntax

This feature enables Babel to parse decorators, which are annotations placed directly above class declarations, methods, or properties. The code sample shows a simple decorator applied to a class.

@decorator
class MyClass {}
function decorator(target) {
  // modify target
}

Other packages similar to @babel/plugin-syntax-decorators

Keywords

babel-plugin

FAQs

Package last updated on 30 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts