🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

babel-plugin-transform-typescript-metadata

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-typescript-metadata

Babel plugin to emit decorator metadata like typescript compiler

0.3.2
latest
Source
npm
Version published
Maintainers
1
Created

What is babel-plugin-transform-typescript-metadata?

babel-plugin-transform-typescript-metadata is a Babel plugin that enables the transformation of TypeScript metadata for use with decorators. This is particularly useful for libraries that rely on metadata reflection, such as dependency injection frameworks.

What are babel-plugin-transform-typescript-metadata's main functionalities?

Transform TypeScript Metadata

This feature allows the transformation of TypeScript metadata, making it available for use with decorators. This is particularly useful for dependency injection frameworks that rely on metadata reflection.

/* .babelrc */
{
  "plugins": [
    "babel-plugin-transform-typescript-metadata"
  ]
}

/* Example TypeScript file */
import 'reflect-metadata';

class Example {
  constructor(@Inject('MyService') private myService: MyService) {}
}

// After transformation, metadata about the 'myService' parameter will be available

Other packages similar to babel-plugin-transform-typescript-metadata

Keywords

babel

FAQs

Package last updated on 19 Mar 2021

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