🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@hqjs/babel-plugin-add-type-metadata

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hqjs/babel-plugin-add-type-metadata

Add plugin metadata

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

babel-plugin-add-type-metadata

Add types metadata

Installation

npm install hqjs@babel-plugin-add-type-metadata

Transformation

Plugin adds type metadata from constructor to classes to help Angular e.g.

...
import { MessageService } from './message.service';

@Injectable({
  providedIn: 'root',
})
export class HeroService {

  constructor(private messageService: MessageService) { }

  ...
}

will turn into

...
import { MessageService } from './message.service';

@Injectable({
  providedIn: 'root',
})
export class HeroService {

  static "ctorParameters"() {
    return [{
      "type": HeroService
    }];
  }

  constructor(private messageService: MessageService) { }

  ...
}

that works nice with decorator plugin.

Keywords

babel

FAQs

Package last updated on 21 Jul 2020

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