import * as V from './vue'; import * as Options from './options'; import * as Plugin from './plugin'; declare global { interface Array { $remove(item: T): Array; $set(index: any, val: T): T; } // For the projects/tools that depend on this namespace namespace vuejs { export type PropOption = Options.PropOptions; export type ComputedOption = Options.ComputedOptions; export type WatchOption = Options.WatchOptions; export type DirectiveOption = Options.DirectiveOptions; export type Directive = Options.DirectiveInstance; export type TransitionOpsion = Options.TransitionOptions; export type ComponentOption = Options.ComponentOptions; export type FilterOption = Options.FilterOptions; export type Vue = V.Vue; export type VueStatic = typeof V.Vue; export type VueConfig = typeof V.Vue.config; } } // `Vue` in `export = Vue` must be a namespace // All available types are exported via this namespace declare namespace Vue { export type Component = Options.Component; export type AsyncComponent = Options.AsyncComponent; export type ComponentOptions = Options.ComponentOptions; export type PropOptions = Options.PropOptions; export type ComputedOptions = Options.ComputedOptions; export type WatchHandler = Options.WatchHandler; export type WatchOptions = Options.WatchOptions; export type DirectiveInstance = Options.DirectiveInstance; export type DirectiveFunction = Options.DirectiveFunction; export type DirectiveOptions = Options.DirectiveOptions; export type FilterOptions = Options.FilterOptions; export type TransitionOpsions = Options.TransitionOptions; export type PluginFunction = Plugin.PluginFunction; export type PluginObject = Plugin.PluginObject; } // TS cannot merge imported class with namespace, declare a subclass to bypass declare class Vue extends V.Vue { } export = Vue;