Skip to content

Commit

Permalink
fix(types): allow all elements (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickserv authored Nov 20, 2020
1 parent 8871d2f commit a5bd6cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import {queries, EventType, BoundFunctions} from '@testing-library/dom'
export * from '@testing-library/dom'

export interface RenderResult extends BoundFunctions<typeof queries> {
container: HTMLElement
baseElement: HTMLElement
container: Element
baseElement: Element
debug: (
baseElement?:
| HTMLElement
| Element
| DocumentFragment
| Array<HTMLElement | DocumentFragment>,
| Array<Element | DocumentFragment>,
maxLength?: number,
options?: PrettyFormatOptions,
) => void
Expand All @@ -36,8 +36,8 @@ export interface RenderOptions<V extends Vue, S = {}>
props?: object
store?: StoreOptions<S>
routes?: RouteConfig[]
container?: HTMLElement
baseElement?: HTMLElement
container?: Element
baseElement?: Element
}

export type ConfigurationCallback<V extends Vue> = (
Expand Down Expand Up @@ -68,7 +68,7 @@ export interface VueFireEventObject extends AsyncFireObject {
element: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement,
value: string,
): Promise<void>
update(element: HTMLElement, value?: string): Promise<void>
update(element: Element, value?: string): Promise<void>
}

export const fireEvent: VueFireEventObject
2 changes: 1 addition & 1 deletion types/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Vue from 'vue'
import {render, fireEvent, screen, waitFor} from '@testing-library/vue'

declare const elem: HTMLElement
declare const elem: Element

const SomeComponent = Vue.extend({
name: 'SomeComponent',
Expand Down

0 comments on commit a5bd6cc

Please sign in to comment.