Socket
Socket
Sign inDemoInstall

vue-property-decorator

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-property-decorator - npm Package Compare versions

Comparing version 7.3.0 to 8.0.0

2

lib/vue-property-decorator.d.ts

@@ -1,2 +0,2 @@

/** vue-property-decorator verson 7.3.0 MIT LICENSE copyright 2018 kaorun343 */
/** vue-property-decorator verson 8.0.0 MIT LICENSE copyright 2018 kaorun343 */
import Vue, { PropOptions, WatchOptions } from 'vue';

@@ -3,0 +3,0 @@ import Component, { mixins } from 'vue-class-component';

@@ -1,2 +0,2 @@

/** vue-property-decorator verson 7.3.0 MIT LICENSE copyright 2018 kaorun343 */
/** vue-property-decorator verson 8.0.0 MIT LICENSE copyright 2018 kaorun343 */
'use strict';

@@ -3,0 +3,0 @@ import Vue from 'vue';

@@ -10,3 +10,3 @@ (function (global, factory) {

/** vue-property-decorator verson 7.3.0 MIT LICENSE copyright 2018 kaorun343 */
/** vue-property-decorator verson 8.0.0 MIT LICENSE copyright 2018 kaorun343 */
'use strict';

@@ -13,0 +13,0 @@ /**

{
"name": "vue-property-decorator",
"version": "7.3.0",
"version": "8.0.0",
"description": "property decorators for Vue Component",

@@ -38,3 +38,3 @@ "main": "lib/vue-property-decorator.umd.js",

"dependencies": {
"vue-class-component": "^6.2.0"
"vue-class-component": "^7.0.1"
},

@@ -41,0 +41,0 @@ "repository": {

@@ -22,12 +22,12 @@ # Vue Property Decorator

* `@Emit`
* `@Inject`
* `@Model`
* `@Prop`
* `@Provide`
* `@Watch`
* [`@Emit`](#Emit)
* [`@Inject`](#Provide)
* [`@Model`](#Model)
* [`@Prop`](#Prop)
* [`@Provide`](#Provide)
* [`@Watch`](#Watch)
* `@Component` (**provided by** [vue-class-component](https://github.com/vuejs/vue-class-component))
* `Mixins` (the helper function named `mixins` **provided by** [vue-class-component](https://github.com/vuejs/vue-class-component))
### `@Prop(options: (PropOptions | Constructor[] | Constructor) = {})` decorator
### <a id="Prop"></a> `@Prop(options: (PropOptions | Constructor[] | Constructor) = {})` decorator

@@ -39,5 +39,5 @@ ```ts

export default class YourComponent extends Vue {
@Prop(Number) propA!: number
@Prop({ default: 'default value' }) propB!: string
@Prop([String, Boolean]) propC!: string | boolean
@Prop(Number) readonly propA!: number
@Prop({ default: 'default value' }) readonly propB!: string
@Prop([String, Boolean]) readonly propC!: string | boolean
}

@@ -69,3 +69,3 @@ ```

### `@Model(event?: string, options: (PropOptions | Constructor[] | Constructor) = {})` decorator
### <a id="Model"></a> `@Model(event?: string, options: (PropOptions | Constructor[] | Constructor) = {})` decorator

@@ -77,3 +77,3 @@ ```ts

export default class YourComponent extends Vue {
@Model('change', { type: Boolean }) checked!: boolean
@Model('change', { type: Boolean }) readonly checked!: boolean
}

@@ -98,3 +98,3 @@ ```

### `@Watch(path: string, options: WatchOptions = {})` decorator
### <a id="Watch"></a> `@Watch(path: string, options: WatchOptions = {})` decorator

@@ -113,3 +113,3 @@ ```ts

@Watch('person')
onChildChanged2(val: Person, oldVal: Person) { }
onPersonChanged2(val: Person, oldVal: Person) { }
}

@@ -151,3 +151,3 @@ ```

### `@Emit(event?: string)` decorator
### <a id="Emit"></a> `@Emit(event?: string)` decorator

@@ -227,3 +227,3 @@ The functions decorated by `@Emit` `$emit` their return value followed by their original arguments. If the return value is a promise, it is resolved before being emitted.

### `@Provide(key?: string | symbol)` / `@Inject(options?: { from?: InjectKey, default?: any } | InjectKey)` decorator
### <a id="Provide"></a> `@Provide(key?: string | symbol)` / `@Inject(options?: { from?: InjectKey, default?: any } | InjectKey)` decorator

@@ -237,6 +237,6 @@ ```ts

export class MyComponent extends Vue {
@Inject() foo!: string
@Inject('bar') bar!: string
@Inject({ from: 'optional', default: 'default' }) optional!: string
@Inject(symbol) baz!: string
@Inject() readonly foo!: string
@Inject('bar') readonly bar!: string
@Inject({ from: 'optional', default: 'default' }) readonly optional!: string
@Inject(symbol) readonly baz!: string

@@ -243,0 +243,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc