Socket
Socket
Sign inDemoInstall

@babel/plugin-syntax-decorators

Package Overview
Dependencies
54
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @babel/plugin-syntax-decorators

Allow parsing of decorators


Version published
Maintainers
5
Install size
12.0 kB
Created

Package description

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

Readme

Source

@babel/plugin-syntax-decorators

Allow parsing of decorators

See our website @babel/plugin-syntax-decorators for more information.

Install

Using npm:

npm install --save-dev @babel/plugin-syntax-decorators

or using yarn:

yarn add @babel/plugin-syntax-decorators --dev

Keywords

FAQs

Last updated on 27 Aug 2018

Did you know?

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

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