84be9df1818c0378673c9269404b79a10a8b784c7c2ae6911ff3b1c5e9f4c5e684db7486ae67f4fe197de27b5781926e923355491c2f0d207f7800cd57316f 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import * as V from "./index";
  2. import {
  3. DefaultData,
  4. DefaultProps,
  5. DefaultMethods,
  6. DefaultComputed,
  7. PropsDefinition
  8. } from "./options";
  9. // Expose some types for backward compatibility...
  10. declare namespace Vue {
  11. // vue.d.ts
  12. export type CreateElement = V.CreateElement;
  13. export type VueConstructor<V extends Vue = Vue> = V.VueConstructor<V>;
  14. // options.d.ts
  15. export type Component<Data=DefaultData<never>, Methods=DefaultMethods<never>, Computed=DefaultComputed, Props=DefaultProps> = V.Component<Data, Methods, Computed, Props>;
  16. export type AsyncComponent<Data=DefaultData<never>, Methods=DefaultMethods<never>, Computed=DefaultComputed, Props=DefaultProps> = V.AsyncComponent<Data, Methods, Computed, Props>;
  17. export type ComponentOptions<V extends Vue, Data=DefaultData<V>, Methods=DefaultMethods<V>, Computed=DefaultComputed, PropsDef=PropsDefinition<DefaultProps>, Props=DefaultProps> = V.ComponentOptions<V, Data, Methods, Computed, PropsDef, Props>;
  18. export type FunctionalComponentOptions<Props = DefaultProps, PropDefs = PropsDefinition<Props>> = V.FunctionalComponentOptions<Props, PropDefs>;
  19. export type RenderContext<Props=DefaultProps> = V.RenderContext<Props>;
  20. export type PropType<T> = V.PropType<T>;
  21. export type PropOptions<T=any> = V.PropOptions<T>;
  22. export type ComputedOptions<T> = V.ComputedOptions<T>;
  23. export type WatchHandler<T> = V.WatchHandler<T>;
  24. export type WatchOptions = V.WatchOptions;
  25. export type WatchOptionsWithHandler<T> = V.WatchOptionsWithHandler<T>;
  26. export type DirectiveFunction = V.DirectiveFunction;
  27. export type DirectiveOptions = V.DirectiveOptions;
  28. // plugin.d.ts
  29. export type PluginFunction<T> = V.PluginFunction<T>;
  30. export type PluginObject<T> = V.PluginObject<T>;
  31. // vnode.d.ts
  32. export type VNodeChildren = V.VNodeChildren;
  33. export type VNodeChildrenArrayContents = V.VNodeChildrenArrayContents;
  34. export type VNode = V.VNode;
  35. export type VNodeComponentOptions = V.VNodeComponentOptions;
  36. export type VNodeData = V.VNodeData;
  37. export type VNodeDirective = V.VNodeDirective;
  38. }
  39. declare class Vue extends V.default {}
  40. export = Vue;
  41. export as namespace Vue;