dynamsoft-docs / barcode-reader-docs-js

1 stars 19 forks source link

Updating Barcode Format with `EnumBarcodeFormat` requires type casting in TypeScript #389

Open felixindynamsoft opened 1 month ago

felixindynamsoft commented 1 month ago

To update barcodeFormatIds in TypeScript, we'll need to cast the type to use BigInt

eg,

settings.barcodeSettings.barcodeFormatIds = BigInt(EnumBarcodeFormat.BF_PDF41) | BigInt(EnumBarcodeFormat.BF_ONED);

Should we update the enum to only show the type to be bigint instead of bigint | string ?

Documentation Link: Barcode Formats and Count - Dynamsoft Barcode Reader SDK

Error message:

image

felixindynamsoft commented 1 month ago

Received information from Shen that EnumBarcodeFormat will only be bigint on a new version. @mythicaleia