import { ExtractDefaultPropTypes, ExtractPropTypes } from './v3-component-props' import { nextTick, ShallowUnwrapRef, UnwrapNestedRefs, WatchOptions, WatchStopHandle } from './v3-generated' import { Data } from './common' import { Vue, VueConstructor } from './vue' import { ComponentOptions as Vue2ComponentOptions } from './options' import { ComputedOptions, MethodOptions, ExtractComputedReturns } from './v3-component-options' import { ComponentRenderEmitFn, EmitFn, EmitsOptions, ObjectEmitsOptions, Slots } from './v3-setup-context' type EmitsToProps = T extends string[] ? { [K in string & `on${Capitalize}`]?: (...args: any[]) => any } : T extends ObjectEmitsOptions ? { [K in string & `on${Capitalize}`]?: K extends `on${infer C}` ? T[Uncapitalize] extends null ? (...args: any[]) => any : ( ...args: T[Uncapitalize] extends (...args: infer P) => any ? P : never ) => any : never } : {} export type ComponentInstance = InstanceType // public properties exposed on the proxy, which is used as the render context // in templates (as `this` in the render option) export type ComponentRenderProxy< P = {}, // props type extracted from props option B = {}, // raw bindings returned from setup() D = {}, // return from data() C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin = {}, Extends = {}, Emits extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false > = { $data: D $props: Readonly< MakeDefaultsOptional extends true ? Partial & Omit

: P & PublicProps > $attrs: Record $emit: ComponentRenderEmitFn< Emits, keyof Emits, ComponentRenderProxy< P, B, D, C, M, Mixin, Extends, Emits, PublicProps, Defaults, MakeDefaultsOptional > > } & Readonly

& ShallowUnwrapRef & D & M & ExtractComputedReturns & Omit // for Vetur and TSX support type VueConstructorProxy< PropsOptions, RawBindings, Data, Computed extends ComputedOptions, Methods extends MethodOptions, Mixin = {}, Extends = {}, Emits extends EmitsOptions = {}, Props = ExtractPropTypes & ({} extends Emits ? {} : EmitsToProps) > = Omit & { new (...args: any[]): ComponentRenderProxy< Props, ShallowUnwrapRef, Data, Computed, Methods, Mixin, Extends, Emits, Props, ExtractDefaultPropTypes, true > } type DefaultData = object | ((this: V) => object) type DefaultMethods = { [key: string]: (this: V, ...args: any[]) => any } type DefaultComputed = { [key: string]: any } export type VueProxy< PropsOptions, RawBindings, Data = DefaultData, Computed extends ComputedOptions = DefaultComputed, Methods extends MethodOptions = DefaultMethods, Mixin = {}, Extends = {}, Emits extends EmitsOptions = {} > = Vue2ComponentOptions< Vue, ShallowUnwrapRef & Data, Methods, Computed, PropsOptions, ExtractPropTypes > & VueConstructorProxy< PropsOptions, RawBindings, Data, Computed, Methods, Mixin, Extends, Emits > // public properties exposed on the proxy, which is used as the render context // in templates (as `this` in the render option) export type ComponentPublicInstance< P = {}, // props type extracted from props option B = {}, // raw bindings returned from setup() D = {}, // return from data() C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false > = { $data: D $props: MakeDefaultsOptional extends true ? Partial & Omit

: P & PublicProps $attrs: Data $refs: Data $slots: Slots $root: ComponentPublicInstance | null $parent: ComponentPublicInstance | null $emit: EmitFn $el: any // $options: Options & MergedComponentOptionsOverride $forceUpdate: () => void $nextTick: typeof nextTick $watch( source: string | Function, cb: Function, options?: WatchOptions ): WatchStopHandle } & P & ShallowUnwrapRef & UnwrapNestedRefs & ExtractComputedReturns & M