Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions types/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
Expand Down
11 changes: 9 additions & 2 deletions types/test/vue-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ class Test extends Vue {
this.compile("<div>{{ message }}</div>");
this
.use(() => {

})
.use(() => {

})
.mixin({})
.mixin({});
Expand Down Expand Up @@ -193,3 +193,10 @@ Vue.extend({
return h('canvas', {}, [a])
}
})

declare function decorate<VC extends typeof Vue>(v: VC): VC;

@decorate
class Decorated extends Vue {
a = 123;
}
6 changes: 3 additions & 3 deletions types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ export interface VueConstructor<V extends Vue = Vue> {
component<Props>(id: string, definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>): ExtendedVue<V, {}, {}, {}, Props>;
component(id: string, definition?: ComponentOptions<V>): ExtendedVue<V, {}, {}, {}, {}>;

use<T>(plugin: PluginObject<T> | PluginFunction<T>, options?: T): this;
use(plugin: PluginObject<any> | PluginFunction<any>, ...options: any[]): this;
mixin(mixin: VueConstructor | ComponentOptions<Vue>): this;
use<T>(plugin: PluginObject<T> | PluginFunction<T>, options?: T): VueConstructor<V>;
use(plugin: PluginObject<any> | PluginFunction<any>, ...options: any[]): VueConstructor<V>;
mixin(mixin: VueConstructor | ComponentOptions<Vue>): VueConstructor<V>;
compile(template: string): {
render(createElement: typeof Vue.prototype.$createElement): VNode;
staticRenderFns: (() => VNode)[];
Expand Down