Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert default element typings to HTMLElement #1885

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/test-utils/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ interface BaseWrapper {
selector: Selector | void
}

export interface Wrapper<V extends Vue | null, el extends Element = Element> extends BaseWrapper {
export interface Wrapper<V extends Vue | null, el extends HTMLElement = HTMLElement> extends BaseWrapper {
readonly vm: V
readonly element: el
readonly options: WrapperOptions

get<R extends Vue> (selector: VueClass<R>): Wrapper<R>
get<R extends Vue> (selector: ComponentOptions<R>): Wrapper<R>
get<Props = DefaultProps, PropDefs = PropsDefinition<Props>>(selector: FunctionalComponentOptions<Props, PropDefs>): Wrapper<Vue>
get<el extends Element>(selector: string): Wrapper<Vue, el>
get<el extends HTMLElement>(selector: string): Wrapper<Vue, el>
get (selector: RefSelector): Wrapper<Vue>
get (selector: NameSelector): Wrapper<Vue>

Expand All @@ -96,7 +96,7 @@ export interface Wrapper<V extends Vue | null, el extends Element = Element> ext
find<R extends Vue> (selector: VueClass<R>): Wrapper<R>
find<R extends Vue> (selector: ComponentOptions<R>): Wrapper<R>
find<Props = DefaultProps, PropDefs = PropsDefinition<Props>>(selector: FunctionalComponentOptions<Props, PropDefs>): Wrapper<Vue>
find<el extends Element>(selector: string): Wrapper<Vue, el>
find<el extends HTMLElement>(selector: string): Wrapper<Vue, el>
find (selector: RefSelector): Wrapper<Vue>
find (selector: NameSelector): Wrapper<Vue>

Expand Down
1 change: 1 addition & 0 deletions packages/test-utils/types/test/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ found = wrapper.find({ name: 'my-button' })
selector = found.selector

wrapper.find<HTMLInputElement>('input').element.value
wrapper.find('div').element.click()

let array = wrapper.findAll('.bar')
selector = array.selector
Expand Down