# vue-class-decorators

> class decorators for Vue Component

Latest version **1.0.13** (published 2016-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-class-decorators
pnpm add vue-class-decorators
yarn add vue-class-decorators
bun add vue-class-decorators
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2016-11-19 |
| First published | 2016-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Gust |
| Maintainers | davidgust |
| Keywords | vue, typescript, decorator |

## Links

- npm: https://www.npmjs.com/package/vue-class-decorators
- Repository: https://github.com/gdeividas/vue-class-decorators
- Homepage: https://github.com/gdeividas/vue-class-decorators#readme
- Issues: https://github.com/gdeividas/vue-class-decorators/issues
- npm.io page: https://npm.io/package/vue-class-decorators

## Dependencies (1)

- [vue-class-component](https://npm.io/package/vue-class-component.md) ^4.3.1

## 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.0.13 (latest) — 2016-11-19
- 1.0.12 — 2016-11-19
- 1.0.11 — 2016-11-19
- 1.0.10 — 2016-11-18
- 1.0.9 — 2016-11-18
- 1.0.8 — 2016-11-18
- 1.0.7 — 2016-11-16
- 1.0.6 — 2016-11-16
- 1.0.5 — 2016-11-16
- 1.0.4 — 2016-11-16
- 1.0.3 — 2016-11-16
- 1.0.2 — 2016-11-16
- 1.0.1 — 2016-11-15
- 1.0.0 — 2016-11-15

## README

# Vue Class Decorators

This library fully depends on [vue-class-component](https://github.com/vuejs/vue-class-component).

## License
MIT License

## Install
```
npm i -S vue-class-decorators
```

## Usage
```typescript
'use strict';
import { Component, prop, watch } from 'vue-class-decorators';

@Component({})
export class Component {
    @prop(Number)
    propA: number;

    @prop({
      type: String,
      default: 'default value'
    })
    propB: string;

    @watch('child')
    onChildChanged(val: string, oldVal: string) {}
}

```

becomes

```js
'use strict'
export const Component = Vue.extend({
    props: {
        propA: Number,
        propB: {
            type: String,
            required: true,
            default: ''
        }
    },
    methods: {
        onChildChanged(val, oldVal) {}
    },
    watch: {
        'child': 'onChildChanged'
    }
})
```

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