forked from cozmo/jsQR
-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.d.ts
33 lines (33 loc) · 1.01 KB
/
index.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
import { BitMatrix } from "./BitMatrix";
import { Chunks } from "./decoder/decodeData";
import { Point } from "./locator";
export interface QRCode {
binaryData: number[];
data: string;
chunks: Chunks;
version: number;
location: {
topRightCorner: Point;
topLeftCorner: Point;
bottomRightCorner: Point;
bottomLeftCorner: Point;
topRightFinderPattern: Point;
topLeftFinderPattern: Point;
bottomLeftFinderPattern: Point;
bottomRightAlignmentPattern?: Point;
};
matrix: BitMatrix;
}
export interface Options {
inversionAttempts?: "dontInvert" | "onlyInvert" | "attemptBoth" | "invertFirst";
greyScaleWeights?: GreyscaleWeights;
canOverwriteImage?: boolean;
}
export interface GreyscaleWeights {
red: number;
green: number;
blue: number;
useIntegerApproximation?: boolean;
}
declare function jsQR(data: Uint8ClampedArray, width: number, height: number, providedOptions?: Options): QRCode | null;
export default jsQR;