Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-class-component

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-class-component - npm Package Compare versions

Comparing version 7.2.0 to 7.2.1

hooks.d.ts

2

dist/vue-class-component.common.js
/**
* vue-class-component v7.2.0
* vue-class-component v7.2.1
* (c) 2015-present Evan You

@@ -4,0 +4,0 @@ * @license MIT

/**
* vue-class-component v7.2.0
* vue-class-component v7.2.1
* (c) 2015-present Evan You

@@ -4,0 +4,0 @@ * @license MIT

/**
* vue-class-component v7.2.0
* vue-class-component v7.2.1
* (c) 2015-present Evan You

@@ -4,0 +4,0 @@ * @license MIT

/**
* vue-class-component v7.2.0
* vue-class-component v7.2.1
* (c) 2015-present Evan You

@@ -4,0 +4,0 @@ * @license MIT

/**
* vue-class-component v7.2.0
* vue-class-component v7.2.1
* (c) 2015-present Evan You

@@ -4,0 +4,0 @@ * @license MIT

/**
* vue-class-component v7.2.0
* vue-class-component v7.2.1
* (c) 2015-present Evan You

@@ -4,0 +4,0 @@ * @license MIT

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

import './lifecycle';
import Vue, { ComponentOptions } from 'vue';

@@ -3,0 +2,0 @@ import { VueClass } from './declarations';

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

import './lifecycle';
import { componentFactory, $internalHooks } from './component';

@@ -3,0 +2,0 @@ export { createDecorator, mixins } from './util';

{
"name": "vue-class-component",
"version": "7.2.0",
"version": "7.2.1",
"description": "ES201X/TypeScript class decorator for Vue components",

@@ -10,3 +10,4 @@ "main": "dist/vue-class-component.common.js",

"dist",
"lib"
"lib",
"hooks.d.ts"
],

@@ -49,2 +50,4 @@ "scripts": {

"@types/mocha": "^5.2.7",
"@types/node": "^13.1.6",
"@typescript-eslint/parser": "^2.15.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3",

@@ -60,2 +63,3 @@ "babel-loader": "^8.0.6",

"rimraf": "^3.0.0",
"rollup": "^1.29.0",
"rollup-plugin-babel": "^4.3.3",

@@ -66,3 +70,2 @@ "rollup-plugin-replace": "^2.2.0",

"typescript": "^3.7.4",
"typescript-eslint-parser": "^22.0.0",
"uglify-es": "^3.3.9",

@@ -69,0 +72,0 @@ "vue": "^2.6.11",

@@ -203,3 +203,17 @@ # vue-class-component

In TypeScript, all built-in lifecycle hools and special methods are declared in the component instance type to enable auto-complete in editors.
### Enabling Custom Hooks Auto-complete in TypeScript
vue-class-component provides a built-in hooks type, which enables auto-complete for `data`, `render` and other lifecycle hooks in class component declarations, for TypeScript. To enable it, you need to import hooks type located at `vue-class-component/hooks`.
```ts
// main.ts
import 'vue-class-component/hooks' // import hooks type to enable auto-complete
import Vue from 'vue'
import App from './App.vue'
new Vue({
render: h => h(App)
}).$mount('#app')
```
If you want to make it work with custom hooks, you can manually add it by yourself:

@@ -217,3 +231,3 @@

from: Route,
next: (to?: RawLocation | false | ((vm: V) => any) | void) => void
next: (to?: RawLocation | false | ((vm: Vue) => any) | void) => void
): void

@@ -224,3 +238,3 @@

from: Route,
next: (to?: RawLocation | false | ((vm: V) => any) | void) => void
next: (to?: RawLocation | false | ((vm: Vue) => any) | void) => void
): void

@@ -231,3 +245,3 @@

from: Route,
next: (to?: RawLocation | false | ((vm: V) => any) | void) => void
next: (to?: RawLocation | false | ((vm: Vue) => any) | void) => void
): void

@@ -234,0 +248,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