Herrington Darkholme 6 years ago
committed by Evan You
parent
commit
e06d2af276
  1. 1
      types/test/tsconfig.json
  2. 11
      types/test/vue-test.ts
  3. 6
      types/vue.d.ts

1
types/test/tsconfig.json

@ -1,6 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"

11
types/test/vue-test.ts

@ -102,10 +102,10 @@ class Test extends Vue {
this.compile("<div>{{ message }}</div>");
this
.use(() => {
})
.use(() => {
})
.mixin({})
.mixin({});
@ -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
types/vue.d.ts

@ -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)[];

Loading…
Cancel
Save