umd.d.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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<
  16. Data = DefaultData<never>,
  17. Methods = DefaultMethods<never>,
  18. Computed = DefaultComputed,
  19. Props = DefaultProps
  20. > = V.Component<Data, Methods, Computed, Props>
  21. export type AsyncComponent<
  22. Data = DefaultData<never>,
  23. Methods = DefaultMethods<never>,
  24. Computed = DefaultComputed,
  25. Props = DefaultProps
  26. > = V.AsyncComponent<Data, Methods, Computed, Props>
  27. export type ComponentOptions<
  28. V extends Vue,
  29. Data = DefaultData<V>,
  30. Methods = DefaultMethods<V>,
  31. Computed = DefaultComputed,
  32. PropsDef = PropsDefinition<DefaultProps>,
  33. Props = DefaultProps
  34. > = V.ComponentOptions<V, Data, Methods, Computed, PropsDef, Props>
  35. export type FunctionalComponentOptions<
  36. Props = DefaultProps,
  37. PropDefs = PropsDefinition<Props>
  38. > = V.FunctionalComponentOptions<Props, PropDefs>
  39. export type RenderContext<Props = DefaultProps> = V.RenderContext<Props>
  40. export type PropType<T> = V.PropType<T>
  41. export type PropOptions<T = any> = V.PropOptions<T>
  42. export type ComputedOptions<T> = V.ComputedOptions<T>
  43. export type WatchHandler<T> = V.WatchHandler<T>
  44. export type WatchOptions = V.WatchOptions
  45. export type WatchOptionsWithHandler<T> = V.WatchOptionsWithHandler<T>
  46. export type DirectiveFunction = V.DirectiveFunction
  47. export type DirectiveOptions = V.DirectiveOptions
  48. // plugin.d.ts
  49. export type PluginFunction<T> = V.PluginFunction<T>
  50. export type PluginObject<T> = V.PluginObject<T>
  51. // vnode.d.ts
  52. export type VNodeChildren = V.VNodeChildren
  53. export type VNodeChildrenArrayContents = V.VNodeChildrenArrayContents
  54. export type VNode = V.VNode
  55. export type VNodeComponentOptions = V.VNodeComponentOptions
  56. export type VNodeData = V.VNodeData
  57. export type VNodeDirective = V.VNodeDirective
  58. }
  59. declare class Vue extends V.default {}
  60. export = Vue
  61. export as namespace Vue