UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

23 lines (20 loc) 730 B
import { BarcodeFormat } from '../barcode/BarcodeRecognizerConfiguration'; import { BarcodeItem } from '../barcode/BarcodeItem'; import { DeepPartial, PartiallyConstructible } from '../../utils'; import { GenericDocument } from '../../documents/GenericDocument'; /** Results of the barcode scan. */ export class BarcodeScannerResult extends PartiallyConstructible { /** Recognized barcode items. */ public readonly items: BarcodeItem[] = []; /** @param source {@displayType `DeepPartial<BarcodeScannerResult>`} */ public constructor(source: DeepPartial<BarcodeScannerResult> = {}) { super(); if (source.items !== undefined) { this.items = source.items.map((it) => new BarcodeItem(it)); } } }