import ResultPoint from './ResultPoint'; import BarcodeFormat from './BarcodeFormat'; import ResultMetadataType from './ResultMetadataType'; /** *
Encapsulates the result of decoding a barcode within an image.
* * @author Sean Owen */ export default class Result { private text; private rawBytes; private numBits; private resultPoints; private format; private timestamp; private resultMetadata; constructor(text: string, rawBytes: Uint8Array, numBits: number, resultPoints: ResultPoint[], format: BarcodeFormat, timestamp?: number); /** * @return raw text encoded by the barcode */ getText(): string; /** * @return raw bytes encoded by the barcode, if applicable, otherwise {@code null} */ getRawBytes(): Uint8Array; /** * @return how many bits of {@link #getRawBytes()} are valid; typically 8 times its length * @since 3.3.0 */ getNumBits(): number; /** * @return points related to the barcode in the image. These are typically points * identifying finder patterns or the corners of the barcode. The exact meaning is * specific to the type of barcode that was decoded. */ getResultPoints(): Array