UNPKG

capacitor-plugin-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK for Capacitor

51 lines 1.78 kB
import { GenericDocument } from '../../documents/GenericDocument'; import { PartiallyConstructible } from '../../utils'; /** Data about the scanned barcode. */ export class BarcodeItem extends PartiallyConstructible { /** @param source {@displayType `DeepPartial<BarcodeItem>`} */ constructor(source = {}) { super(); if (source.type !== undefined) { this.type = source.type != null ? source.type : null; } else { throw new Error('type must be present in constructor argument'); } if (source.count !== undefined) { this.count = source.count; } else { throw new Error('count must be present in constructor argument'); } if (source.text !== undefined) { this.text = source.text; } else { throw new Error('text must be present in constructor argument'); } if (source.textWithExtension !== undefined) { this.textWithExtension = source.textWithExtension; } else { throw new Error('textWithExtension must be present in constructor argument'); } if (source.rawBytes !== undefined) { this.rawBytes = source.rawBytes; } else { throw new Error('rawBytes must be present in constructor argument'); } if (source.parsedDocument !== undefined) { this.parsedDocument = source.parsedDocument != null ? new GenericDocument(source.parsedDocument) : null; } else { throw new Error('parsedDocument must be present in constructor argument'); } } } //# sourceMappingURL=BarcodeItem.js.map