= T extends new (...args: any) => {
$props: infer P;
} ? NonNullable : T extends (props: infer P, ...args: any) => any ? P : {};
type ComponentSlots = T extends new (...args: any) => {
$slots: infer S;
} ? NonNullable : T extends (props: any, ctx: {
slots: infer S;
attrs: any;
emit: any;
}, ...args: any) => any ? NonNullable : {};
type ComponentExposed = T extends new (...args: any) => infer E ? E : T extends (props: any, ctx: any, expose: (exposed: infer E) => any, ...args: any) => any ? NonNullable : {};
type ShimSlotReturnType = T extends (...args: infer P) => any ? (...args: P) => any : never;
type WithArray = T | T[];
type ComponentData = T extends {
data?(...args: any): infer D;
} ? D : {};
type ComponentMountingOptions$1 = ComponentProps> = Omit>, 'slots'> & {
slots?: {
[K in keyof ComponentSlots]: WithArray[K]> | string | VNode | (new () => any) | {
template: string;
}>;
};
} & Record;
declare function mount$1 any) | (new (...args: any) => any) ? T : T extends {
props?: infer Props;
} ? DefineComponent | (infer PropNames)[] ? {
[key in PropNames extends string ? PropNames : string]?: any;
} : Props> : DefineComponent, P extends ComponentProps = ComponentProps>(originalComponent: T, options?: ComponentMountingOptions$1): VueWrapper & ComponentData & ComponentExposed, ComponentPublicInstance, ComponentData & ComponentExposed & Omit>>>;
declare const shallowMount: typeof mount$1;
declare function renderToString any) | (new (...args: any) => any) ? T : T extends {
props?: infer Props;
} ? DefineComponent | (infer PropNames)[] ? {
[key in PropNames extends string ? PropNames : string]?: any;
} : Props> : DefineComponent>(originalComponent: T, options?: ComponentMountingOptions$1 & Pick, 'attachTo'>): Promise;
declare const RouterLinkStub: vue.DefineComponent<{
to: {
type: (ObjectConstructor | StringConstructor)[];
required: true;
};
custom: {
type: BooleanConstructor;
default: boolean;
};
}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly>, {
custom: boolean;
}, {}>;
declare function createWrapperError(wrapperType: 'DOMWrapper' | 'VueWrapper'): T;
type CustomCreateStub = (params: {
name: string;
component: ConcreteComponent;
registerStub: (config: {
source: Component;
stub: Component;
}) => void;
}) => ConcreteComponent;
interface GlobalConfigOptions {
global: Required> & {
stubs: Record;
};
plugins: {
VueWrapper: Pluggable;
DOMWrapper: Pluggable>;
createStubs?: CustomCreateStub;
};
/**
* @deprecated use global.
*/
renderStubDefaultSlot?: boolean;
}
interface Plugin {
handler(instance: Instance): Record;
handler(instance: Instance, options: O): Record;
options: O;
}
declare class Pluggable> {
installedPlugins: Plugin[];
install(handler: (instance: Instance) => Record): void;
install(handler: (instance: Instance, options: O) => Record, options: O): void;
extend(instance: Instance): void;
/** For testing */
reset(): void;
}
declare const config: GlobalConfigOptions;
declare function flushPromises(): Promise;
declare function disableAutoUnmount(): void;
declare function enableAutoUnmount(hook: (callback: () => void) => void): void;
type _VueTestUtils_BaseWrapper = BaseWrapper;
declare const _VueTestUtils_BaseWrapper: typeof BaseWrapper;
type _VueTestUtils_DOMWrapper = DOMWrapper;
declare const _VueTestUtils_DOMWrapper: typeof DOMWrapper;
declare const _VueTestUtils_RouterLinkStub: typeof RouterLinkStub;
type _VueTestUtils_VueWrapper = VueWrapper;
declare const _VueTestUtils_VueWrapper: typeof VueWrapper;
declare const _VueTestUtils_config: typeof config;
declare const _VueTestUtils_createWrapperError: typeof createWrapperError;
declare const _VueTestUtils_disableAutoUnmount: typeof disableAutoUnmount;
declare const _VueTestUtils_enableAutoUnmount: typeof enableAutoUnmount;
declare const _VueTestUtils_flushPromises: typeof flushPromises;
declare const _VueTestUtils_renderToString: typeof renderToString;
declare const _VueTestUtils_shallowMount: typeof shallowMount;
declare namespace _VueTestUtils {
export { _VueTestUtils_BaseWrapper as BaseWrapper, _VueTestUtils_DOMWrapper as DOMWrapper, _VueTestUtils_RouterLinkStub as RouterLinkStub, _VueTestUtils_VueWrapper as VueWrapper, _VueTestUtils_config as config, _VueTestUtils_createWrapperError as createWrapperError, _VueTestUtils_disableAutoUnmount as disableAutoUnmount, _VueTestUtils_enableAutoUnmount as enableAutoUnmount, _VueTestUtils_flushPromises as flushPromises, mount$1 as mount, _VueTestUtils_renderToString as renderToString, _VueTestUtils_shallowMount as shallowMount };
export type { ComponentMountingOptions$1 as ComponentMountingOptions, MountingOptions$1 as MountingOptions };
}
declare const VueTestUtils: Omit;
type GlobalMountOptions = Required>['global'];
declare global {
namespace Cypress {
interface Cypress {
vueWrapper: VueWrapper;
vue: ComponentPublicInstance;
}
}
}
type MountingOptions = Omit, 'attachTo'> & {
log?: boolean;
/**
* @deprecated use vue-test-utils `global` instead
*/
extensions?: GlobalMountOptions & {
use?: GlobalMountOptions['plugins'];
mixin?: GlobalMountOptions['mixins'];
};
};
type CyMountOptions = MountingOptions;
/**
* The types for mount have been copied directly from the VTU mount
* https://github.com/vuejs/vue-test-utils-next/blob/master/src/mount.ts.
*
* There isn't a good way to make them generic enough that we can extend them.
*
* In addition, we modify the types slightly.
*
* `MountOptions` are modifying, including some Cypress specific options like `styles`.
* The return type is different. Instead of VueWrapper, it's Cypress.Chainable>.
*/
type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
type ComponentMountingOptions = T extends DefineComponent ? MountingOptions> & Omit> & PublicProps, keyof ExtractDefaultPropTypes>, D> & Record : MountingOptions;
declare function mount(originalComponent: {
new (...args: any[]): V;
__vccOpts: any;
}, options?: MountingOptions & Record