├── .prettierrc.js ├── .gitignore ├── docs ├── assets │ ├── images │ │ ├── icons.png │ │ ├── icons@2x.png │ │ ├── widgets.png │ │ └── widgets@2x.png │ └── js │ │ └── search.js ├── globals.html ├── index.html ├── classes │ └── _nuxt_property_decorator_.vuexmodule.html └── interfaces │ └── _nuxt_property_decorator_.vue.html ├── .editorconfig ├── lib ├── nuxt-property-decorator.esm.js.map ├── tsdoc-metadata.json ├── nuxt-property-decorator.common.js.map ├── nuxt-property-decorator.d.ts ├── nuxt-property-decorator.esm.js ├── nuxt-property-decorator.common.js └── nuxt-property-decorator.umd.js ├── fixtures ├── model.ts ├── emit.ts └── inject.ts ├── tsconfig.json ├── LICENSE ├── rollup.config.js ├── tests └── decorator.spec.ts ├── package.json ├── api └── nuxt-property-decorator.api.md ├── src └── nuxt-property-decorator.ts ├── CHANGELOG.md ├── README.md └── api-extractor.json /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | arrowParens: "avoid", 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .rpt2_cache/* 4 | yarn-error.log 5 | yarn.lock 6 | temp 7 | -------------------------------------------------------------------------------- /docs/assets/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt-property-decorator/HEAD/docs/assets/images/icons.png -------------------------------------------------------------------------------- /docs/assets/images/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt-property-decorator/HEAD/docs/assets/images/icons@2x.png -------------------------------------------------------------------------------- /docs/assets/images/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt-property-decorator/HEAD/docs/assets/images/widgets.png -------------------------------------------------------------------------------- /docs/assets/images/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nuxt-community/nuxt-property-decorator/HEAD/docs/assets/images/widgets@2x.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /lib/nuxt-property-decorator.esm.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"nuxt-property-decorator.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} -------------------------------------------------------------------------------- /fixtures/model.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from "vue" 2 | import { Component, Model } from "../src/nuxt-property-decorator" 3 | 4 | @Component({ 5 | name: "test", 6 | }) 7 | export default class ModelFixture extends Vue { 8 | @Model("change", Boolean) 9 | checked!: boolean 10 | 11 | render(createElement: any): VNode { 12 | return createElement("div") 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/tsdoc-metadata.json: -------------------------------------------------------------------------------- 1 | // This file is read by tools that parse documentation comments conforming to the TSDoc standard. 2 | // It should be published with your NPM package. It should not be tracked by Git. 3 | { 4 | "tsdocVersion": "0.12", 5 | "toolPackages": [ 6 | { 7 | "packageName": "@microsoft/api-extractor", 8 | "packageVersion": "7.13.0" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /lib/nuxt-property-decorator.common.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"nuxt-property-decorator.common.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} -------------------------------------------------------------------------------- /fixtures/emit.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from "vue" 2 | import { 3 | Emit, 4 | Component, 5 | Inject, 6 | Model, 7 | Prop, 8 | Provide, 9 | Watch, 10 | } from "../src/nuxt-property-decorator" 11 | @Component 12 | export default class EmitFixture extends Vue { 13 | count = 1 14 | 15 | @Emit("reset") resetCount() { 16 | this.count = 0 17 | } 18 | 19 | @Emit() increment(n: number) { 20 | this.count += n 21 | } 22 | 23 | @Emit() canceled() { 24 | return false 25 | } 26 | 27 | render(createElement: any): VNode { 28 | return createElement("div") 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./lib", 4 | "esModuleInterop": true, 5 | "target": "es5", 6 | "declaration":true, 7 | "module": "es2015", 8 | "moduleResolution": "node", 9 | "isolatedModules": false, 10 | "experimentalDecorators": true, 11 | "emitDecoratorMetadata": false, 12 | "noImplicitAny": true, 13 | "removeComments": false, 14 | "strictNullChecks": true, 15 | "typeRoots": ["./node_modules/@types/"], 16 | "allowSyntheticDefaultImports": true, 17 | "lib": ["dom", "es2015", "es2016", "es2017"] 18 | }, 19 | "include": ["src/**/*.ts"], 20 | "exclude": ["node_modules", "lib"], 21 | "compileOnSave": false 22 | } 23 | -------------------------------------------------------------------------------- /fixtures/inject.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from "vue" 2 | import { 3 | Component, 4 | Emit, 5 | Inject, 6 | Model, 7 | Prop, 8 | Provide, 9 | Watch, 10 | } from "../src/nuxt-property-decorator" 11 | 12 | const s = Symbol() 13 | @Component({ 14 | provide() { 15 | return { 16 | [s]: "one", 17 | bar: "two", 18 | } 19 | }, 20 | }) 21 | export class Parent extends Vue { 22 | render(createElement: any): VNode { 23 | return createElement("div") 24 | } 25 | } 26 | 27 | @Component 28 | export class Child extends Vue { 29 | @Inject(s) foo: string 30 | @Inject() bar: string 31 | render(createElement: any): VNode { 32 | return createElement("div") 33 | } 34 | } 35 | 36 | @Component 37 | export class GrandChild extends Vue { 38 | @Inject(s) foo: string 39 | @Inject() bar: string 40 | render(createElement: any): VNode { 41 | return createElement("div") 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 kaorun343 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import typescript from "rollup-plugin-typescript2" 2 | 3 | const outDir = "lib"; 4 | const libName = "nuxt-property-decorator"; 5 | export default { 6 | input: "./src/nuxt-property-decorator.ts", 7 | plugins: [ 8 | typescript(), 9 | ], 10 | output: [ 11 | { 12 | format: "umd", 13 | name: "NuxtPropertyDecorator", 14 | file: `${outDir}/${libName}.umd.js`, 15 | globals: { 16 | vue: "Vue", 17 | "vuex-class": "VuexClass", 18 | "vue-class-component": "VueClassComponent", 19 | "vuex-module-decorators": "VuexModuleDecorators", 20 | "vue-property-decorator": "VuePropertyDecorator", 21 | }, 22 | }, 23 | { 24 | file: `${outDir}/${libName}.common.js`, 25 | format: "cjs", // amd,cjs,es,iife,umd,system 26 | name: "quranMeta", 27 | sourcemap: true, 28 | }, 29 | { 30 | file: `${outDir}/${libName}.esm.js`, 31 | format: "es", 32 | name: "quranMeta", 33 | sourcemap: true, 34 | }, 35 | ], 36 | external: [ 37 | "vue", 38 | "vuex-class", 39 | "vuex-module-decorators", 40 | "vue-property-decorator", 41 | "vue-class-component", 42 | "reflect-metadata", 43 | ], 44 | }; 45 | -------------------------------------------------------------------------------- /lib/nuxt-property-decorator.d.ts: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import Component, { mixins } from "vue-class-component"; 3 | export { Vue, Component, mixins }; 4 | export { Module, getModule, VuexModule, Mutation as VuexMutation, MutationAction, Action as VuexAction, } from "vuex-module-decorators"; 5 | export { State, Getter, Action, Mutation, namespace } from "vuex-class"; 6 | export { Emit, Inject, InjectReactive, Model, ModelSync, Prop, PropSync, Provide, ProvideReactive, Ref, VModel, Watch, } from "vue-property-decorator"; 7 | /** 8 | * @public 9 | */ 10 | export declare type Constructor = { 11 | new (...args: any[]): any; 12 | }; 13 | /** 14 | * decorator of $off 15 | * @public 16 | * @param event - The name of the event 17 | * @param method - The name of the method 18 | */ 19 | export declare function Off(event?: string, method?: string): MethodDecorator; 20 | /** 21 | * decorator of $on 22 | * @public 23 | * @param event - The name of the event 24 | */ 25 | export declare function On(event?: string): MethodDecorator; 26 | /** 27 | * decorator of $once 28 | * @public 29 | * @param event - The name of the event 30 | */ 31 | export declare function Once(event?: string): MethodDecorator; 32 | /** 33 | * decorator of $nextTick 34 | * 35 | * @public 36 | * @param method - Method name 37 | * @returns Method Decorator 38 | */ 39 | export declare function NextTick(method: string): MethodDecorator; 40 | -------------------------------------------------------------------------------- /tests/decorator.spec.ts: -------------------------------------------------------------------------------- 1 | import { mount, shallowMount } from "@vue/test-utils" 2 | import { doesNotReject } from "assert" 3 | import { 4 | Component, 5 | Emit, 6 | Inject, 7 | Model, 8 | Prop, 9 | Provide, 10 | Watch, 11 | Vue, 12 | } from "../src/nuxt-property-decorator" 13 | import EmitFixture from "../fixtures/emit" 14 | import { Parent, Child, GrandChild } from "../fixtures/inject" 15 | import ModelFixture from "../fixtures/model" 16 | 17 | describe("@Emit decorator tests", () => { 18 | const wrapper = mount(EmitFixture) 19 | 20 | test("emitted increment correctly", () => { 21 | wrapper.vm.increment(23) 22 | expect(wrapper.vm.count).toEqual(24) 23 | expect(wrapper.emitted().increment).toBeTruthy() 24 | expect(wrapper.emitted().increment?.[0]).toEqual([23]) 25 | }) 26 | 27 | test("emitted increment correctly", () => { 28 | wrapper.vm.$emit("increment", 123) 29 | expect(wrapper.emitted().increment).toBeTruthy() 30 | expect(wrapper.emitted().increment?.[1]).toEqual([123]) 31 | }) 32 | 33 | test("emmited reset correctly", () => { 34 | wrapper.vm.$emit("reset") 35 | expect(wrapper.emitted().reset).toBeTruthy() 36 | expect(wrapper.emitted().reset?.[2]).toEqual(undefined) 37 | }) 38 | 39 | test("emmited canceled correctly", () => { 40 | wrapper.vm.$emit("canceled") 41 | expect(wrapper.emitted().canceled).toBeTruthy() 42 | }) 43 | }) 44 | 45 | describe("@Inject decorator test", () => { 46 | const parent = new Parent() 47 | const child = new Child({ parent }) 48 | const grandChild = new GrandChild({ parent: child }) 49 | 50 | test("child injected", () => { 51 | expect(child.foo).toBe("one") 52 | expect(child.bar).toBe("two") 53 | }) 54 | 55 | test("grand child injected", () => { 56 | expect(grandChild.foo).toBe("one") 57 | expect(grandChild.bar).toBe("two") 58 | }) 59 | }) 60 | 61 | describe("@Model decorator test", () => { 62 | const { $options } = new ModelFixture() 63 | 64 | test("define model option correctly", () => { 65 | expect($options.model).toEqual({ prop: "checked", event: "change" }) 66 | }) 67 | 68 | test("define props option correctly", () => { 69 | const props = ($options.props as any) as Record 70 | expect(props!["checked"]).toEqual({ type: Boolean }) 71 | }) 72 | }) 73 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxt-property-decorator", 3 | "version": "2.9.1", 4 | "description": "Property decorators for Nuxt", 5 | "browser": "lib/nuxt-property-decorator.umd.js", 6 | "main": "lib/nuxt-property-decorator.common.js", 7 | "typings": "lib/nuxt-property-decorator.d.ts", 8 | "module": "lib/nuxt-property-decorator.esm.js", 9 | "keywords": [ 10 | "vue", 11 | "typescript", 12 | "nuxt", 13 | "decorator" 14 | ], 15 | "author": "davidbernal", 16 | "contributors": [ 17 | { 18 | "name": "Tony BRIET", 19 | "email": "tony.briet@viacesi.fr" 20 | }, 21 | { 22 | "name": "HG", 23 | "email": "husayt@gmail.com" 24 | } 25 | ], 26 | "license": "MIT", 27 | "files": [ 28 | "lib" 29 | ], 30 | "directories": { 31 | "lib": "lib", 32 | "test": "test" 33 | }, 34 | "scripts": { 35 | "build": "rollup -c", 36 | "build:full": "npm run build && npm run apiextract && npm run tsdoc", 37 | "test": "jest", 38 | "apiextract": "api-extractor run --local --verbose", 39 | "tsdoc": "typedoc --excludeNotExported --mode library --out docs/ src/", 40 | "release": "standard-version && git push --follow-tags && npm publish" 41 | }, 42 | "gitHooks": { 43 | "pre-commit": "npm run build:full" 44 | }, 45 | "dependencies": { 46 | "vue-class-component": "^7.2.6", 47 | "vue-property-decorator": "^9.0.0", 48 | "vuex-class": "^0.3.2", 49 | "vuex-module-decorators": "^1.0.1" 50 | }, 51 | "devDependencies": { 52 | "@microsoft/api-extractor": "^7.9.22", 53 | "@std/esm": "^0.26.0", 54 | "@types/jest": "^26.0.4", 55 | "@types/node": "12.11.1", 56 | "@vue/test-utils": "^1.0.0", 57 | "babel-jest": "^26.3.0", 58 | "jest": "^26.4.2", 59 | "rollup": "^2.28.1", 60 | "rollup-plugin-typescript2": "^0.29.0", 61 | "standard-version": "^9.0.0", 62 | "ts-jest": "^26.4.0", 63 | "ts-node": "^9.0.0", 64 | "typedoc": "0.17.0-3", 65 | "typescript": "^4.0.3", 66 | "vue": "^2.6.12", 67 | "vue-jest": "^3.0.7", 68 | "vue-template-compiler": "^2.6.12", 69 | "vuex": "^3.5.1", 70 | "yorkie": "^2.0.0" 71 | }, 72 | "jest": { 73 | "transform": { 74 | "^.+\\.tsx?$": "ts-jest", 75 | "^.+\\.js$": "/node_modules/babel-jest" 76 | }, 77 | "testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", 78 | "moduleFileExtensions": [ 79 | "ts", 80 | "tsx", 81 | "js", 82 | "jsx", 83 | "json", 84 | "node" 85 | ] 86 | }, 87 | "repository": { 88 | "type": "git", 89 | "url": "git+https://github.com/nuxt-community/nuxt-property-decorator.git" 90 | }, 91 | "bugs": { 92 | "url": "https://github.com/nuxt-community/nuxt-property-decorator/issues" 93 | }, 94 | "homepage": "https://github.com/nuxt-community/nuxt-property-decorator#readme" 95 | } 96 | -------------------------------------------------------------------------------- /api/nuxt-property-decorator.api.md: -------------------------------------------------------------------------------- 1 | ## API Report File for "nuxt-property-decorator" 2 | 3 | > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). 4 | 5 | ```ts 6 | 7 | import { Action } from 'vuex-class'; 8 | import Component from 'vue-class-component'; 9 | import { Emit } from 'vue-property-decorator'; 10 | import { getModule } from 'vuex-module-decorators'; 11 | import { Getter } from 'vuex-class'; 12 | import { Inject } from 'vue-property-decorator'; 13 | import { InjectReactive } from 'vue-property-decorator'; 14 | import { mixins } from 'vue-class-component'; 15 | import { Model } from 'vue-property-decorator'; 16 | import { ModelSync } from 'vue-property-decorator'; 17 | import { Module } from 'vuex-module-decorators'; 18 | import { Mutation } from 'vuex-class'; 19 | import { MutationAction } from 'vuex-module-decorators'; 20 | import { namespace } from 'vuex-class'; 21 | import { Prop } from 'vue-property-decorator'; 22 | import { PropSync } from 'vue-property-decorator'; 23 | import { Provide } from 'vue-property-decorator'; 24 | import { ProvideReactive } from 'vue-property-decorator'; 25 | import { Ref } from 'vue-property-decorator'; 26 | import { State } from 'vuex-class'; 27 | import { VModel } from 'vue-property-decorator'; 28 | import { default as Vue_2 } from 'vue'; 29 | import { Action as VuexAction } from 'vuex-module-decorators'; 30 | import { VuexModule } from 'vuex-module-decorators'; 31 | import { Mutation as VuexMutation } from 'vuex-module-decorators'; 32 | import { Watch } from 'vue-property-decorator'; 33 | 34 | export { Action } 35 | 36 | export { Component } 37 | 38 | // @public (undocumented) 39 | export type Constructor = { 40 | new (...args: any[]): any; 41 | }; 42 | 43 | export { Emit } 44 | 45 | export { getModule } 46 | 47 | export { Getter } 48 | 49 | export { Inject } 50 | 51 | export { InjectReactive } 52 | 53 | export { mixins } 54 | 55 | export { Model } 56 | 57 | export { ModelSync } 58 | 59 | export { Module } 60 | 61 | export { Mutation } 62 | 63 | export { MutationAction } 64 | 65 | export { namespace } 66 | 67 | // @public 68 | export function NextTick(method: string): MethodDecorator; 69 | 70 | // @public 71 | export function Off(event?: string, method?: string): MethodDecorator; 72 | 73 | // @public 74 | export function On(event?: string): MethodDecorator; 75 | 76 | // @public 77 | export function Once(event?: string): MethodDecorator; 78 | 79 | export { Prop } 80 | 81 | export { PropSync } 82 | 83 | export { Provide } 84 | 85 | export { ProvideReactive } 86 | 87 | export { Ref } 88 | 89 | export { State } 90 | 91 | export { VModel } 92 | 93 | export { Vue_2 as Vue } 94 | 95 | export { VuexAction } 96 | 97 | export { VuexModule } 98 | 99 | export { VuexMutation } 100 | 101 | export { Watch } 102 | 103 | 104 | // (No @packageDocumentation comment for this package) 105 | 106 | ``` 107 | -------------------------------------------------------------------------------- /src/nuxt-property-decorator.ts: -------------------------------------------------------------------------------- 1 | "use strict" 2 | 3 | import Vue, { PropOptions, WatchOptions } from "vue" 4 | 5 | import Component, { createDecorator, mixins } from "vue-class-component" 6 | 7 | Component.registerHooks([ 8 | "beforeRouteEnter", 9 | "beforeRouteUpdate", 10 | "beforeRouteLeave", 11 | "asyncData", 12 | "fetch", 13 | "fetchOnServer", 14 | "head", 15 | "key", 16 | "layout", 17 | "loading", 18 | "middleware", 19 | "scrollToTop", 20 | "transition", 21 | "validate", 22 | "watchQuery", 23 | "meta", 24 | ]) 25 | 26 | export { Vue, Component, mixins } 27 | 28 | export { 29 | Module, 30 | getModule, 31 | VuexModule, 32 | Mutation as VuexMutation, 33 | MutationAction, 34 | Action as VuexAction, // config, 35 | } from "vuex-module-decorators" 36 | export { State, Getter, Action, Mutation, namespace } from "vuex-class" 37 | export { 38 | /*Component,*/ Emit, 39 | Inject, 40 | InjectReactive, 41 | Model, 42 | ModelSync, 43 | Prop, 44 | PropSync, 45 | Provide, 46 | ProvideReactive, 47 | Ref, 48 | VModel, 49 | Watch /*, Vue, Mixins */, 50 | } from "vue-property-decorator" 51 | 52 | // const Component = require('nuxt-class-component'); 53 | // const { createDecorator } = require('nuxt-class-component'); 54 | 55 | /** 56 | * @public 57 | */ 58 | export type Constructor = { 59 | new (...args: any[]): any 60 | } 61 | 62 | // Code copied from Vue/src/shared/util.js 63 | const hyphenateRE = /\B([A-Z])/g 64 | const hyphenate = (str: string) => str.replace(hyphenateRE, "-$1").toLowerCase() 65 | 66 | /** 67 | * decorator of $off 68 | * @public 69 | * @param event - The name of the event 70 | * @param method - The name of the method 71 | */ 72 | export function Off(event?: string, method?: string): MethodDecorator { 73 | return function (target: Vue, key: string, descriptor: any) { 74 | key = hyphenate(key) 75 | const original = descriptor.value 76 | descriptor.value = function offer(...args: any[]) { 77 | if (original.apply(this, args) !== false) { 78 | if (method) { 79 | if (typeof this[method] === "function") { 80 | this.$off(event || key, this[method]) 81 | } else { 82 | throw new TypeError("must be a method name") 83 | } 84 | } else if (event) { 85 | this.$off(event || key) 86 | } else { 87 | this.$off() 88 | } 89 | } 90 | } 91 | } 92 | } 93 | 94 | /** 95 | * decorator of $on 96 | * @public 97 | * @param event - The name of the event 98 | */ 99 | export function On(event?: string): MethodDecorator { 100 | return createDecorator((componentOptions, k) => { 101 | const key = hyphenate(k) 102 | if (typeof componentOptions.created !== "function") { 103 | componentOptions.created = function () {} 104 | } 105 | const original = componentOptions.created 106 | componentOptions.created = function () { 107 | original() 108 | if (typeof componentOptions.methods !== "undefined") { 109 | this.$on(event || key, componentOptions.methods[k]) 110 | } 111 | } 112 | }) 113 | } 114 | 115 | /** 116 | * decorator of $once 117 | * @public 118 | * @param event - The name of the event 119 | */ 120 | export function Once(event?: string): MethodDecorator { 121 | return createDecorator((componentOptions, k) => { 122 | const key = hyphenate(k) 123 | if (typeof componentOptions.created !== "function") { 124 | componentOptions.created = function () {} 125 | } 126 | const original = componentOptions.created 127 | componentOptions.created = function () { 128 | original() 129 | if (typeof componentOptions.methods !== "undefined") { 130 | this.$once(event || key, componentOptions.methods[k]) 131 | } 132 | } 133 | }) 134 | } 135 | 136 | /** 137 | * decorator of $nextTick 138 | * 139 | * @public 140 | * @param method - Method name 141 | * @returns Method Decorator 142 | */ 143 | export function NextTick(method: string): MethodDecorator { 144 | return function (target: Vue, key: string, descriptor: any) { 145 | const original = descriptor.value 146 | descriptor.value = function emitter(...args: any[]) { 147 | if (original.apply(this, args) !== false) 148 | if (typeof this[method] === "function") { 149 | this.$nextTick(this[method]) 150 | } else { 151 | throw new TypeError("must be a method name") 152 | } 153 | } 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /lib/nuxt-property-decorator.esm.js: -------------------------------------------------------------------------------- 1 | export { default as Vue } from 'vue'; 2 | import Component, { createDecorator } from 'vue-class-component'; 3 | export { default as Component, mixins } from 'vue-class-component'; 4 | export { Module, MutationAction, Action as VuexAction, VuexModule, Mutation as VuexMutation, getModule } from 'vuex-module-decorators'; 5 | export { Action, Getter, Mutation, State, namespace } from 'vuex-class'; 6 | export { Emit, Inject, InjectReactive, Model, ModelSync, Prop, PropSync, Provide, ProvideReactive, Ref, VModel, Watch } from 'vue-property-decorator'; 7 | 8 | Component.registerHooks([ 9 | "beforeRouteEnter", 10 | "beforeRouteUpdate", 11 | "beforeRouteLeave", 12 | "asyncData", 13 | "fetch", 14 | "fetchOnServer", 15 | "head", 16 | "key", 17 | "layout", 18 | "loading", 19 | "middleware", 20 | "scrollToTop", 21 | "transition", 22 | "validate", 23 | "watchQuery", 24 | "meta", 25 | ]); 26 | // Code copied from Vue/src/shared/util.js 27 | var hyphenateRE = /\B([A-Z])/g; 28 | var hyphenate = function (str) { return str.replace(hyphenateRE, "-$1").toLowerCase(); }; 29 | /** 30 | * decorator of $off 31 | * @public 32 | * @param event - The name of the event 33 | * @param method - The name of the method 34 | */ 35 | function Off(event, method) { 36 | return function (target, key, descriptor) { 37 | key = hyphenate(key); 38 | var original = descriptor.value; 39 | descriptor.value = function offer() { 40 | var args = []; 41 | for (var _i = 0; _i < arguments.length; _i++) { 42 | args[_i] = arguments[_i]; 43 | } 44 | if (original.apply(this, args) !== false) { 45 | if (method) { 46 | if (typeof this[method] === "function") { 47 | this.$off(event || key, this[method]); 48 | } 49 | else { 50 | throw new TypeError("must be a method name"); 51 | } 52 | } 53 | else if (event) { 54 | this.$off(event || key); 55 | } 56 | else { 57 | this.$off(); 58 | } 59 | } 60 | }; 61 | }; 62 | } 63 | /** 64 | * decorator of $on 65 | * @public 66 | * @param event - The name of the event 67 | */ 68 | function On(event) { 69 | return createDecorator(function (componentOptions, k) { 70 | var key = hyphenate(k); 71 | if (typeof componentOptions.created !== "function") { 72 | componentOptions.created = function () { }; 73 | } 74 | var original = componentOptions.created; 75 | componentOptions.created = function () { 76 | original(); 77 | if (typeof componentOptions.methods !== "undefined") { 78 | this.$on(event || key, componentOptions.methods[k]); 79 | } 80 | }; 81 | }); 82 | } 83 | /** 84 | * decorator of $once 85 | * @public 86 | * @param event - The name of the event 87 | */ 88 | function Once(event) { 89 | return createDecorator(function (componentOptions, k) { 90 | var key = hyphenate(k); 91 | if (typeof componentOptions.created !== "function") { 92 | componentOptions.created = function () { }; 93 | } 94 | var original = componentOptions.created; 95 | componentOptions.created = function () { 96 | original(); 97 | if (typeof componentOptions.methods !== "undefined") { 98 | this.$once(event || key, componentOptions.methods[k]); 99 | } 100 | }; 101 | }); 102 | } 103 | /** 104 | * decorator of $nextTick 105 | * 106 | * @public 107 | * @param method - Method name 108 | * @returns Method Decorator 109 | */ 110 | function NextTick(method) { 111 | return function (target, key, descriptor) { 112 | var original = descriptor.value; 113 | descriptor.value = function emitter() { 114 | var args = []; 115 | for (var _i = 0; _i < arguments.length; _i++) { 116 | args[_i] = arguments[_i]; 117 | } 118 | if (original.apply(this, args) !== false) 119 | if (typeof this[method] === "function") { 120 | this.$nextTick(this[method]); 121 | } 122 | else { 123 | throw new TypeError("must be a method name"); 124 | } 125 | }; 126 | }; 127 | } 128 | 129 | export { NextTick, Off, On, Once }; 130 | //# sourceMappingURL=nuxt-property-decorator.esm.js.map 131 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | ### [2.9.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.8.8...v2.9.1) (2021-01-15) 6 | 7 | ### [2.8.8](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.8.7...v2.8.8) (2020-09-23) 8 | 9 | ### [2.8.7](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.8.6...v2.8.7) (2020-09-23) 10 | 11 | ### [2.8.6](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.8.5...v2.8.6) (2020-09-23) 12 | 13 | ### [2.8.5](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.8.3...v2.8.5) (2020-09-23) 14 | 15 | ### [2.8.3](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.8.2...v2.8.3) (2020-09-18) 16 | 17 | ### [2.8.2](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.7.2...v2.8.2) (2020-09-18) 18 | 19 | ### [2.7.2](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.7.1...v2.7.2) (2020-04-21) 20 | 21 | * Added [vuex-module-decorators](https://github.com/championswimmer/vuex-module-decorators) 22 | 23 | ### [2.7.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.7.0...v2.7.1) (2020-04-21) 24 | 25 | ## [2.7.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.5.1...v2.7.0) (2020-04-21) 26 | 27 | 28 | ### Features 29 | 30 | * add other formats to package.json ([dbdc488](https://github.com/nuxt-community/nuxt-property-decorator/commit/dbdc4888fd1780f632f58913cb9fc6a962fa40a3)) 31 | 32 | ### [2.5.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.5.0...v2.5.1) (2020-02-17) 33 | 34 | 35 | ### Bug Fixes 36 | 37 | * missing methods ([187ab3c](https://github.com/nuxt-community/nuxt-property-decorator/commit/187ab3cd0de8ea9fe579721bf6dff9b719ef3247)) 38 | 39 | ## [2.5.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.4.1...v2.5.0) (2019-10-18) 40 | 41 | 42 | ### Features 43 | 44 | * add meta hook and update documentation ([6562108](https://github.com/nuxt-community/nuxt-property-decorator/commit/6562108)) 45 | 46 | 47 | 48 | ### [2.4.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.4.0...v2.4.1) (2019-10-17) 49 | 50 | 51 | 52 | ## [2.4.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.3.0...v2.4.0) (2019-09-02) 53 | 54 | 55 | ### Features 56 | 57 | * **deps:** updates vue-property-decorator ([e9ee54e](https://github.com/nuxt-community/nuxt-property-decorator/commit/e9ee54e)) 58 | * Added @PropSync decorator 59 | * Added @ProvideReactive and @InjectReactive decorator 60 | * Added @Ref decorator 61 | 62 | 63 | 64 | ## [2.3.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.1.3...v2.3.0) (2019-06-02) 65 | 66 | 67 | ### Features 68 | 69 | * **deps:** updates vue-property-decorator ([6fd8195](https://github.com/nuxt-community/nuxt-property-decorator/commit/6fd8195)) 70 | 71 | 72 | 73 | ## [2.1.3](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.1.2...v2.1.3) (2019-02-26) 74 | 75 | 76 | 77 | 78 | ## [2.0.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.3.1...v2.0.1) (2019-02-08) 79 | Library is fully inline with [Vue-class-component](https://github.com/vuejs/vue-class-component) 80 | 81 | ### Breaking changes 82 | There is only one breaking change and that is renaming `mixins` to `Mixins ` to keep inline with vue-property-decorator 83 | 84 | 85 | ## [1.2.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.1.8...v1.2.0) (2018-04-12) 86 | 87 | 88 | ### Features 89 | 90 | * add build directly into the versionning ([d235bec](https://github.com/nuxt-community/nuxt-property-decorator/commit/d235bec)) 91 | 92 | 93 | 94 | 95 | ## [1.1.8](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.1.7...v1.1.8) (2018-04-12) 96 | 97 | 98 | ### Bug Fixes 99 | 100 | * **postinstall:** build after postinstall ([46f8990](https://github.com/nuxt-community/nuxt-property-decorator/commit/46f8990)) 101 | 102 | 103 | 104 | 105 | ## [1.1.7](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.1.6...v1.1.7) (2018-04-12) 106 | 107 | 108 | ### Bug Fixes 109 | 110 | * **build:** npm prehook ([33bb5f0](https://github.com/nuxt-community/nuxt-property-decorator/commit/33bb5f0)) 111 | 112 | 113 | 114 | 115 | ## [1.1.6](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.1.5...v1.1.6) (2018-04-12) 116 | 117 | 118 | ### Bug Fixes 119 | 120 | * **build:** automatically build umd ([b7df4c4](https://github.com/nuxt-community/nuxt-property-decorator/commit/b7df4c4)) 121 | 122 | 123 | 124 | 125 | ## 1.1.5 (2018-04-12) 126 | 127 | 128 | ### Bug Fixes 129 | 130 | * **build:** build typescript as js module ([a45ab44](https://github.com/nuxt-community/nuxt-property-decorator/commit/a45ab44)) 131 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nuxt Property Decorator 2 | 3 |

4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |

15 | 16 | Handy ES / TypeScript decorators for class-style Vue components in Nuxt (based on [Vue class component](https://github.com/vuejs/vue-class-component)) and Property decorators for Vue (bases on [Vue Property Decorator](https://github.com/kaorun343/vue-property-decorator)) and Vuex (based on [Vuex Class](https://github.com/ktsn/vuex-class/)) 17 | 18 | This library fully depends on [vue-class-component](https://github.com/vuejs/vue-class-component). 19 | 20 | ## License 21 | 22 | MIT License 23 | 24 | ## Install 25 | 26 | Installation is very easy 27 | 28 | ```bash 29 | npm i -S nuxt-property-decorator 30 | ``` 31 | 32 | or 33 | 34 | ```bash 35 | yarn add nuxt-property-decorator 36 | ``` 37 | 38 | ### Nuxt JS Instructions 39 | 40 | It works out of the box with Nuxt JS. 41 | 42 | ### Nuxt TS Instructions 43 | 44 | It works out of the box with Nuxt TS. 45 | 46 | ## Decorators and helpers 47 | 48 | There are following decorators: 49 | 50 | - **Nuxt specific decorators** 51 | - `@Off` - decorator of \$off 52 | - `@On`- decorator of \$on 53 | - `@Once`- decorator of \$once 54 | - `@NextTick` -decorator of \$nextTick 55 | 56 | - **exported from** [`vue-class-component`](https://github.com/vuejs/vue-class-component) 57 | - `@Component` 58 | - **exported from** [`vue-property-decorator`](https://github.com/kaorun343/vue-property-decorator) 59 | 60 | - [`@Emit`](https://github.com/kaorun343/vue-property-decorator/#Emit) 61 | - [`@Inject`](https://github.com/kaorun343/vue-property-decorator/#Provide) 62 | - [`@InjectReactive`](https://github.com/kaorun343/vue-property-decorator/#ProvideReactive) 63 | - [`@Model`](https://github.com/kaorun343/vue-property-decorator/#Model) 64 | - [`@ModelSync`](https://github.com/kaorun343/vue-property-decorator#-modelsyncpropname-string-event-string-options-propoptions--constructor--constructor---decorator) 65 | - [`@Prop`](https://github.com/kaorun343/vue-property-decorator/#Prop) 66 | - [`@PropSync`](https://github.com/kaorun343/vue-property-decorator/#PropSync) 67 | - [`@Provide`](https://github.com/kaorun343/vue-property-decorator/#Provide) 68 | - [`@ProvideReactive`](https://github.com/kaorun343/vue-property-decorator/#ProvideReactive) 69 | - [`@Ref`](https://github.com/kaorun343/vue-property-decorator/#Ref) 70 | - [`@VModel`](https://github.com/kaorun343/vue-property-decorator#-vmodelpropsargs-propoptions-decorator) 71 | - [`@Watch`](https://github.com/kaorun343/vue-property-decorator/#Watch) 72 | 73 | - **exported from** [`vuex-class`](https://github.com/ktsn/vuex-class) 74 | 75 | - `@State` 76 | - `@Getter` 77 | - `@Action` 78 | - `@Mutation` 79 | 80 | - **exported from** [`vuex-module-decorators`](https://github.com/championswimmer/vuex-module-decorators) 81 | - Module, 82 | - getModule, 83 | - VuexModule, 84 | - VuexMutation (`Mutation` from original renamed to avoid conflict with 'vuex-class' one), 85 | - MutationAction, 86 | - VuexAction (`Action` from original renamed to avoid conflict with 'vuex-class' one), 87 | 88 | ### Other exports 89 | 90 | - `namespace ` 91 | - `mixins` 92 | - `Vue` 93 | 94 | ## Hooks 95 | 96 | ### Vue Router hooks 97 | 98 | - `beforeRouteEnter` 99 | - `beforeRouteUpdate` 100 | - `beforeRouteLeave` 101 | 102 | ### Nuxt hooks 103 | 104 | - `asyncData` 105 | - `fetch` 106 | - `fetchOnServer` 107 | - `head` 108 | - `key` 109 | - `layout` 110 | - `loading` 111 | - `middleware` 112 | - `scrollToTop` 113 | - `transition` 114 | - `validate` 115 | - `watchQuery` 116 | - `meta` 117 | 118 | ### Vue-class Hooks 119 | 120 | - `data` 121 | - `beforeCreate` 122 | - `created` 123 | - `beforeMount` 124 | - `mounted` 125 | - `beforeDestroy` 126 | - `destroyed` 127 | - `beforeUpdate` 128 | - `updated` 129 | - `activated` 130 | - `deactivated` 131 | - `render` 132 | - `errorCaptured` 133 | - `serverPrefetch` 134 | 135 | ## Usage 136 | 137 | ```typescript 138 | import { 139 | Component, 140 | Inject, 141 | Model, 142 | Prop, 143 | Provide, 144 | Vue, 145 | Watch, 146 | } from "nuxt-property-decorator" 147 | 148 | const s = Symbol("baz") 149 | 150 | @Component({ 151 | components: { comp }, 152 | }) 153 | export class MyComponent extends Vue { 154 | @Inject() foo!: string 155 | @Inject("bar") bar!: string 156 | @Inject(s) baz!: string 157 | 158 | @Model("change") checked!: boolean 159 | 160 | @Prop() 161 | propA!: number 162 | 163 | @Prop({ default: "default value" }) 164 | propB!: string 165 | 166 | @Prop([String, Boolean]) 167 | propC!: string | boolean 168 | 169 | @Prop({ type: null }) 170 | propD!: any 171 | 172 | @Provide() foo = "foo" 173 | @Provide("bar") baz = "bar" 174 | 175 | @Watch("child") 176 | onChildChanged(val: string, oldVal: string) {} 177 | 178 | @Watch("person", { immediate: true, deep: true }) 179 | onPersonChanged(val: Person, oldVal: Person) {} 180 | 181 | beforeRouteLeave(to, from, next) { 182 | // called when the route that renders this component is about to 183 | // be navigated away from. 184 | // has access to `this` component instance. 185 | } 186 | } 187 | ``` 188 | 189 | is equivalent to 190 | 191 | ```js 192 | const s = Symbol("baz") 193 | 194 | export const MyComponent = Vue.extend({ 195 | name: "MyComponent", 196 | components: { comp }, 197 | inject: { 198 | foo: "foo", 199 | bar: "bar", 200 | [s]: s, 201 | }, 202 | model: { 203 | prop: "checked", 204 | event: "change", 205 | }, 206 | props: { 207 | checked: Boolean, 208 | propA: Number, 209 | propB: { 210 | type: String, 211 | default: "default value", 212 | }, 213 | propC: [String, Boolean], 214 | propD: { type: null }, 215 | }, 216 | data() { 217 | return { 218 | foo: "foo", 219 | baz: "bar", 220 | } 221 | }, 222 | provide() { 223 | return { 224 | foo: this.foo, 225 | bar: this.baz, 226 | } 227 | }, 228 | methods: { 229 | onChildChanged(val, oldVal) {}, 230 | onPersonChanged(val, oldVal) {}, 231 | }, 232 | beforeRouteLeave(to, from, next) { 233 | // called when the route that renders this component is about to 234 | // be navigated away from. 235 | // has access to `this` component instance. 236 | }, 237 | watch: { 238 | child: { 239 | handler: "onChildChanged", 240 | immediate: false, 241 | deep: false, 242 | }, 243 | person: { 244 | handler: "onPersonChanged", 245 | immediate: true, 246 | deep: true, 247 | }, 248 | }, 249 | }) 250 | ``` 251 | 252 | As you can see at `propA` and `propB`, the type can be inferred automatically when it's a simple type. For more complex types like enums you do need to specify it specifically. 253 | Also this library needs to have `emitDecoratorMetadata` set to `true` for this to work. 254 | 255 | ## Useful links 256 | 257 | See also: 258 | 259 | - [Vue Property Decorator](https://github.com/kaorun343/vue-property-decorator) 260 | - [Vue class component](https://github.com/vuejs/vue-class-component) 261 | - [Vuex Class](https://github.com/ktsn/vuex-class/) 262 | - [Nuxt Class Component](https://github.com/nuxt-community/nuxt-class-component) 263 | -------------------------------------------------------------------------------- /docs/globals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | nuxt-property-decorator 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 |
44 |
45 | Menu 46 |
47 |
48 |
49 |
50 |
51 |
52 | 57 |

nuxt-property-decorator

58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |

Index

66 |
67 |
68 |
69 |

Modules

70 | 73 |
74 |
75 |
76 |
77 |
78 | 94 |
95 |
96 |
97 |
98 |

Legend

99 |
100 |
    101 |
  • Module
  • 102 |
  • Object literal
  • 103 |
  • Variable
  • 104 |
  • Function
  • 105 |
  • Function with type parameter
  • 106 |
  • Index signature
  • 107 |
  • Type alias
  • 108 |
  • Type alias with type parameter
  • 109 |
110 |
    111 |
  • Enumeration
  • 112 |
  • Enumeration member
  • 113 |
  • Property
  • 114 |
  • Method
  • 115 |
116 |
    117 |
  • Interface
  • 118 |
  • Interface with type parameter
  • 119 |
  • Constructor
  • 120 |
  • Property
  • 121 |
  • Method
  • 122 |
  • Index signature
  • 123 |
124 |
    125 |
  • Class
  • 126 |
  • Class with type parameter
  • 127 |
  • Constructor
  • 128 |
  • Property
  • 129 |
  • Method
  • 130 |
  • Accessor
  • 131 |
  • Index signature
  • 132 |
133 |
    134 |
  • Inherited constructor
  • 135 |
  • Inherited property
  • 136 |
  • Inherited method
  • 137 |
  • Inherited accessor
  • 138 |
139 |
    140 |
  • Protected property
  • 141 |
  • Protected method
  • 142 |
  • Protected accessor
  • 143 |
144 |
    145 |
  • Private property
  • 146 |
  • Private method
  • 147 |
  • Private accessor
  • 148 |
149 |
    150 |
  • Static property
  • 151 |
  • Static method
  • 152 |
153 |
154 |
155 |
156 |
157 |

Generated using TypeDoc

158 |
159 |
160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /lib/nuxt-property-decorator.common.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, '__esModule', { value: true }); 4 | 5 | var vue = require('vue'); 6 | var Component = require('vue-class-component'); 7 | var vuexModuleDecorators = require('vuex-module-decorators'); 8 | var vuexClass = require('vuex-class'); 9 | var vuePropertyDecorator = require('vue-property-decorator'); 10 | 11 | function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } 12 | 13 | var vue__default = /*#__PURE__*/_interopDefaultLegacy(vue); 14 | var Component__default = /*#__PURE__*/_interopDefaultLegacy(Component); 15 | 16 | Component__default['default'].registerHooks([ 17 | "beforeRouteEnter", 18 | "beforeRouteUpdate", 19 | "beforeRouteLeave", 20 | "asyncData", 21 | "fetch", 22 | "fetchOnServer", 23 | "head", 24 | "key", 25 | "layout", 26 | "loading", 27 | "middleware", 28 | "scrollToTop", 29 | "transition", 30 | "validate", 31 | "watchQuery", 32 | "meta", 33 | ]); 34 | // Code copied from Vue/src/shared/util.js 35 | var hyphenateRE = /\B([A-Z])/g; 36 | var hyphenate = function (str) { return str.replace(hyphenateRE, "-$1").toLowerCase(); }; 37 | /** 38 | * decorator of $off 39 | * @public 40 | * @param event - The name of the event 41 | * @param method - The name of the method 42 | */ 43 | function Off(event, method) { 44 | return function (target, key, descriptor) { 45 | key = hyphenate(key); 46 | var original = descriptor.value; 47 | descriptor.value = function offer() { 48 | var args = []; 49 | for (var _i = 0; _i < arguments.length; _i++) { 50 | args[_i] = arguments[_i]; 51 | } 52 | if (original.apply(this, args) !== false) { 53 | if (method) { 54 | if (typeof this[method] === "function") { 55 | this.$off(event || key, this[method]); 56 | } 57 | else { 58 | throw new TypeError("must be a method name"); 59 | } 60 | } 61 | else if (event) { 62 | this.$off(event || key); 63 | } 64 | else { 65 | this.$off(); 66 | } 67 | } 68 | }; 69 | }; 70 | } 71 | /** 72 | * decorator of $on 73 | * @public 74 | * @param event - The name of the event 75 | */ 76 | function On(event) { 77 | return Component.createDecorator(function (componentOptions, k) { 78 | var key = hyphenate(k); 79 | if (typeof componentOptions.created !== "function") { 80 | componentOptions.created = function () { }; 81 | } 82 | var original = componentOptions.created; 83 | componentOptions.created = function () { 84 | original(); 85 | if (typeof componentOptions.methods !== "undefined") { 86 | this.$on(event || key, componentOptions.methods[k]); 87 | } 88 | }; 89 | }); 90 | } 91 | /** 92 | * decorator of $once 93 | * @public 94 | * @param event - The name of the event 95 | */ 96 | function Once(event) { 97 | return Component.createDecorator(function (componentOptions, k) { 98 | var key = hyphenate(k); 99 | if (typeof componentOptions.created !== "function") { 100 | componentOptions.created = function () { }; 101 | } 102 | var original = componentOptions.created; 103 | componentOptions.created = function () { 104 | original(); 105 | if (typeof componentOptions.methods !== "undefined") { 106 | this.$once(event || key, componentOptions.methods[k]); 107 | } 108 | }; 109 | }); 110 | } 111 | /** 112 | * decorator of $nextTick 113 | * 114 | * @public 115 | * @param method - Method name 116 | * @returns Method Decorator 117 | */ 118 | function NextTick(method) { 119 | return function (target, key, descriptor) { 120 | var original = descriptor.value; 121 | descriptor.value = function emitter() { 122 | var args = []; 123 | for (var _i = 0; _i < arguments.length; _i++) { 124 | args[_i] = arguments[_i]; 125 | } 126 | if (original.apply(this, args) !== false) 127 | if (typeof this[method] === "function") { 128 | this.$nextTick(this[method]); 129 | } 130 | else { 131 | throw new TypeError("must be a method name"); 132 | } 133 | }; 134 | }; 135 | } 136 | 137 | Object.defineProperty(exports, 'Vue', { 138 | enumerable: true, 139 | get: function () { 140 | return vue__default['default']; 141 | } 142 | }); 143 | Object.defineProperty(exports, 'Component', { 144 | enumerable: true, 145 | get: function () { 146 | return Component__default['default']; 147 | } 148 | }); 149 | Object.defineProperty(exports, 'mixins', { 150 | enumerable: true, 151 | get: function () { 152 | return Component.mixins; 153 | } 154 | }); 155 | Object.defineProperty(exports, 'Module', { 156 | enumerable: true, 157 | get: function () { 158 | return vuexModuleDecorators.Module; 159 | } 160 | }); 161 | Object.defineProperty(exports, 'MutationAction', { 162 | enumerable: true, 163 | get: function () { 164 | return vuexModuleDecorators.MutationAction; 165 | } 166 | }); 167 | Object.defineProperty(exports, 'VuexAction', { 168 | enumerable: true, 169 | get: function () { 170 | return vuexModuleDecorators.Action; 171 | } 172 | }); 173 | Object.defineProperty(exports, 'VuexModule', { 174 | enumerable: true, 175 | get: function () { 176 | return vuexModuleDecorators.VuexModule; 177 | } 178 | }); 179 | Object.defineProperty(exports, 'VuexMutation', { 180 | enumerable: true, 181 | get: function () { 182 | return vuexModuleDecorators.Mutation; 183 | } 184 | }); 185 | Object.defineProperty(exports, 'getModule', { 186 | enumerable: true, 187 | get: function () { 188 | return vuexModuleDecorators.getModule; 189 | } 190 | }); 191 | Object.defineProperty(exports, 'Action', { 192 | enumerable: true, 193 | get: function () { 194 | return vuexClass.Action; 195 | } 196 | }); 197 | Object.defineProperty(exports, 'Getter', { 198 | enumerable: true, 199 | get: function () { 200 | return vuexClass.Getter; 201 | } 202 | }); 203 | Object.defineProperty(exports, 'Mutation', { 204 | enumerable: true, 205 | get: function () { 206 | return vuexClass.Mutation; 207 | } 208 | }); 209 | Object.defineProperty(exports, 'State', { 210 | enumerable: true, 211 | get: function () { 212 | return vuexClass.State; 213 | } 214 | }); 215 | Object.defineProperty(exports, 'namespace', { 216 | enumerable: true, 217 | get: function () { 218 | return vuexClass.namespace; 219 | } 220 | }); 221 | Object.defineProperty(exports, 'Emit', { 222 | enumerable: true, 223 | get: function () { 224 | return vuePropertyDecorator.Emit; 225 | } 226 | }); 227 | Object.defineProperty(exports, 'Inject', { 228 | enumerable: true, 229 | get: function () { 230 | return vuePropertyDecorator.Inject; 231 | } 232 | }); 233 | Object.defineProperty(exports, 'InjectReactive', { 234 | enumerable: true, 235 | get: function () { 236 | return vuePropertyDecorator.InjectReactive; 237 | } 238 | }); 239 | Object.defineProperty(exports, 'Model', { 240 | enumerable: true, 241 | get: function () { 242 | return vuePropertyDecorator.Model; 243 | } 244 | }); 245 | Object.defineProperty(exports, 'ModelSync', { 246 | enumerable: true, 247 | get: function () { 248 | return vuePropertyDecorator.ModelSync; 249 | } 250 | }); 251 | Object.defineProperty(exports, 'Prop', { 252 | enumerable: true, 253 | get: function () { 254 | return vuePropertyDecorator.Prop; 255 | } 256 | }); 257 | Object.defineProperty(exports, 'PropSync', { 258 | enumerable: true, 259 | get: function () { 260 | return vuePropertyDecorator.PropSync; 261 | } 262 | }); 263 | Object.defineProperty(exports, 'Provide', { 264 | enumerable: true, 265 | get: function () { 266 | return vuePropertyDecorator.Provide; 267 | } 268 | }); 269 | Object.defineProperty(exports, 'ProvideReactive', { 270 | enumerable: true, 271 | get: function () { 272 | return vuePropertyDecorator.ProvideReactive; 273 | } 274 | }); 275 | Object.defineProperty(exports, 'Ref', { 276 | enumerable: true, 277 | get: function () { 278 | return vuePropertyDecorator.Ref; 279 | } 280 | }); 281 | Object.defineProperty(exports, 'VModel', { 282 | enumerable: true, 283 | get: function () { 284 | return vuePropertyDecorator.VModel; 285 | } 286 | }); 287 | Object.defineProperty(exports, 'Watch', { 288 | enumerable: true, 289 | get: function () { 290 | return vuePropertyDecorator.Watch; 291 | } 292 | }); 293 | exports.NextTick = NextTick; 294 | exports.Off = Off; 295 | exports.On = On; 296 | exports.Once = Once; 297 | //# sourceMappingURL=nuxt-property-decorator.common.js.map 298 | -------------------------------------------------------------------------------- /lib/nuxt-property-decorator.umd.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('vue-class-component'), require('vuex-module-decorators'), require('vuex-class'), require('vue-property-decorator')) : 3 | typeof define === 'function' && define.amd ? define(['exports', 'vue', 'vue-class-component', 'vuex-module-decorators', 'vuex-class', 'vue-property-decorator'], factory) : 4 | (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.NuxtPropertyDecorator = {}, global.Vue, global.VueClassComponent, global.VuexModuleDecorators, global.VuexClass, global.VuePropertyDecorator)); 5 | }(this, (function (exports, vue, Component, vuexModuleDecorators, vuexClass, vuePropertyDecorator) { 'use strict'; 6 | 7 | function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } 8 | 9 | var vue__default = /*#__PURE__*/_interopDefaultLegacy(vue); 10 | var Component__default = /*#__PURE__*/_interopDefaultLegacy(Component); 11 | 12 | Component__default['default'].registerHooks([ 13 | "beforeRouteEnter", 14 | "beforeRouteUpdate", 15 | "beforeRouteLeave", 16 | "asyncData", 17 | "fetch", 18 | "fetchOnServer", 19 | "head", 20 | "key", 21 | "layout", 22 | "loading", 23 | "middleware", 24 | "scrollToTop", 25 | "transition", 26 | "validate", 27 | "watchQuery", 28 | "meta", 29 | ]); 30 | // Code copied from Vue/src/shared/util.js 31 | var hyphenateRE = /\B([A-Z])/g; 32 | var hyphenate = function (str) { return str.replace(hyphenateRE, "-$1").toLowerCase(); }; 33 | /** 34 | * decorator of $off 35 | * @public 36 | * @param event - The name of the event 37 | * @param method - The name of the method 38 | */ 39 | function Off(event, method) { 40 | return function (target, key, descriptor) { 41 | key = hyphenate(key); 42 | var original = descriptor.value; 43 | descriptor.value = function offer() { 44 | var args = []; 45 | for (var _i = 0; _i < arguments.length; _i++) { 46 | args[_i] = arguments[_i]; 47 | } 48 | if (original.apply(this, args) !== false) { 49 | if (method) { 50 | if (typeof this[method] === "function") { 51 | this.$off(event || key, this[method]); 52 | } 53 | else { 54 | throw new TypeError("must be a method name"); 55 | } 56 | } 57 | else if (event) { 58 | this.$off(event || key); 59 | } 60 | else { 61 | this.$off(); 62 | } 63 | } 64 | }; 65 | }; 66 | } 67 | /** 68 | * decorator of $on 69 | * @public 70 | * @param event - The name of the event 71 | */ 72 | function On(event) { 73 | return Component.createDecorator(function (componentOptions, k) { 74 | var key = hyphenate(k); 75 | if (typeof componentOptions.created !== "function") { 76 | componentOptions.created = function () { }; 77 | } 78 | var original = componentOptions.created; 79 | componentOptions.created = function () { 80 | original(); 81 | if (typeof componentOptions.methods !== "undefined") { 82 | this.$on(event || key, componentOptions.methods[k]); 83 | } 84 | }; 85 | }); 86 | } 87 | /** 88 | * decorator of $once 89 | * @public 90 | * @param event - The name of the event 91 | */ 92 | function Once(event) { 93 | return Component.createDecorator(function (componentOptions, k) { 94 | var key = hyphenate(k); 95 | if (typeof componentOptions.created !== "function") { 96 | componentOptions.created = function () { }; 97 | } 98 | var original = componentOptions.created; 99 | componentOptions.created = function () { 100 | original(); 101 | if (typeof componentOptions.methods !== "undefined") { 102 | this.$once(event || key, componentOptions.methods[k]); 103 | } 104 | }; 105 | }); 106 | } 107 | /** 108 | * decorator of $nextTick 109 | * 110 | * @public 111 | * @param method - Method name 112 | * @returns Method Decorator 113 | */ 114 | function NextTick(method) { 115 | return function (target, key, descriptor) { 116 | var original = descriptor.value; 117 | descriptor.value = function emitter() { 118 | var args = []; 119 | for (var _i = 0; _i < arguments.length; _i++) { 120 | args[_i] = arguments[_i]; 121 | } 122 | if (original.apply(this, args) !== false) 123 | if (typeof this[method] === "function") { 124 | this.$nextTick(this[method]); 125 | } 126 | else { 127 | throw new TypeError("must be a method name"); 128 | } 129 | }; 130 | }; 131 | } 132 | 133 | Object.defineProperty(exports, 'Vue', { 134 | enumerable: true, 135 | get: function () { 136 | return vue__default['default']; 137 | } 138 | }); 139 | Object.defineProperty(exports, 'Component', { 140 | enumerable: true, 141 | get: function () { 142 | return Component__default['default']; 143 | } 144 | }); 145 | Object.defineProperty(exports, 'mixins', { 146 | enumerable: true, 147 | get: function () { 148 | return Component.mixins; 149 | } 150 | }); 151 | Object.defineProperty(exports, 'Module', { 152 | enumerable: true, 153 | get: function () { 154 | return vuexModuleDecorators.Module; 155 | } 156 | }); 157 | Object.defineProperty(exports, 'MutationAction', { 158 | enumerable: true, 159 | get: function () { 160 | return vuexModuleDecorators.MutationAction; 161 | } 162 | }); 163 | Object.defineProperty(exports, 'VuexAction', { 164 | enumerable: true, 165 | get: function () { 166 | return vuexModuleDecorators.Action; 167 | } 168 | }); 169 | Object.defineProperty(exports, 'VuexModule', { 170 | enumerable: true, 171 | get: function () { 172 | return vuexModuleDecorators.VuexModule; 173 | } 174 | }); 175 | Object.defineProperty(exports, 'VuexMutation', { 176 | enumerable: true, 177 | get: function () { 178 | return vuexModuleDecorators.Mutation; 179 | } 180 | }); 181 | Object.defineProperty(exports, 'getModule', { 182 | enumerable: true, 183 | get: function () { 184 | return vuexModuleDecorators.getModule; 185 | } 186 | }); 187 | Object.defineProperty(exports, 'Action', { 188 | enumerable: true, 189 | get: function () { 190 | return vuexClass.Action; 191 | } 192 | }); 193 | Object.defineProperty(exports, 'Getter', { 194 | enumerable: true, 195 | get: function () { 196 | return vuexClass.Getter; 197 | } 198 | }); 199 | Object.defineProperty(exports, 'Mutation', { 200 | enumerable: true, 201 | get: function () { 202 | return vuexClass.Mutation; 203 | } 204 | }); 205 | Object.defineProperty(exports, 'State', { 206 | enumerable: true, 207 | get: function () { 208 | return vuexClass.State; 209 | } 210 | }); 211 | Object.defineProperty(exports, 'namespace', { 212 | enumerable: true, 213 | get: function () { 214 | return vuexClass.namespace; 215 | } 216 | }); 217 | Object.defineProperty(exports, 'Emit', { 218 | enumerable: true, 219 | get: function () { 220 | return vuePropertyDecorator.Emit; 221 | } 222 | }); 223 | Object.defineProperty(exports, 'Inject', { 224 | enumerable: true, 225 | get: function () { 226 | return vuePropertyDecorator.Inject; 227 | } 228 | }); 229 | Object.defineProperty(exports, 'InjectReactive', { 230 | enumerable: true, 231 | get: function () { 232 | return vuePropertyDecorator.InjectReactive; 233 | } 234 | }); 235 | Object.defineProperty(exports, 'Model', { 236 | enumerable: true, 237 | get: function () { 238 | return vuePropertyDecorator.Model; 239 | } 240 | }); 241 | Object.defineProperty(exports, 'ModelSync', { 242 | enumerable: true, 243 | get: function () { 244 | return vuePropertyDecorator.ModelSync; 245 | } 246 | }); 247 | Object.defineProperty(exports, 'Prop', { 248 | enumerable: true, 249 | get: function () { 250 | return vuePropertyDecorator.Prop; 251 | } 252 | }); 253 | Object.defineProperty(exports, 'PropSync', { 254 | enumerable: true, 255 | get: function () { 256 | return vuePropertyDecorator.PropSync; 257 | } 258 | }); 259 | Object.defineProperty(exports, 'Provide', { 260 | enumerable: true, 261 | get: function () { 262 | return vuePropertyDecorator.Provide; 263 | } 264 | }); 265 | Object.defineProperty(exports, 'ProvideReactive', { 266 | enumerable: true, 267 | get: function () { 268 | return vuePropertyDecorator.ProvideReactive; 269 | } 270 | }); 271 | Object.defineProperty(exports, 'Ref', { 272 | enumerable: true, 273 | get: function () { 274 | return vuePropertyDecorator.Ref; 275 | } 276 | }); 277 | Object.defineProperty(exports, 'VModel', { 278 | enumerable: true, 279 | get: function () { 280 | return vuePropertyDecorator.VModel; 281 | } 282 | }); 283 | Object.defineProperty(exports, 'Watch', { 284 | enumerable: true, 285 | get: function () { 286 | return vuePropertyDecorator.Watch; 287 | } 288 | }); 289 | exports.NextTick = NextTick; 290 | exports.Off = Off; 291 | exports.On = On; 292 | exports.Once = Once; 293 | 294 | Object.defineProperty(exports, '__esModule', { value: true }); 295 | 296 | }))); 297 | -------------------------------------------------------------------------------- /docs/assets/js/search.js: -------------------------------------------------------------------------------- 1 | var typedoc = typedoc || {}; 2 | typedoc.search = typedoc.search || {}; 3 | typedoc.search.data = {"kinds":{"1":"Module","32":"Variable","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","4194304":"Type alias"},"rows":[{"id":0,"kind":1,"name":"\"nuxt-property-decorator\"","url":"modules/_nuxt_property_decorator_.html","classes":"tsd-kind-module"},{"id":1,"kind":64,"name":"Off","url":"modules/_nuxt_property_decorator_.html#off","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":2,"kind":64,"name":"On","url":"modules/_nuxt_property_decorator_.html#on","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":3,"kind":64,"name":"Once","url":"modules/_nuxt_property_decorator_.html#once","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":4,"kind":64,"name":"NextTick","url":"modules/_nuxt_property_decorator_.html#nexttick","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":5,"kind":256,"name":"Vue","url":"interfaces/_nuxt_property_decorator_.vue.html","classes":"tsd-kind-interface tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":6,"kind":1024,"name":"$el","url":"interfaces/_nuxt_property_decorator_.vue.html#_el","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":7,"kind":1024,"name":"$options","url":"interfaces/_nuxt_property_decorator_.vue.html#_options","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":8,"kind":1024,"name":"$parent","url":"interfaces/_nuxt_property_decorator_.vue.html#_parent","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":9,"kind":1024,"name":"$root","url":"interfaces/_nuxt_property_decorator_.vue.html#_root","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":10,"kind":1024,"name":"$children","url":"interfaces/_nuxt_property_decorator_.vue.html#_children","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":11,"kind":1024,"name":"$refs","url":"interfaces/_nuxt_property_decorator_.vue.html#_refs","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":12,"kind":65536,"name":"__type","url":"interfaces/_nuxt_property_decorator_.vue.html#_refs.__type","classes":"tsd-kind-type-literal tsd-parent-kind-property","parent":"\"nuxt-property-decorator\".Vue.$refs"},{"id":13,"kind":1024,"name":"$slots","url":"interfaces/_nuxt_property_decorator_.vue.html#_slots","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":14,"kind":65536,"name":"__type","url":"interfaces/_nuxt_property_decorator_.vue.html#_slots.__type-2","classes":"tsd-kind-type-literal tsd-parent-kind-property","parent":"\"nuxt-property-decorator\".Vue.$slots"},{"id":15,"kind":1024,"name":"$scopedSlots","url":"interfaces/_nuxt_property_decorator_.vue.html#_scopedslots","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":16,"kind":65536,"name":"__type","url":"interfaces/_nuxt_property_decorator_.vue.html#_scopedslots.__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-property","parent":"\"nuxt-property-decorator\".Vue.$scopedSlots"},{"id":17,"kind":1024,"name":"$isServer","url":"interfaces/_nuxt_property_decorator_.vue.html#_isserver","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":18,"kind":1024,"name":"$data","url":"interfaces/_nuxt_property_decorator_.vue.html#_data","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":19,"kind":1024,"name":"$props","url":"interfaces/_nuxt_property_decorator_.vue.html#_props","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":20,"kind":1024,"name":"$ssrContext","url":"interfaces/_nuxt_property_decorator_.vue.html#_ssrcontext","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":21,"kind":1024,"name":"$vnode","url":"interfaces/_nuxt_property_decorator_.vue.html#_vnode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":22,"kind":1024,"name":"$attrs","url":"interfaces/_nuxt_property_decorator_.vue.html#_attrs","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":23,"kind":1024,"name":"$listeners","url":"interfaces/_nuxt_property_decorator_.vue.html#_listeners","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":24,"kind":2048,"name":"$mount","url":"interfaces/_nuxt_property_decorator_.vue.html#_mount","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":25,"kind":2048,"name":"$forceUpdate","url":"interfaces/_nuxt_property_decorator_.vue.html#_forceupdate","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":26,"kind":2048,"name":"$destroy","url":"interfaces/_nuxt_property_decorator_.vue.html#_destroy","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":27,"kind":1024,"name":"$set","url":"interfaces/_nuxt_property_decorator_.vue.html#_set","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":28,"kind":1024,"name":"$delete","url":"interfaces/_nuxt_property_decorator_.vue.html#_delete","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":29,"kind":2048,"name":"$watch","url":"interfaces/_nuxt_property_decorator_.vue.html#_watch","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"\"nuxt-property-decorator\".Vue"},{"id":30,"kind":2048,"name":"$on","url":"interfaces/_nuxt_property_decorator_.vue.html#_on","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":31,"kind":2048,"name":"$once","url":"interfaces/_nuxt_property_decorator_.vue.html#_once","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":32,"kind":2048,"name":"$off","url":"interfaces/_nuxt_property_decorator_.vue.html#_off","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":33,"kind":2048,"name":"$emit","url":"interfaces/_nuxt_property_decorator_.vue.html#_emit","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":34,"kind":2048,"name":"$nextTick","url":"interfaces/_nuxt_property_decorator_.vue.html#_nexttick","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":35,"kind":1024,"name":"$createElement","url":"interfaces/_nuxt_property_decorator_.vue.html#_createelement","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":36,"kind":32,"name":"Vue","url":"modules/_nuxt_property_decorator_.html#vue-1","classes":"tsd-kind-variable tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":37,"kind":1024,"name":"$store","url":"interfaces/_nuxt_property_decorator_.vue.html#_store","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"nuxt-property-decorator\".Vue"},{"id":38,"kind":64,"name":"mixins","url":"modules/_nuxt_property_decorator_.html#mixins","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"\"nuxt-property-decorator\""},{"id":39,"kind":64,"name":"Module","url":"modules/_nuxt_property_decorator_.html#module","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"\"nuxt-property-decorator\""},{"id":40,"kind":64,"name":"getModule","url":"modules/_nuxt_property_decorator_.html#getmodule","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"\"nuxt-property-decorator\""},{"id":41,"kind":128,"name":"VuexModule","url":"classes/_nuxt_property_decorator_.vuexmodule.html","classes":"tsd-kind-class tsd-parent-kind-module tsd-has-type-parameter","parent":"\"nuxt-property-decorator\""},{"id":42,"kind":1024,"name":"namespaced","url":"classes/_nuxt_property_decorator_.vuexmodule.html#namespaced-1","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-static","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":43,"kind":1024,"name":"state","url":"classes/_nuxt_property_decorator_.vuexmodule.html#state-1","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-static","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":44,"kind":1024,"name":"getters","url":"classes/_nuxt_property_decorator_.vuexmodule.html#getters-1","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-static","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":45,"kind":1024,"name":"actions","url":"classes/_nuxt_property_decorator_.vuexmodule.html#actions-1","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-static","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":46,"kind":1024,"name":"mutations","url":"classes/_nuxt_property_decorator_.vuexmodule.html#mutations-1","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-static","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":47,"kind":1024,"name":"modules","url":"classes/_nuxt_property_decorator_.vuexmodule.html#modules-1","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-static","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":48,"kind":1024,"name":"modules","url":"classes/_nuxt_property_decorator_.vuexmodule.html#modules","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":49,"kind":1024,"name":"namespaced","url":"classes/_nuxt_property_decorator_.vuexmodule.html#namespaced","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":50,"kind":1024,"name":"getters","url":"classes/_nuxt_property_decorator_.vuexmodule.html#getters","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":51,"kind":1024,"name":"state","url":"classes/_nuxt_property_decorator_.vuexmodule.html#state","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":52,"kind":1024,"name":"mutations","url":"classes/_nuxt_property_decorator_.vuexmodule.html#mutations","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":53,"kind":1024,"name":"actions","url":"classes/_nuxt_property_decorator_.vuexmodule.html#actions","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":54,"kind":1024,"name":"context","url":"classes/_nuxt_property_decorator_.vuexmodule.html#context","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":55,"kind":512,"name":"constructor","url":"classes/_nuxt_property_decorator_.vuexmodule.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"nuxt-property-decorator\".VuexModule"},{"id":56,"kind":64,"name":"Mutation","url":"modules/_nuxt_property_decorator_.html#mutation","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"\"nuxt-property-decorator\""},{"id":57,"kind":64,"name":"MutationAction","url":"modules/_nuxt_property_decorator_.html#mutationaction","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"\"nuxt-property-decorator\""},{"id":58,"kind":64,"name":"Action","url":"modules/_nuxt_property_decorator_.html#action","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"\"nuxt-property-decorator\""},{"id":59,"kind":32,"name":"State","url":"modules/_nuxt_property_decorator_.html#state","classes":"tsd-kind-variable tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":60,"kind":32,"name":"Getter","url":"modules/_nuxt_property_decorator_.html#getter","classes":"tsd-kind-variable tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":61,"kind":64,"name":"namespace","url":"modules/_nuxt_property_decorator_.html#namespace","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"\"nuxt-property-decorator\""},{"id":62,"kind":64,"name":"Emit","url":"modules/_nuxt_property_decorator_.html#emit","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":63,"kind":64,"name":"Inject","url":"modules/_nuxt_property_decorator_.html#inject","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":64,"kind":64,"name":"InjectReactive","url":"modules/_nuxt_property_decorator_.html#injectreactive","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":65,"kind":64,"name":"Model","url":"modules/_nuxt_property_decorator_.html#model","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":66,"kind":64,"name":"ModelSync","url":"modules/_nuxt_property_decorator_.html#modelsync","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":67,"kind":64,"name":"Prop","url":"modules/_nuxt_property_decorator_.html#prop","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":68,"kind":64,"name":"PropSync","url":"modules/_nuxt_property_decorator_.html#propsync","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":69,"kind":64,"name":"Provide","url":"modules/_nuxt_property_decorator_.html#provide","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":70,"kind":64,"name":"ProvideReactive","url":"modules/_nuxt_property_decorator_.html#providereactive","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":71,"kind":64,"name":"Ref","url":"modules/_nuxt_property_decorator_.html#ref","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":72,"kind":64,"name":"VModel","url":"modules/_nuxt_property_decorator_.html#vmodel","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":73,"kind":64,"name":"Watch","url":"modules/_nuxt_property_decorator_.html#watch","classes":"tsd-kind-function tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":74,"kind":4194304,"name":"Constructor","url":"modules/_nuxt_property_decorator_.html#constructor","classes":"tsd-kind-type-alias tsd-parent-kind-module","parent":"\"nuxt-property-decorator\""},{"id":75,"kind":65536,"name":"__type","url":"modules/_nuxt_property_decorator_.html#constructor.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"\"nuxt-property-decorator\".Constructor"},{"id":76,"kind":512,"name":"constructor","url":"modules/_nuxt_property_decorator_.html#constructor.__type.constructor-1","classes":"tsd-kind-constructor tsd-parent-kind-type-literal","parent":"\"nuxt-property-decorator\".Constructor.__type"}]}; -------------------------------------------------------------------------------- /api-extractor.json: -------------------------------------------------------------------------------- 1 | /** 2 | * Config file for API Extractor. For more info, please visit: https://api-extractor.com 3 | */ 4 | { 5 | "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", 6 | 7 | /** 8 | * Optionally specifies another JSON config file that this file extends from. This provides a way for 9 | * standard settings to be shared across multiple projects. 10 | * 11 | * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains 12 | * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be 13 | * resolved using NodeJS require(). 14 | * 15 | * SUPPORTED TOKENS: none 16 | * DEFAULT VALUE: "" 17 | */ 18 | // "extends": "./shared/api-extractor-base.json" 19 | // "extends": "my-package/include/api-extractor-base.json" 20 | 21 | /** 22 | * Determines the "" token that can be used with other config file settings. The project folder 23 | * typically contains the tsconfig.json and package.json config files, but the path is user-defined. 24 | * 25 | * The path is resolved relative to the folder of the config file that contains the setting. 26 | * 27 | * The default value for "projectFolder" is the token "", which means the folder is determined by traversing 28 | * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder 29 | * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error 30 | * will be reported. 31 | * 32 | * SUPPORTED TOKENS: 33 | * DEFAULT VALUE: "" 34 | */ 35 | // "projectFolder": "..", 36 | 37 | /** 38 | * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor 39 | * analyzes the symbols exported by this module. 40 | * 41 | * The file extension must be ".d.ts" and not ".ts". 42 | * 43 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 44 | * prepend a folder token such as "". 45 | * 46 | * SUPPORTED TOKENS: , , 47 | */ 48 | "mainEntryPointFilePath": "lib/nuxt-property-decorator.d.ts", 49 | 50 | /** 51 | * A list of NPM package names whose exports should be treated as part of this package. 52 | * 53 | * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", 54 | * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part 55 | * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly 56 | * imports library2. To avoid this, we can specify: 57 | * 58 | * "bundledPackages": [ "library2" ], 59 | * 60 | * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been 61 | * local files for library1. 62 | */ 63 | "bundledPackages": [], 64 | 65 | /** 66 | * Determines how the TypeScript compiler engine will be invoked by API Extractor. 67 | */ 68 | "compiler": { 69 | /** 70 | * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. 71 | * 72 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 73 | * prepend a folder token such as "". 74 | * 75 | * Note: This setting will be ignored if "overrideTsconfig" is used. 76 | * 77 | * SUPPORTED TOKENS: , , 78 | * DEFAULT VALUE: "/tsconfig.json" 79 | */ 80 | // "tsconfigFilePath": "/tsconfig.json", 81 | /** 82 | * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. 83 | * The object must conform to the TypeScript tsconfig schema: 84 | * 85 | * http://json.schemastore.org/tsconfig 86 | * 87 | * If omitted, then the tsconfig.json file will be read from the "projectFolder". 88 | * 89 | * DEFAULT VALUE: no overrideTsconfig section 90 | */ 91 | // "overrideTsconfig": { 92 | // . . . 93 | // } 94 | /** 95 | * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended 96 | * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when 97 | * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses 98 | * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. 99 | * 100 | * DEFAULT VALUE: false 101 | */ 102 | // "skipLibCheck": true, 103 | }, 104 | 105 | /** 106 | * Configures how the API report file (*.api.md) will be generated. 107 | */ 108 | "apiReport": { 109 | /** 110 | * (REQUIRED) Whether to generate an API report. 111 | */ 112 | "enabled": true, 113 | 114 | /** 115 | * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce 116 | * a full file path. 117 | * 118 | * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". 119 | * 120 | * SUPPORTED TOKENS: , 121 | * DEFAULT VALUE: ".api.md" 122 | */ 123 | // "reportFileName": ".api.md", 124 | 125 | /** 126 | * Specifies the folder where the API report file is written. The file name portion is determined by 127 | * the "reportFileName" setting. 128 | * 129 | * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, 130 | * e.g. for an API review. 131 | * 132 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 133 | * prepend a folder token such as "". 134 | * 135 | * SUPPORTED TOKENS: , , 136 | * DEFAULT VALUE: "/etc/" 137 | */ 138 | "reportFolder": "api/" 139 | 140 | /** 141 | * Specifies the folder where the temporary report file is written. The file name portion is determined by 142 | * the "reportFileName" setting. 143 | * 144 | * After the temporary file is written to disk, it is compared with the file in the "reportFolder". 145 | * If they are different, a production build will fail. 146 | * 147 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 148 | * prepend a folder token such as "". 149 | * 150 | * SUPPORTED TOKENS: , , 151 | * DEFAULT VALUE: "/temp/" 152 | */ 153 | // "reportTempFolder": "/temp/" 154 | }, 155 | 156 | /** 157 | * Configures how the doc model file (*.api.json) will be generated. 158 | */ 159 | "docModel": { 160 | /** 161 | * (REQUIRED) Whether to generate a doc model file. 162 | */ 163 | "enabled": true 164 | 165 | /** 166 | * The output path for the doc model file. The file extension should be ".api.json". 167 | * 168 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 169 | * prepend a folder token such as "". 170 | * 171 | * SUPPORTED TOKENS: , , 172 | * DEFAULT VALUE: "/temp/.api.json" 173 | */ 174 | // "apiJsonFilePath": "/temp/.api.json" 175 | }, 176 | 177 | /** 178 | * Configures how the .d.ts rollup file will be generated. 179 | */ 180 | "dtsRollup": { 181 | /** 182 | * (REQUIRED) Whether to generate the .d.ts rollup file. 183 | */ 184 | "enabled": true, 185 | 186 | /** 187 | * Specifies the output path for a .d.ts rollup file to be generated without any trimming. 188 | * This file will include all declarations that are exported by the main entry point. 189 | * 190 | * If the path is an empty string, then this file will not be written. 191 | * 192 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 193 | * prepend a folder token such as "". 194 | * 195 | * SUPPORTED TOKENS: , , 196 | * DEFAULT VALUE: "/dist/.d.ts" 197 | */ 198 | "untrimmedFilePath": "temp/nuxt-property-decorator.d.ts", 199 | 200 | /** 201 | * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. 202 | * This file will include only declarations that are marked as "@public" or "@beta". 203 | * 204 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 205 | * prepend a folder token such as "". 206 | * 207 | * SUPPORTED TOKENS: , , 208 | * DEFAULT VALUE: "" 209 | */ 210 | // "betaTrimmedFilePath": "/dist/-beta.d.ts", 211 | 212 | /** 213 | * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. 214 | * This file will include only declarations that are marked as "@public". 215 | * 216 | * If the path is an empty string, then this file will not be written. 217 | * 218 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 219 | * prepend a folder token such as "". 220 | * 221 | * SUPPORTED TOKENS: , , 222 | * DEFAULT VALUE: "" 223 | */ 224 | // "publicTrimmedFilePath": "/dist/-public.d.ts", 225 | 226 | /** 227 | * When a declaration is trimmed, by default it will be replaced by a code comment such as 228 | * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the 229 | * declaration completely. 230 | * 231 | * DEFAULT VALUE: false 232 | */ 233 | // "omitTrimmingComments": true 234 | }, 235 | 236 | /** 237 | * Configures how the tsdoc-metadata.json file will be generated. 238 | */ 239 | "tsdocMetadata": { 240 | /** 241 | * Whether to generate the tsdoc-metadata.json file. 242 | * 243 | * DEFAULT VALUE: true 244 | */ 245 | // "enabled": true, 246 | /** 247 | * Specifies where the TSDoc metadata file should be written. 248 | * 249 | * The path is resolved relative to the folder of the config file that contains the setting; to change this, 250 | * prepend a folder token such as "". 251 | * 252 | * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", 253 | * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup 254 | * falls back to "tsdoc-metadata.json" in the package folder. 255 | * 256 | * SUPPORTED TOKENS: , , 257 | * DEFAULT VALUE: "" 258 | */ 259 | // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" 260 | }, 261 | 262 | /** 263 | * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files 264 | * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. 265 | * To use the OS's default newline kind, specify "os". 266 | * 267 | * DEFAULT VALUE: "crlf" 268 | */ 269 | // "newlineKind": "crlf", 270 | 271 | /** 272 | * Configures how API Extractor reports error and warning messages produced during analysis. 273 | * 274 | * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. 275 | */ 276 | "messages": { 277 | /** 278 | * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing 279 | * the input .d.ts files. 280 | * 281 | * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" 282 | * 283 | * DEFAULT VALUE: A single "default" entry with logLevel=warning. 284 | */ 285 | "compilerMessageReporting": { 286 | /** 287 | * Configures the default routing for messages that don't match an explicit rule in this table. 288 | */ 289 | "default": { 290 | /** 291 | * Specifies whether the message should be written to the the tool's output log. Note that 292 | * the "addToApiReportFile" property may supersede this option. 293 | * 294 | * Possible values: "error", "warning", "none" 295 | * 296 | * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail 297 | * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes 298 | * the "--local" option), the warning is displayed but the build will not fail. 299 | * 300 | * DEFAULT VALUE: "warning" 301 | */ 302 | "logLevel": "warning" 303 | 304 | /** 305 | * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), 306 | * then the message will be written inside that file; otherwise, the message is instead logged according to 307 | * the "logLevel" option. 308 | * 309 | * DEFAULT VALUE: false 310 | */ 311 | // "addToApiReportFile": false 312 | } 313 | 314 | // "TS2551": { 315 | // "logLevel": "warning", 316 | // "addToApiReportFile": true 317 | // }, 318 | // 319 | // . . . 320 | }, 321 | 322 | /** 323 | * Configures handling of messages reported by API Extractor during its analysis. 324 | * 325 | * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" 326 | * 327 | * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings 328 | */ 329 | "extractorMessageReporting": { 330 | "default": { 331 | "logLevel": "warning" 332 | // "addToApiReportFile": false 333 | } 334 | 335 | // "ae-extra-release-tag": { 336 | // "logLevel": "warning", 337 | // "addToApiReportFile": true 338 | // }, 339 | // 340 | // . . . 341 | }, 342 | 343 | /** 344 | * Configures handling of messages reported by the TSDoc parser when analyzing code comments. 345 | * 346 | * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" 347 | * 348 | * DEFAULT VALUE: A single "default" entry with logLevel=warning. 349 | */ 350 | "tsdocMessageReporting": { 351 | "default": { 352 | "logLevel": "warning" 353 | // "addToApiReportFile": false 354 | } 355 | 356 | // "tsdoc-link-tag-unescaped-text": { 357 | // "logLevel": "warning", 358 | // "addToApiReportFile": true 359 | // }, 360 | // 361 | // . . . 362 | } 363 | } 364 | } 365 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | nuxt-property-decorator 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 |
44 |
45 | Menu 46 |
47 |
48 |
49 |
50 |
51 |
52 | 57 |

nuxt-property-decorator

58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | 66 |

Nuxt Property Decorator

67 |
68 |

69 | 70 | 71 | 72 |
73 | 74 | 75 | 76 | 77 | 78 | 79 |

80 |

Handy ES / TypeScript decorators for class-style Vue components in Nuxt (based on Vue class component) and Property decorators for Vue (bases on Vue Property Decorator) and Vuex (based on Vuex Class)

81 |

This library fully depends on vue-class-component.

82 | 83 |

License

84 |
85 |

MIT License

86 | 87 |

Install

88 |
89 |

Installation is very easy

90 |
npm i -S nuxt-property-decorator
91 |

or

92 |
yarn add nuxt-property-decorator
93 | 94 |

Nuxt JS Instructions

95 |
96 |

It works out of the box with Nuxt JS.

97 | 98 |

Nuxt TS Instructions

99 |
100 |

It works out of the box with Nuxt TS.

101 | 102 |

Decorators and helpers

103 |
104 |

There are following decorators:

105 |
    106 |
  • Nuxt specific decorators

    107 |
  • 108 |
  • @Off - decorator of $off

    109 |
  • 110 |
  • @On- decorator of $on

    111 |
  • 112 |
  • @Once- decorator of $once

    113 |
  • 114 |
  • @NextTick -decorator of $nextTick

    115 |
  • 116 |
  • exported from vue-class-component

    117 |
      118 |
    • @Component
    • 119 |
    120 |
  • 121 |
  • exported from vue-property-decorator

    122 | 136 |
  • 137 |
  • exported from vuex-class

    138 |
      139 |
    • @State
    • 140 |
    • @Getter
    • 141 |
    • @Action
    • 142 |
    • @Mutation
    • 143 |
    144 |
  • 145 |
  • exported from vuex-module-decorators

    146 |
      147 |
    • Module,
    • 148 |
    • getModule,
    • 149 |
    • VuexModule,
    • 150 |
    • VuexMutation (Mutation from original renamed to avoid conflict with 'vuex-class' one),
    • 151 |
    • MutationAction,
    • 152 |
    • VuexAction (Action from original renamed to avoid conflict with 'vuex-class' one),
    • 153 |
    154 |
  • 155 |
156 | 157 |

Other exports

158 |
159 |
    160 |
  • namespace
  • 161 |
  • mixins
  • 162 |
  • Vue
  • 163 |
164 | 165 |

Hooks

166 |
167 | 168 |

Vue Router hooks

169 |
170 |
    171 |
  • beforeRouteEnter
  • 172 |
  • beforeRouteUpdate
  • 173 |
  • beforeRouteLeave
  • 174 |
175 | 176 |

Nuxt hooks

177 |
178 |
    179 |
  • asyncData
  • 180 |
  • fetch
  • 181 |
  • fetchOnServer
  • 182 |
  • head
  • 183 |
  • key
  • 184 |
  • layout
  • 185 |
  • loading
  • 186 |
  • middleware
  • 187 |
  • scrollToTop
  • 188 |
  • transition
  • 189 |
  • validate
  • 190 |
  • watchQuery
  • 191 |
  • meta
  • 192 |
193 | 194 |

Vue-class Hooks

195 |
196 |
    197 |
  • data
  • 198 |
  • beforeCreate
  • 199 |
  • created
  • 200 |
  • beforeMount
  • 201 |
  • mounted
  • 202 |
  • beforeDestroy
  • 203 |
  • destroyed
  • 204 |
  • beforeUpdate
  • 205 |
  • updated
  • 206 |
  • activated
  • 207 |
  • deactivated
  • 208 |
  • render
  • 209 |
  • errorCaptured
  • 210 |
  • serverPrefetch
  • 211 |
212 | 213 |

Usage

214 |
215 |
import {
216 |   Component,
217 |   Inject,
218 |   Model,
219 |   Prop,
220 |   Provide,
221 |   Vue,
222 |   Watch,
223 | } from "nuxt-property-decorator"
224 | 
225 | const s = Symbol("baz")
226 | 
227 | @Component({
228 |   components: { comp },
229 | })
230 | export class MyComponent extends Vue {
231 |   @Inject() foo!: string
232 |   @Inject("bar") bar!: string
233 |   @Inject(s) baz!: string
234 | 
235 |   @Model("change") checked!: boolean
236 | 
237 |   @Prop()
238 |   propA!: number
239 | 
240 |   @Prop({ default: "default value" })
241 |   propB!: string
242 | 
243 |   @Prop([String, Boolean])
244 |   propC!: string | boolean
245 | 
246 |   @Prop({ type: null })
247 |   propD!: any
248 | 
249 |   @Provide() foo = "foo"
250 |   @Provide("bar") baz = "bar"
251 | 
252 |   @Watch("child")
253 |   onChildChanged(val: string, oldVal: string) {}
254 | 
255 |   @Watch("person", { immediate: true, deep: true })
256 |   onPersonChanged(val: Person, oldVal: Person) {}
257 | 
258 |   beforeRouteLeave(to, from, next) {
259 |     // called when the route that renders this component is about to
260 |     // be navigated away from.
261 |     // has access to `this` component instance.
262 |   }
263 | }
264 |

is equivalent to

265 |
const s = Symbol("baz")
266 | 
267 | export const MyComponent = Vue.extend({
268 |   name: "MyComponent",
269 |   components: { comp },
270 |   inject: {
271 |     foo: "foo",
272 |     bar: "bar",
273 |     [s]: s,
274 |   },
275 |   model: {
276 |     prop: "checked",
277 |     event: "change",
278 |   },
279 |   props: {
280 |     checked: Boolean,
281 |     propA: Number,
282 |     propB: {
283 |       type: String,
284 |       default: "default value",
285 |     },
286 |     propC: [String, Boolean],
287 |     propD: { type: null },
288 |   },
289 |   data() {
290 |     return {
291 |       foo: "foo",
292 |       baz: "bar",
293 |     }
294 |   },
295 |   provide() {
296 |     return {
297 |       foo: this.foo,
298 |       bar: this.baz,
299 |     }
300 |   },
301 |   methods: {
302 |     onChildChanged(val, oldVal) {},
303 |     onPersonChanged(val, oldVal) {},
304 |   },
305 |   beforeRouteLeave(to, from, next) {
306 |     // called when the route that renders this component is about to
307 |     // be navigated away from.
308 |     // has access to `this` component instance.
309 |   },
310 |   watch: {
311 |     child: {
312 |       handler: "onChildChanged",
313 |       immediate: false,
314 |       deep: false,
315 |     },
316 |     person: {
317 |       handler: "onPersonChanged",
318 |       immediate: true,
319 |       deep: true,
320 |     },
321 |   },
322 | })
323 |

As you can see at propA and propB, the type can be inferred automatically when it's a simple type. For more complex types like enums you do need to specify it specifically. 324 | Also this library needs to have emitDecoratorMetadata set to true for this to work.

325 | 326 |

Useful links

327 |
328 |

See also:

329 | 335 |
336 |
337 | 353 |
354 |
355 |
356 |
357 |

Legend

358 |
359 |
    360 |
  • Module
  • 361 |
  • Object literal
  • 362 |
  • Variable
  • 363 |
  • Function
  • 364 |
  • Function with type parameter
  • 365 |
  • Index signature
  • 366 |
  • Type alias
  • 367 |
  • Type alias with type parameter
  • 368 |
369 |
    370 |
  • Enumeration
  • 371 |
  • Enumeration member
  • 372 |
  • Property
  • 373 |
  • Method
  • 374 |
375 |
    376 |
  • Interface
  • 377 |
  • Interface with type parameter
  • 378 |
  • Constructor
  • 379 |
  • Property
  • 380 |
  • Method
  • 381 |
  • Index signature
  • 382 |
383 |
    384 |
  • Class
  • 385 |
  • Class with type parameter
  • 386 |
  • Constructor
  • 387 |
  • Property
  • 388 |
  • Method
  • 389 |
  • Accessor
  • 390 |
  • Index signature
  • 391 |
392 |
    393 |
  • Inherited constructor
  • 394 |
  • Inherited property
  • 395 |
  • Inherited method
  • 396 |
  • Inherited accessor
  • 397 |
398 |
    399 |
  • Protected property
  • 400 |
  • Protected method
  • 401 |
  • Protected accessor
  • 402 |
403 |
    404 |
  • Private property
  • 405 |
  • Private method
  • 406 |
  • Private accessor
  • 407 |
408 |
    409 |
  • Static property
  • 410 |
  • Static method
  • 411 |
412 |
413 |
414 |
415 |
416 |

Generated using TypeDoc

417 |
418 |
419 | 420 | 421 | 422 | -------------------------------------------------------------------------------- /docs/classes/_nuxt_property_decorator_.vuexmodule.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | VuexModule | nuxt-property-decorator 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 |
44 |
45 | Menu 46 |
47 |
48 |
49 |
50 |
51 |
52 | 63 |

Class VuexModule<S, R>

64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |

Type parameters

72 |
    73 |
  • 74 |

    S

    75 |
  • 76 |
  • 77 |

    R

    78 |
  • 79 |
80 |
81 |
82 |

Hierarchy

83 |
    84 |
  • 85 | VuexModule 86 |
  • 87 |
88 |
89 |
90 |

Implements

91 |
    92 |
  • Module<S, R>
  • 93 |
94 |
95 |
96 |

Index

97 |
98 |
99 |
100 |

Constructors

101 | 104 |
105 |
106 |

Properties

107 | 122 |
123 |
124 |
125 |
126 |
127 |

Constructors

128 |
129 | 130 |

constructor

131 |
    132 |
  • new VuexModule(module: Mod<S, any>): VuexModule
  • 133 |
134 |
    135 |
  • 136 | 141 |

    Parameters

    142 |
      143 |
    • 144 |
      module: Mod<S, any>
      145 |
    • 146 |
    147 |

    Returns VuexModule

    148 |
  • 149 |
150 |
151 |
152 |
153 |

Properties

154 |
155 | 156 |

Optional actions

157 |
actions: ActionTree<S, R>
158 | 163 |
164 |
165 | 166 |

context

167 |
context: ActionContext<S, R>
168 | 173 |
174 |
175 | 176 |

Optional getters

177 |
getters: GetterTree<S, R>
178 | 183 |
184 |
185 | 186 |

Optional modules

187 |
modules: ModuleTree<any>
188 | 193 |
194 |
195 | 196 |

Optional mutations

197 |
mutations: MutationTree<S>
198 | 203 |
204 |
205 | 206 |

Optional namespaced

207 |
namespaced: undefined | false | true
208 | 213 |
214 |
215 | 216 |

Optional state

217 |
state: S | (() => S)
218 | 223 |
224 |
225 | 226 |

Static Optional actions

227 |
actions: ActionTree<any, any>
228 | 233 |
234 |
235 | 236 |

Static Optional getters

237 |
getters: GetterTree<any, any>
238 | 243 |
244 |
245 | 246 |

Static Optional modules

247 |
modules: ModuleTree<any>
248 | 253 |
254 |
255 | 256 |

Static Optional mutations

257 |
mutations: MutationTree<any>
258 | 263 |
264 |
265 | 266 |

Static Optional namespaced

267 |
namespaced: undefined | false | true
268 | 273 |
274 |
275 | 276 |

Static Optional state

277 |
state: any | (() => any)
278 | 283 |
284 |
285 |
286 | 437 |
438 |
439 |
440 |
441 |

Legend

442 |
443 |
    444 |
  • Module
  • 445 |
  • Object literal
  • 446 |
  • Variable
  • 447 |
  • Function
  • 448 |
  • Function with type parameter
  • 449 |
  • Index signature
  • 450 |
  • Type alias
  • 451 |
  • Type alias with type parameter
  • 452 |
453 |
    454 |
  • Enumeration
  • 455 |
  • Enumeration member
  • 456 |
  • Property
  • 457 |
  • Method
  • 458 |
459 |
    460 |
  • Interface
  • 461 |
  • Interface with type parameter
  • 462 |
  • Constructor
  • 463 |
  • Property
  • 464 |
  • Method
  • 465 |
  • Index signature
  • 466 |
467 |
    468 |
  • Class
  • 469 |
  • Class with type parameter
  • 470 |
  • Constructor
  • 471 |
  • Property
  • 472 |
  • Method
  • 473 |
  • Accessor
  • 474 |
  • Index signature
  • 475 |
476 |
    477 |
  • Inherited constructor
  • 478 |
  • Inherited property
  • 479 |
  • Inherited method
  • 480 |
  • Inherited accessor
  • 481 |
482 |
    483 |
  • Protected property
  • 484 |
  • Protected method
  • 485 |
  • Protected accessor
  • 486 |
487 |
    488 |
  • Private property
  • 489 |
  • Private method
  • 490 |
  • Private accessor
  • 491 |
492 |
    493 |
  • Static property
  • 494 |
  • Static method
  • 495 |
496 |
497 |
498 |
499 |
500 |

Generated using TypeDoc

501 |
502 |
503 | 504 | 505 | 506 | -------------------------------------------------------------------------------- /docs/interfaces/_nuxt_property_decorator_.vue.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vue | nuxt-property-decorator 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 27 |
28 |
29 | Options 30 |
31 |
32 | All 33 |
    34 |
  • Public
  • 35 |
  • Public/Protected
  • 36 |
  • All
  • 37 |
38 |
39 | 40 | 41 | 42 | 43 |
44 |
45 | Menu 46 |
47 |
48 |
49 |
50 |
51 |
52 | 63 |

Interface Vue

64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |

Hierarchy

72 |
    73 |
  • 74 | Vue 75 |
  • 76 |
77 |
78 |
79 |

Index

80 |
81 |
82 |
83 |

Properties

84 | 105 |
106 |
107 |

Methods

108 | 119 |
120 |
121 |
122 |
123 |
124 |

Properties

125 |
126 | 127 |

$attrs

128 |
$attrs: Record<string, string>
129 | 134 |
135 |
136 | 137 |

$children

138 |
$children: Vue[]
139 | 144 |
145 |
146 | 147 |

$createElement

148 |
$createElement: CreateElement
149 | 154 |
155 |
156 | 157 |

$data

158 |
$data: Record<string, any>
159 | 164 |
165 |
166 | 167 |

$delete

168 |
$delete: typeof delete
169 | 174 |
175 |
176 | 177 |

$el

178 |
$el: Element
179 | 184 |
185 |
186 | 187 |

$isServer

188 |
$isServer: boolean
189 | 194 |
195 |
196 | 197 |

$listeners

198 |
$listeners: Record<string, Function | Function[]>
199 | 204 |
205 |
206 | 207 |

$options

208 |
$options: ComponentOptions<Vue>
209 | 214 |
215 |
216 | 217 |

$parent

218 |
$parent: Vue
219 | 224 |
225 |
226 | 227 |

$props

228 |
$props: Record<string, any>
229 | 234 |
235 |
236 | 237 |

$refs

238 |
$refs: {}
239 | 244 |
245 |

Type declaration

246 |
    247 |
  • 248 |
    [key: string]: Vue | Element | Vue[] | Element[]
    249 |
  • 250 |
251 |
252 |
253 |
254 | 255 |

$root

256 |
$root: Vue
257 | 262 |
263 |
264 | 265 |

$scopedSlots

266 |
$scopedSlots: {}
267 | 272 |
273 |

Type declaration

274 |
    275 |
  • 276 |
    [key: string]: NormalizedScopedSlot | undefined
    277 |
  • 278 |
279 |
280 |
281 |
282 | 283 |

$set

284 |
$set: typeof set
285 | 290 |
291 |
292 | 293 |

$slots

294 |
$slots: {}
295 | 300 |
301 |

Type declaration

302 |
    303 |
  • 304 |
    [key: string]: VNode[] | undefined
    305 |
  • 306 |
307 |
308 |
309 |
310 | 311 |

$ssrContext

312 |
$ssrContext: any
313 | 318 |
319 |
320 | 321 |

$store

322 |
$store: Store<any>
323 | 328 |
329 |
330 | 331 |

$vnode

332 |
$vnode: VNode
333 | 338 |
339 |
340 |
341 |

Methods

342 |
343 | 344 |

$destroy

345 |
    346 |
  • $destroy(): void
  • 347 |
348 |
    349 |
  • 350 | 355 |

    Returns void

    356 |
  • 357 |
358 |
359 |
360 | 361 |

$emit

362 |
    363 |
  • $emit(event: string, ...args: any[]): this
  • 364 |
365 |
    366 |
  • 367 | 372 |

    Parameters

    373 |
      374 |
    • 375 |
      event: string
      376 |
    • 377 |
    • 378 |
      Rest ...args: any[]
      379 |
    • 380 |
    381 |

    Returns this

    382 |
  • 383 |
384 |
385 |
386 | 387 |

$forceUpdate

388 |
    389 |
  • $forceUpdate(): void
  • 390 |
391 |
    392 |
  • 393 | 398 |

    Returns void

    399 |
  • 400 |
401 |
402 |
403 | 404 |

$mount

405 |
    406 |
  • $mount(elementOrSelector?: Element | string, hydrating?: undefined | false | true): this
  • 407 |
408 |
    409 |
  • 410 | 415 |

    Parameters

    416 |
      417 |
    • 418 |
      Optional elementOrSelector: Element | string
      419 |
    • 420 |
    • 421 |
      Optional hydrating: undefined | false | true
      422 |
    • 423 |
    424 |

    Returns this

    425 |
  • 426 |
427 |
428 |
429 | 430 |

$nextTick

431 |
    432 |
  • $nextTick(callback: (this: this) => void): void
  • 433 |
  • $nextTick(): Promise<void>
  • 434 |
435 |
    436 |
  • 437 | 442 |

    Parameters

    443 |
      444 |
    • 445 |
      callback: (this: this) => void
      446 |
        447 |
      • 448 |
          449 |
        • (this: this): void
        • 450 |
        451 |
          452 |
        • 453 |

          Parameters

          454 |
            455 |
          • 456 |
            this: this
            457 |
          • 458 |
          459 |

          Returns void

          460 |
        • 461 |
        462 |
      • 463 |
      464 |
    • 465 |
    466 |

    Returns void

    467 |
  • 468 |
  • 469 | 474 |

    Returns Promise<void>

    475 |
  • 476 |
477 |
478 |
479 | 480 |

$off

481 |
    482 |
  • $off(event?: string | string[], callback?: Function): this
  • 483 |
484 |
    485 |
  • 486 | 491 |

    Parameters

    492 |
      493 |
    • 494 |
      Optional event: string | string[]
      495 |
    • 496 |
    • 497 |
      Optional callback: Function
      498 |
    • 499 |
    500 |

    Returns this

    501 |
  • 502 |
503 |
504 |
505 | 506 |

$on

507 |
    508 |
  • $on(event: string | string[], callback: Function): this
  • 509 |
510 |
    511 |
  • 512 | 517 |

    Parameters

    518 |
      519 |
    • 520 |
      event: string | string[]
      521 |
    • 522 |
    • 523 |
      callback: Function
      524 |
    • 525 |
    526 |

    Returns this

    527 |
  • 528 |
529 |
530 |
531 | 532 |

$once

533 |
    534 |
  • $once(event: string | string[], callback: Function): this
  • 535 |
536 |
    537 |
  • 538 | 543 |

    Parameters

    544 |
      545 |
    • 546 |
      event: string | string[]
      547 |
    • 548 |
    • 549 |
      callback: Function
      550 |
    • 551 |
    552 |

    Returns this

    553 |
  • 554 |
555 |
556 |
557 | 558 |

$watch

559 |
    560 |
  • $watch(expOrFn: string, callback: (this: this, n: any, o: any) => void, options?: WatchOptions): () => void
  • 561 |
  • $watch<T>(expOrFn: (this: this) => T, callback: (this: this, n: T, o: T) => void, options?: WatchOptions): () => void
  • 562 |
563 |
    564 |
  • 565 | 570 |

    Parameters

    571 |
      572 |
    • 573 |
      expOrFn: string
      574 |
    • 575 |
    • 576 |
      callback: (this: this, n: any, o: any) => void
      577 |
        578 |
      • 579 |
          580 |
        • (this: this, n: any, o: any): void
        • 581 |
        582 |
          583 |
        • 584 |

          Parameters

          585 |
            586 |
          • 587 |
            this: this
            588 |
          • 589 |
          • 590 |
            n: any
            591 |
          • 592 |
          • 593 |
            o: any
            594 |
          • 595 |
          596 |

          Returns void

          597 |
        • 598 |
        599 |
      • 600 |
      601 |
    • 602 |
    • 603 |
      Optional options: WatchOptions
      604 |
    • 605 |
    606 |

    Returns () => void

    607 |
      608 |
    • 609 |
        610 |
      • (): void
      • 611 |
      612 |
        613 |
      • 614 |

        Returns void

        615 |
      • 616 |
      617 |
    • 618 |
    619 |
  • 620 |
  • 621 | 626 |

    Type parameters

    627 |
      628 |
    • 629 |

      T

      630 |
    • 631 |
    632 |

    Parameters

    633 |
      634 |
    • 635 |
      expOrFn: (this: this) => T
      636 |
        637 |
      • 638 |
          639 |
        • (this: this): T
        • 640 |
        641 |
          642 |
        • 643 |

          Parameters

          644 |
            645 |
          • 646 |
            this: this
            647 |
          • 648 |
          649 |

          Returns T

          650 |
        • 651 |
        652 |
      • 653 |
      654 |
    • 655 |
    • 656 |
      callback: (this: this, n: T, o: T) => void
      657 |
        658 |
      • 659 |
          660 |
        • (this: this, n: T, o: T): void
        • 661 |
        662 |
          663 |
        • 664 |

          Parameters

          665 |
            666 |
          • 667 |
            this: this
            668 |
          • 669 |
          • 670 |
            n: T
            671 |
          • 672 |
          • 673 |
            o: T
            674 |
          • 675 |
          676 |

          Returns void

          677 |
        • 678 |
        679 |
      • 680 |
      681 |
    • 682 |
    • 683 |
      Optional options: WatchOptions
      684 |
    • 685 |
    686 |

    Returns () => void

    687 |
      688 |
    • 689 |
        690 |
      • (): void
      • 691 |
      692 |
        693 |
      • 694 |

        Returns void

        695 |
      • 696 |
      697 |
    • 698 |
    699 |
  • 700 |
701 |
702 |
703 |
704 | 897 |
898 |
899 |
900 |
901 |

Legend

902 |
903 |
    904 |
  • Module
  • 905 |
  • Object literal
  • 906 |
  • Variable
  • 907 |
  • Function
  • 908 |
  • Function with type parameter
  • 909 |
  • Index signature
  • 910 |
  • Type alias
  • 911 |
  • Type alias with type parameter
  • 912 |
913 |
    914 |
  • Enumeration
  • 915 |
  • Enumeration member
  • 916 |
  • Property
  • 917 |
  • Method
  • 918 |
919 |
    920 |
  • Interface
  • 921 |
  • Interface with type parameter
  • 922 |
  • Constructor
  • 923 |
  • Property
  • 924 |
  • Method
  • 925 |
  • Index signature
  • 926 |
927 |
    928 |
  • Class
  • 929 |
  • Class with type parameter
  • 930 |
  • Constructor
  • 931 |
  • Property
  • 932 |
  • Method
  • 933 |
  • Accessor
  • 934 |
  • Index signature
  • 935 |
936 |
    937 |
  • Inherited constructor
  • 938 |
  • Inherited property
  • 939 |
  • Inherited method
  • 940 |
  • Inherited accessor
  • 941 |
942 |
    943 |
  • Protected property
  • 944 |
  • Protected method
  • 945 |
  • Protected accessor
  • 946 |
947 |
    948 |
  • Private property
  • 949 |
  • Private method
  • 950 |
  • Private accessor
  • 951 |
952 |
    953 |
  • Static property
  • 954 |
  • Static method
  • 955 |
956 |
957 |
958 |
959 |
960 |

Generated using TypeDoc

961 |
962 |
963 | 964 | 965 | 966 | --------------------------------------------------------------------------------