diff --git a/vue/vue-tests.ts b/vue/vue-tests.ts index 540f9f5ba..297379bbb 100644 --- a/vue/vue-tests.ts +++ b/vue/vue-tests.ts @@ -17,7 +17,7 @@ module myapp { }); this.methods = { action: this.action - } + }; } action(): void { console.log("action"); @@ -27,3 +27,7 @@ module myapp { var app = new myapp.Application(); app.$mount("#main"); + +var AppConstructor = Vue.extend({}); +var extendedApp = new AppConstructor(); +app.$mount("#main"); diff --git a/vue/vue.d.ts b/vue/vue.d.ts index 25fcc4277..109f81762 100644 --- a/vue/vue.d.ts +++ b/vue/vue.d.ts @@ -120,7 +120,7 @@ declare module vuejs { * http://vuejs.org/api/global-api.html */ static config: VueConfig; - static extend(options: {}): Vue; + static extend(options: {}): typeof Vue; static directive(id: string, definition?: {}): void; static directive(id: string, definition?: VueCallback): void; static filter(id: string, definition?: FilterCallback): void; @@ -168,4 +168,4 @@ import Vue = vuejs.Vue; declare module "vue" { import vue = vuejs.Vue; export = vue; -} \ No newline at end of file +}