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

> Add plugin metadata

Latest version **0.0.4** (published 2020-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hqjs/babel-plugin-add-type-metadata
pnpm add @hqjs/babel-plugin-add-type-metadata
yarn add @hqjs/babel-plugin-add-type-metadata
bun add @hqjs/babel-plugin-add-type-metadata
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2020-07-21 |
| First published | 2018-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hqjs |
| Maintainers | hqjs |
| Keywords | babel, plugin, hq, types, metadata, amgular |

## Links

- npm: https://www.npmjs.com/package/@hqjs/babel-plugin-add-type-metadata
- Repository: https://github.com/hqjs/babel-plugin-add-type-metadata
- Homepage: https://hqjs.org
- Issues: https://github.com/hqjs/babel-plugin-add-type-metadata/issues
- npm.io page: https://npm.io/package/@hqjs/babel-plugin-add-type-metadata

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2020-07-21
- 0.0.3 — 2020-03-27
- 0.0.2 — 2019-07-22
- 0.0.1 — 2018-10-24

## README

# babel-plugin-add-type-metadata
Add types metadata

# Installation
```sh
npm install hqjs@babel-plugin-add-type-metadata
```

# Transformation
Plugin adds type metadata from constructor to classes to help Angular e.g.
```ts
...
import { MessageService } from './message.service';

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

  constructor(private messageService: MessageService) { }

  ...
}
```

will turn into
```ts
...
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.

---
_Source: https://npm.io/package/@hqjs/babel-plugin-add-type-metadata · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
