diff --git a/src/decoder/barcode_decoder.js b/src/decoder/barcode_decoder.js index 95228d7..0b582be 100644 --- a/src/decoder/barcode_decoder.js +++ b/src/decoder/barcode_decoder.js @@ -17,7 +17,7 @@ import UPCEReader from '../reader/upc_e_reader'; import UPCReader from '../reader/upc_reader'; import Bresenham from './bresenham'; -export const READERS = { +const READERS = { code_128_reader: Code128Reader, ean_reader: EANReader, ean_5_reader: EAN5Reader, diff --git a/type-definitions/quagga.d.ts b/type-definitions/quagga.d.ts index 0f399ae..a74b3db 100644 --- a/type-definitions/quagga.d.ts +++ b/type-definitions/quagga.d.ts @@ -3,7 +3,6 @@ // Project: http://serratus.github.io/quaggaJS/ // Definitions by: Cam Birch, Peter Horwood aka Madman Pierre, Dan Manastireanu -import { READERS } from 'decoder/barcode_decoder'; import { vec2 } from 'gl-matrix'; // import SubImage from '../src/common/subImage'; @@ -1007,4 +1006,18 @@ export type TypedArray = | Float32Array | Float64Array; -export type QuaggaJSCodeReader = keyof typeof READERS; +export type QuaggaJSCodeReader = + | 'code_128_reader' + | 'ean_reader' + | 'ean_5_reader' + | 'ean_2_reader' + | 'ean_8_reader' + | 'code_39_reader' + | 'code_39_vin_reader' + | 'codabar_reader' + | 'upc_reader' + | 'upc_e_reader' + | 'i2of5_reader' + | '2of5_reader' + | 'code_93_reader' + | 'code_32_reader';