Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 419cba1

Browse files
committedDec 1, 2021
(#329) Update docstrings
1 parent 273b63e commit 419cba1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

Diff for: ‎lib/screen.class.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ export class ScreenClass {
9292

9393
/**
9494
* {@link find} will search for a single occurrence of a template image on a systems main screen
95-
* @param templateImage Filename of the template image, relative to {@link ScreenClass.config.resourceDirectory}, or an {@link Image} instance
95+
* @param template Template {@link Image} instance
9696
* @param params {@link LocationParameters} which are used to fine tune search region and / or match confidence
9797
*/
9898
public async find(
99-
templateImage: Image | Promise<Image>,
99+
template: Image | Promise<Image>,
100100
params?: LocationParameters,
101101
): Promise<Region> {
102102
const minMatch = (params && params.confidence) || this.config.confidence;
103103
const screenSize = await this.providerRegistry.getScreen().screenSize();
104104
const searchRegion = (params && params.searchRegion) || screenSize;
105105
const searchMultipleScales = (params && params.searchMultipleScales)
106106

107-
const needle = await templateImage;
107+
const needle = await template;
108108

109109
const screenImage = await this.providerRegistry.getScreen().grabScreenRegion(searchRegion);
110110

@@ -144,19 +144,19 @@ export class ScreenClass {
144144

145145
/**
146146
* {@link findAll} will search for every occurrences of a template image on a systems main screen
147-
* @param templateImage Filename of the template image, relative to {@link ScreenClass.config.resourceDirectory}, or an {@link Image} instance
147+
* @param template Template {@link Image} instance
148148
* @param params {@link LocationParameters} which are used to fine tune search region and / or match confidence
149149
*/
150150
public async findAll(
151-
templateImage: Image | Promise<Image>,
151+
template: FirstArgumentType<typeof ScreenClass.prototype.find>,
152152
params?: LocationParameters,
153153
): Promise<Region[]> {
154154
const minMatch = (params && params.confidence) || this.config.confidence;
155155
const screenSize = await this.providerRegistry.getScreen().screenSize();
156156
const searchRegion = (params && params.searchRegion) || screenSize;
157157
const searchMultipleScales = (params && params.searchMultipleScales)
158158

159-
const needle = await templateImage;
159+
const needle = await template;
160160

161161
const screenImage = await this.providerRegistry.getScreen().grabScreenRegion(searchRegion);
162162

0 commit comments

Comments
 (0)
Please sign in to comment.