# decorator-make

> ```js const deco = makePropertyDecorator(); ```

Latest version **1.6.0** (published 2026-04-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install decorator-make
pnpm add decorator-make
yarn add decorator-make
bun add decorator-make
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.6.0 |
| Published | 2026-04-17 |
| First published | 2023-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | YeFei |
| Maintainers | yefei777 |
| Keywords | reflect-metadata, utils, decorator, typescript |

## Links

- npm: https://www.npmjs.com/package/decorator-make
- npm.io page: https://npm.io/package/decorator-make

## Dependencies (1)

- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.2.2

## 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

- 1.6.0 (latest) — 2026-04-17
- 1.5.0 — 2024-09-05
- 1.4.1 — 2024-09-05
- 1.4.0 — 2024-09-05
- 1.3.1 — 2023-03-10
- 1.3.0 — 2023-02-25
- 1.2.0 — 2023-02-25
- 1.1.0 — 2023-02-24
- 1.0.0 — 2023-02-24

## README

# decorator-make

## Property Decorator

```js
const deco = makePropertyDecorator();
```

### TypeScript with experimentalDecorators & emitDecoratorMetadata
```ts
class Target {
  @deco.decorate prop: Type;
}
```

### JavaScript
```js
class Target {
}
deco.decorate(Target.prototype, 'prop', Type);
```

### Get Types
```js
deco.getTypes(Target.prototype);
```

## Method Decorator

```js
const deco = makeMethodDecorator();
```

### TypeScript with experimentalDecorators & emitDecoratorMetadata
```ts
class Target {
  @deco.decorate someFunc(type?: Type, ...) {}
}
```

### JavaScript
```js
class Target {
  someFunc(type, ...) {}
}
deco.decorate(Target.prototype, 'someFunc', [Type, ...]);
```

### Get Methods
```js
deco.getMethods(Target.prototype);
```

## Class Decorator

```js
const deco = makeClassDecorator();
```

### TypeScript with experimentalDecorators & emitDecoratorMetadata
```ts
@deco.decorate class Target {}
```

### JavaScript
```js
class Target {}
deco.decorate(Target);
```

### Get Value
```js
deco.getValue(Target); // return true
```

## tsconfig.json

```json
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
  }
}
```

---
_Source: https://npm.io/package/decorator-make · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
