forked from veykos/mithril-query-jsdom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mithril-query.d.ts
60 lines (55 loc) · 2.04 KB
/
mithril-query.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
declare var MithrilQuery: (...options: any[]) => MithrilQueryInstance
interface KeyEventOptions {
target?: any
value?: any
altKey?: boolean
shiftKey?: boolean
ctrlKey?: boolean
silent?: boolean
}
interface MithrilQueryInstance {
rootNode: any
redraw: () => void
first: (selector: string) => any
has: (selector: string) => boolean
contains: (value: string) => string
find: (selector: string) => any[]
setValue: (selector: string, value: string, silent?: boolean) => void
focus: (selector: string, event?: Event, silent?: boolean) => void
click: (selector: string, event?: Event, silent?: boolean) => void
blur: (selector: string, event: Event, silent?: boolean) => void
mousedown: (selector: string, event: Event, silent?: boolean) => void
mouseup: (selector: string, event: Event, silent?: boolean) => void
mouseover: (selector: string, event: Event, silent?: boolean) => void
mouseout: (selector: string, event: Event, silent?: boolean) => void
mouseenter: (selector: string, event: Event, silent?: boolean) => void
mouseleave: (selector: string, event: Event, silent?: boolean) => void
contextmenu: (selector: string, event: Event, silent?: boolean) => void
keydown: (selector: string, key: string, event: Event, silent?: boolean) => void
keypress: (selector: string, key: string, event: Event, silent?: boolean) => void
keyup: (selector: string, key: string, event: Event, silent?: boolean) => void
trigger: (selector: string, eventName: string, event: Event, silent?: boolean) => void
shouldHave: {
at: {
least: (minCount: number, selector: string) => boolean
}
}
should: {
not: {
have: (selector: string) => boolean
contain: (value: string) => boolean
}
have: {
(expectedCount: number, selector: string): boolean
(selector: string): boolean
(selectors: string[]): boolean
at: {
least: (minCount: number, selector: string) => boolean
}
}
contain: (value: string) => boolean
}
}
declare module 'mithril-query' {
export = MithrilQuery
}