Skip to content

Commit

Permalink
use different type for AnyComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Mar 2, 2023
1 parent 8ccb021 commit b738782
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mount } from '@vue/test-utils'
import { logDOM, fireEvent, screen } from '@testing-library/dom'
import { DefineComponent, ComponentOptionsWithoutProps, defineComponent } from 'vue'
import { ComponentOptionsWithoutProps, defineComponent } from 'vue'

let mountedWrappers = new Set()

Expand All @@ -16,7 +16,7 @@ function resolveContainer(): HTMLElement {

// It's not the most elegant type
// but Props and Emits need to be typed as any and not `{}`
type AnyComponent = DefineComponent<any, any, any, any, any, any, any, any>
type AnyComponent = ReturnType<typeof defineComponent>

export function createRenderTemplate(defaultComponents: Record<string, AnyComponent>) {
return (input: string | ComponentOptionsWithoutProps) => {
Expand Down

0 comments on commit b738782

Please sign in to comment.