index.d.ts 1.5 KB

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