UNPKG

1.56 kBTypeScriptView Raw
1import * as V from "./vue";
2import * as Options from "./options";
3import * as Plugin from "./plugin";
4import * as VNode from "./vnode";
5
6// `Vue` in `export = Vue` must be a namespace
7// All available types are exported via this namespace
8declare namespace Vue {
9 export type CreateElement = V.CreateElement;
10
11 export type Component = Options.Component;
12 export type AsyncComponent = Options.AsyncComponent;
13 export type ComponentOptions<V extends Vue> = Options.ComponentOptions<V>;
14 export type FunctionalComponentOptions = Options.FunctionalComponentOptions;
15 export type RenderContext = Options.RenderContext;
16 export type PropOptions = Options.PropOptions;
17 export type ComputedOptions<V extends Vue> = Options.ComputedOptions<V>;
18 export type WatchHandler<V extends Vue> = Options.WatchHandler<V, any>;
19 export type WatchOptions = Options.WatchOptions;
20 export type DirectiveFunction = Options.DirectiveFunction;
21 export type DirectiveOptions = Options.DirectiveOptions;
22
23 export type PluginFunction<T> = Plugin.PluginFunction<T>;
24 export type PluginObject<T> = Plugin.PluginObject<T>;
25
26 export type VNodeChildren = VNode.VNodeChildren;
27 export type VNodeChildrenArrayContents = VNode.VNodeChildrenArrayContents;
28 export type VNode = VNode.VNode;
29 export type VNodeComponentOptions = VNode.VNodeComponentOptions;
30 export type VNodeData = VNode.VNodeData;
31 export type VNodeDirective = VNode.VNodeDirective;
32}
33
34// TS cannot merge imported class with namespace, declare a subclass to bypass
35declare class Vue extends V.Vue {}
36
37export = Vue;