|
1 | 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 | + |
2 | 6 | // `Vue` in `export = Vue` must be a namespace
|
3 |
| -declare namespace Vue {} |
| 7 | +// All available types are exported via this namespace |
| 8 | +declare namespace Vue { |
| 9 | + export type ComponentOptions = Options.ComponentOptions; |
| 10 | + export type FunctionalComponentOptions = Options.FunctionalComponentOptions; |
| 11 | + export type RenderContext = Options.RenderContext; |
| 12 | + export type PropOptions = Options.PropOptions; |
| 13 | + export type ComputedOptions = Options.ComputedOptions; |
| 14 | + export type WatchHandler = Options.WatchHandler; |
| 15 | + export type WatchOptions = Options.WatchOptions; |
| 16 | + export type DirectiveFunction = Options.DirectiveFunction; |
| 17 | + export type DirectiveOptions = Options.DirectiveOptions; |
| 18 | + |
| 19 | + export type PluginFunction<T> = Plugin.PluginFunction<T>; |
| 20 | + export type PluginObject<T> = Plugin.PluginObject<T>; |
| 21 | + |
| 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 | + |
4 | 30 | // TS cannot merge imported class with namespace, declare a subclass to bypass
|
5 | 31 | declare class Vue extends _Vue {}
|
| 32 | + |
6 | 33 | export = Vue;
|
0 commit comments