File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 22 ComponentPublicInstance ,
33 DefineComponent ,
44 VNode ,
5- ComponentProps ,
65 ComponentInstance
76} from 'vue'
87import type { ComponentSlots } from 'vue-component-type-helpers'
@@ -11,6 +10,7 @@ import { MountingOptions } from './types'
1110import { trackInstance } from './utils/autoUnmount'
1211import { VueWrapper } from './vueWrapper'
1312import { createVueWrapper } from './wrapperFactory'
13+ import { ComponentPropsWithDefaultOptional } from 'vue'
1414
1515type ShimSlotReturnType < T > = T extends ( ...args : infer P ) => any
1616 ? ( ...args : P ) => any
@@ -35,14 +35,6 @@ export type ComponentMountingOptions<T, P> = Omit<
3535 }
3636} & Record < string , unknown >
3737
38- // export function mount<T extends { new (): { $props: any } }>(
39- // originalComponent: T,
40- // options?: ComponentMountingOptions<T, ComponentProps<T>>
41- // ): //VueWrapper<ComponentInstance<T>>
42- // {
43- // props: ComponentProps<T>
44- // }
45-
4638// defineComponent
4739export function mount <
4840 T extends DefineComponent <
@@ -60,7 +52,7 @@ export function mount<
6052 PropsOrOptions
6153> (
6254 originalComponent : T ,
63- options ?: ComponentMountingOptions < T , ComponentProps < T > >
55+ options ?: ComponentMountingOptions < T , ComponentPropsWithDefaultOptional < T > >
6456) : VueWrapper < ComponentInstance < T > >
6557// implementation
6658export function mount (
Original file line number Diff line number Diff line change @@ -168,7 +168,6 @@ mount(ShimComponent, {
168168 }
169169} )
170170
171- // TODO it should work
172171mount ( ShimComponent , {
173172 data ( ) {
174173 return {
You can’t perform that action at this time.
0 commit comments