diff --git a/types/test/tsconfig.json b/types/test/tsconfig.json index 15809b5f786..b816ce07cdc 100644 --- a/types/test/tsconfig.json +++ b/types/test/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "target": "es5", + "experimentalDecorators": true, "lib": [ "dom", "es2015" diff --git a/types/test/vue-test.ts b/types/test/vue-test.ts index d9a8379a83f..40ded2d29ce 100644 --- a/types/test/vue-test.ts +++ b/types/test/vue-test.ts @@ -102,10 +102,10 @@ class Test extends Vue { this.compile("
{{ message }}
"); this .use(() => { - + }) .use(() => { - + }) .mixin({}) .mixin({}); @@ -193,3 +193,10 @@ Vue.extend({ return h('canvas', {}, [a]) } }) + +declare function decorate(v: VC): VC; + +@decorate +class Decorated extends Vue { + a = 123; +} diff --git a/types/vue.d.ts b/types/vue.d.ts index 349c3432908..2098a694dec 100644 --- a/types/vue.d.ts +++ b/types/vue.d.ts @@ -111,9 +111,9 @@ export interface VueConstructor { component(id: string, definition: FunctionalComponentOptions>): ExtendedVue; component(id: string, definition?: ComponentOptions): ExtendedVue; - use(plugin: PluginObject | PluginFunction, options?: T): this; - use(plugin: PluginObject | PluginFunction, ...options: any[]): this; - mixin(mixin: VueConstructor | ComponentOptions): this; + use(plugin: PluginObject | PluginFunction, options?: T): VueConstructor; + use(plugin: PluginObject | PluginFunction, ...options: any[]): VueConstructor; + mixin(mixin: VueConstructor | ComponentOptions): VueConstructor; compile(template: string): { render(createElement: typeof Vue.prototype.$createElement): VNode; staticRenderFns: (() => VNode)[];