diff --git a/src/mount.ts b/src/mount.ts index d10e00494..36651e962 100644 --- a/src/mount.ts +++ b/src/mount.ts @@ -45,8 +45,6 @@ import { trackInstance } from './utils/autoUnmount' import { createVueWrapper } from './wrapperFactory' // NOTE this should come from `vue` -type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps - const MOUNT_OPTIONS: Array> = [ 'attachTo', 'attrs', @@ -57,24 +55,6 @@ const MOUNT_OPTIONS: Array> = [ 'shallow' ] -type ComponentMountingOptions = T extends DefineComponent< - infer PropsOrPropOptions, - any, - infer D, - any, - any -> - ? MountingOptions< - Partial> & - Omit< - Readonly> & PublicProps, - keyof ExtractDefaultPropTypes - >, - D - > & - Record - : MountingOptions - function getInstanceOptions( options: MountingOptions & Record ): Record { @@ -94,6 +74,26 @@ function getInstanceOptions( return resultOptions } +type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps + +type ComponentMountingOptions = T extends DefineComponent< + infer PropsOrPropOptions, + any, + infer D, + any, + any +> + ? MountingOptions< + Partial> & + Omit< + Readonly> & PublicProps, + keyof ExtractDefaultPropTypes + >, + D + > & + Record + : MountingOptions + // Class component (without vue-class-component) - no props export function mount( originalComponent: {