index.d.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import {Vue as _Vue} 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 Component = Options.Component;
  9. export type AsyncComponent = Options.AsyncComponent;
  10. export type ComponentOptions<V extends Vue> = Options.ComponentOptions<V>;
  11. export type FunctionalComponentOptions = Options.FunctionalComponentOptions;
  12. export type RenderContext = Options.RenderContext;
  13. export type PropOptions = Options.PropOptions;
  14. export type ComputedOptions<V extends Vue> = Options.ComputedOptions<V>;
  15. export type WatchHandler<V extends Vue> = Options.WatchHandler<V>;
  16. export type WatchOptions = Options.WatchOptions;
  17. export type DirectiveFunction = Options.DirectiveFunction;
  18. export type DirectiveOptions = Options.DirectiveOptions;
  19. export type PluginFunction<T> = Plugin.PluginFunction<T>;
  20. export type PluginObject<T> = Plugin.PluginObject<T>;
  21. export type VNodeChildren = VNode.VNodeChildren;
  22. export type VNodeChildrenArrayContents = VNode.VNodeChildrenArrayContents;
  23. export type VNode = VNode.VNode;
  24. export type VNodeComponentOptions = VNode.VNodeComponentOptions;
  25. export type VNodeData = VNode.VNodeData;
  26. export type VNodeDirective = VNode.VNodeDirective;
  27. }
  28. // TS cannot merge imported class with namespace, declare a subclass to bypass
  29. declare class Vue extends _Vue {}
  30. export = Vue;