File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,11 @@ export class BarcodeDetectorPolyfill {
56
56
/**
57
57
* Scans an image for barcodes and returns a {@link Promise} for the result.
58
58
*
59
- * @param {ImageBitmapSource } image the image to be scanned
60
- * @returns {Promise<Object > } the scan result as described for {@link BarcodeDetector}
59
+ * @param {ImageBitmapSource } source the image to be scanned
60
+ * @returns {Promise<Array<DetectedBarcode> > } the scan result as described for {@link BarcodeDetector}
61
61
*/
62
62
// TODO Enable cache for video source, disable for others unless overridden in zbarConfig
63
- detect ( source : ImageBitmapSource ) : Promise < Array < Object > > {
63
+ detect ( source : ImageBitmapSource ) : Promise < Array < DetectedBarcode > > {
64
64
// Return an empty array immediately if the source is an object with any zero dimension,
65
65
// see https://wicg.github.io/shape-detection-api/#image-sources-for-detection
66
66
const intrinsic = BarcodeDetectorPolyfill . intrinsicDimensions ( source )
Original file line number Diff line number Diff line change
1
+ type Point = { x : number , y : number }
2
+
1
3
/**
2
4
* @see https://wicg.github.io/shape-detection-api/#detectedbarcode-section
3
5
*/
4
6
export interface DetectedBarcode {
5
7
6
8
boundingBox : DOMRectReadOnly
7
- cornerPoints : Array < { x , y } >
9
+ cornerPoints : Array < Point >
8
10
format : string
9
11
rawValue : string
10
12
You can’t perform that action at this time.
0 commit comments