Skip to content

Commit 106209a

Browse files
committed
(#455) Handle generic provider data in ImageFinder interface
1 parent 4e3b180 commit 106209a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/provider/image-finder.interface.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { MatchRequest } from "../match-request.class";
22
import { MatchResult } from "../match-result.class";
3+
import { Image } from "../image.class";
34

45
/**
56
* An ImageFinder should provide an abstraction layer to perform image matching
@@ -15,7 +16,9 @@ export interface ImageFinderInterface {
1516
* @returns {Promise<MatchResult>} A {@link MatchResult} holding the match probability and location
1617
* @memberof ImageFinderInterface
1718
*/
18-
findMatch(matchRequest: MatchRequest): Promise<MatchResult>;
19+
findMatch<PROVIDER_DATA_TYPE>(
20+
matchRequest: MatchRequest<Image, PROVIDER_DATA_TYPE>
21+
): Promise<MatchResult>;
1922

2023
/**
2124
* findMatches should provide an abstraction to search for an image needle
@@ -25,5 +28,7 @@ export interface ImageFinderInterface {
2528
* @returns {Promise<MatchResult[]>} A list of {@link MatchResult}s holding the match probability and location
2629
* @memberof ImageFinderInterface
2730
*/
28-
findMatches(matchRequest: MatchRequest): Promise<MatchResult[]>;
31+
findMatches<PROVIDER_DATA_TYPE>(
32+
matchRequest: MatchRequest<Image, PROVIDER_DATA_TYPE>
33+
): Promise<MatchResult[]>;
2934
}

0 commit comments

Comments
 (0)