Skip to content

Commit

Permalink
fix: add methods from baseWrapper to the wrapperLike interface (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
kensodemann committed Dec 29, 2021
1 parent 3992c1e commit 9ece629
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/interfaces/wrapperLike.ts
@@ -1,3 +1,5 @@
import { DomEventNameWithModifier } from 'src/constants/dom-events'
import { TriggerOptions } from 'src/createDomEvent'
import {
DefinedComponent,
FindAllComponentsSelector,
Expand Down Expand Up @@ -92,11 +94,24 @@ export default interface WrapperLike {

html(): string

classes(): string[]
classes(className: string): boolean
classes(className?: string): string[] | boolean

attributes(): { [key: string]: string }
attributes(key: string): string
attributes(key?: string): { [key: string]: string } | string

text(): string
exists(): boolean

setValue(value: any): Promise<void>

isVisible(): boolean

trigger(
eventString: DomEventNameWithModifier,
options?: TriggerOptions
): Promise<void>
trigger(eventString: string, options?: TriggerOptions): Promise<void>
}

0 comments on commit 9ece629

Please sign in to comment.