@@ -48,8 +48,8 @@ export class NativeAdapter {
48
48
* @param {Point } p The new cursor position
49
49
* @memberof NativeAdapter
50
50
*/
51
- public async setMousePosition ( p : Point ) : Promise < void > {
52
- await this . mouse . setMousePosition ( p ) ;
51
+ public setMousePosition ( p : Point ) : Promise < void > {
52
+ return this . mouse . setMousePosition ( p ) ;
53
53
}
54
54
55
55
/**
@@ -58,33 +58,33 @@ export class NativeAdapter {
58
58
* @returns {Promise<Point> } Current cursor position
59
59
* @memberof NativeAdapter
60
60
*/
61
- public async currentMousePosition ( ) : Promise < Point > {
62
- return await this . mouse . currentMousePosition ( ) ;
61
+ public currentMousePosition ( ) : Promise < Point > {
62
+ return this . mouse . currentMousePosition ( ) ;
63
63
}
64
64
65
65
/**
66
66
* leftClick triggers a native left-click event via OS API
67
67
*
68
68
* @memberof NativeAdapter
69
69
*/
70
- public async leftClick ( ) : Promise < void > {
71
- await this . mouse . leftClick ( ) ;
70
+ public leftClick ( ) : Promise < void > {
71
+ return this . mouse . leftClick ( ) ;
72
72
}
73
73
74
74
/**
75
75
* rightClick triggers a native right-click event via OS API
76
76
*
77
77
* @memberof NativeAdapter
78
78
*/
79
- public async rightClick ( ) : Promise < void > {
80
- await this . mouse . rightClick ( ) ;
79
+ public rightClick ( ) : Promise < void > {
80
+ return this . mouse . rightClick ( ) ;
81
81
}
82
82
83
83
/**
84
84
* middleClick triggers a native middle-click event via OS API
85
85
*/
86
- public async middleClick ( ) : Promise < void > {
87
- await this . mouse . middleClick ( ) ;
86
+ public middleClick ( ) : Promise < void > {
87
+ return this . mouse . middleClick ( ) ;
88
88
}
89
89
90
90
/**
@@ -93,8 +93,8 @@ export class NativeAdapter {
93
93
* @param {Button } btn The mouse button to press
94
94
* @memberof NativeAdapter
95
95
*/
96
- public async pressButton ( btn : Button ) : Promise < void > {
97
- await this . mouse . pressButton ( btn ) ;
96
+ public pressButton ( btn : Button ) : Promise < void > {
97
+ return this . mouse . pressButton ( btn ) ;
98
98
}
99
99
100
100
/**
@@ -103,8 +103,8 @@ export class NativeAdapter {
103
103
* @param {Button } btn The mouse button to release
104
104
* @memberof NativeAdapter
105
105
*/
106
- public async releaseButton ( btn : Button ) : Promise < void > {
107
- await this . mouse . releaseButton ( btn ) ;
106
+ public releaseButton ( btn : Button ) : Promise < void > {
107
+ return this . mouse . releaseButton ( btn ) ;
108
108
}
109
109
110
110
/**
@@ -113,8 +113,8 @@ export class NativeAdapter {
113
113
* @param {string } input The text to type
114
114
* @memberof NativeAdapter
115
115
*/
116
- public async type ( input : string ) : Promise < void > {
117
- await this . keyboard . type ( input ) ;
116
+ public type ( input : string ) : Promise < void > {
117
+ return this . keyboard . type ( input ) ;
118
118
}
119
119
120
120
/**
@@ -123,8 +123,8 @@ export class NativeAdapter {
123
123
* @param {Key[] } keys The keys to click
124
124
* @memberof NativeAdapter
125
125
*/
126
- public async click ( ...keys : Key [ ] ) : Promise < void > {
127
- await this . keyboard . click ( ...keys ) ;
126
+ public click ( ...keys : Key [ ] ) : Promise < void > {
127
+ return this . keyboard . click ( ...keys ) ;
128
128
}
129
129
130
130
/**
@@ -133,8 +133,8 @@ export class NativeAdapter {
133
133
* @param {Key[] } keys The Keys to press and hold
134
134
* @memberof NativeAdapter
135
135
*/
136
- public async pressKey ( ...keys : Key [ ] ) : Promise < void > {
137
- await this . keyboard . pressKey ( ...keys ) ;
136
+ public pressKey ( ...keys : Key [ ] ) : Promise < void > {
137
+ return this . keyboard . pressKey ( ...keys ) ;
138
138
}
139
139
140
140
/**
@@ -143,8 +143,8 @@ export class NativeAdapter {
143
143
* @param {Key[] } keys The Keys to release
144
144
* @memberof NativeAdapter
145
145
*/
146
- public async releaseKey ( ...keys : Key [ ] ) : Promise < void > {
147
- await this . keyboard . releaseKey ( ...keys ) ;
146
+ public releaseKey ( ...keys : Key [ ] ) : Promise < void > {
147
+ return this . keyboard . releaseKey ( ...keys ) ;
148
148
}
149
149
150
150
/**
@@ -153,8 +153,8 @@ export class NativeAdapter {
153
153
* @param {number } amount The amount of 'ticks' to scroll
154
154
* @memberof NativeAdapter
155
155
*/
156
- public async scrollUp ( amount : number ) : Promise < void > {
157
- await this . mouse . scrollUp ( amount ) ;
156
+ public scrollUp ( amount : number ) : Promise < void > {
157
+ return this . mouse . scrollUp ( amount ) ;
158
158
}
159
159
160
160
/**
@@ -163,8 +163,8 @@ export class NativeAdapter {
163
163
* @param {number } amount The amount of 'ticks' to scroll
164
164
* @memberof NativeAdapter
165
165
*/
166
- public async scrollDown ( amount : number ) : Promise < void > {
167
- await this . mouse . scrollDown ( amount ) ;
166
+ public scrollDown ( amount : number ) : Promise < void > {
167
+ return this . mouse . scrollDown ( amount ) ;
168
168
}
169
169
170
170
/**
@@ -173,8 +173,8 @@ export class NativeAdapter {
173
173
* @param {number } amount The amount of 'ticks' to scroll
174
174
* @memberof NativeAdapter
175
175
*/
176
- public async scrollLeft ( amount : number ) : Promise < void > {
177
- await this . mouse . scrollLeft ( amount ) ;
176
+ public scrollLeft ( amount : number ) : Promise < void > {
177
+ return this . mouse . scrollLeft ( amount ) ;
178
178
}
179
179
180
180
/**
@@ -183,8 +183,8 @@ export class NativeAdapter {
183
183
* @param {number } amount The amount of 'ticks' to scroll
184
184
* @memberof NativeAdapter
185
185
*/
186
- public async scrollRight ( amount : number ) : Promise < void > {
187
- await this . mouse . scrollRight ( amount ) ;
186
+ public scrollRight ( amount : number ) : Promise < void > {
187
+ return this . mouse . scrollRight ( amount ) ;
188
188
}
189
189
190
190
/**
@@ -193,8 +193,8 @@ export class NativeAdapter {
193
193
* @param {string } text The text to copy
194
194
* @memberof NativeAdapter
195
195
*/
196
- public async copy ( text : string ) : Promise < void > {
197
- await this . clipboard . copy ( text ) ;
196
+ public copy ( text : string ) : Promise < void > {
197
+ return this . clipboard . copy ( text ) ;
198
198
}
199
199
200
200
/**
@@ -203,7 +203,7 @@ export class NativeAdapter {
203
203
* @returns {Promise<string> } The clipboard text
204
204
* @memberof NativeAdapter
205
205
*/
206
- public async paste ( ) : Promise < string > {
207
- return await this . clipboard . paste ( ) ;
206
+ public paste ( ) : Promise < string > {
207
+ return this . clipboard . paste ( ) ;
208
208
}
209
209
}
0 commit comments