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