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 3.1.0 to 3.2.0

3

lib/vue-property-decorator.d.ts
import * as Vue from "vue";
import VueClassComponent from "vue-class-component";
/**

@@ -17,2 +18,2 @@ * decorator of a prop

export declare function watch(path: string, options?: Vue.WatchOptions): MethodDecorator;
export declare function Component<V extends Vue>(options: Vue.ComponentOptions<V>): ClassDecorator;
export declare const Component: typeof VueClassComponent;

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

/* vue-property-decorator verson 3.1.0 MIT LICENSE copyright 2016 kaorun343 */
/* vue-property-decorator verson 3.2.0 MIT LICENSE copyright 2016 kaorun343 */
"use strict";

@@ -10,5 +10,5 @@ var vue_class_component_1 = require("vue-class-component");

function prop(options) {
return function (target, propertyKey) {
(target.constructor.props || (target.constructor.props = {}))[propertyKey] = options;
};
return vue_class_component_1.createDecorator(function (componentOptions, key) {
(componentOptions.props || (componentOptions.props = {}))[key] = options;
});
}

@@ -25,17 +25,7 @@ exports.prop = prop;

var _a = options.deep, deep = _a === void 0 ? false : _a, _b = options.immediate, immediate = _b === void 0 ? false : _b;
return function (target, handler) {
(target.constructor.watch || (target.constructor.watch = {}))[path] = {
handler: handler,
deep: deep,
immediate: immediate
};
};
return vue_class_component_1.createDecorator(function (componentOptions, handler) {
(componentOptions.watch || (componentOptions.watch = {}))[path] = { handler: handler, deep: deep, immediate: immediate };
});
}
exports.watch = watch;
function Component(options) {
return function (Class) {
Object.assign(options, { props: Class.props, watch: Class.watch });
return vue_class_component_1.default(options)(Class);
};
}
exports.Component = Component;
exports.Component = vue_class_component_1.default;
{
"name": "vue-property-decorator",
"version": "3.1.0",
"version": "3.2.0",
"description": "property decorators for Vue Component",

@@ -29,8 +29,8 @@ "main": "lib/vue-property-decorator.js",

"power-assert": "^1.4.1",
"typescript": "^2.0.3",
"vue": "^2.0.0-rc.7"
"typescript": "^2.0.9",
"vue": "^2.0.5"
},
"typings": "./lib/vue-property-decorator.d.ts",
"dependencies": {
"vue-class-component": "^4.0.1"
"vue-class-component": "^4.3.0"
},

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

@@ -18,3 +18,3 @@ # Vue Property Decorator

@Component({})
@Component
export class Component {

@@ -36,3 +36,3 @@ @prop(Number)

becomes
is equivalent to

@@ -39,0 +39,0 @@ ```js

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