zxing-wasm
Version:
ZXing-C++ WebAssembly as an ES/CJS module with types
19 lines (18 loc) • 831 B
TypeScript
export declare const CONTENT_TYPES: readonly ["Text", "Binary", "Mixed", "GS1", "ISO15434", "UnknownECI"];
/** @deprecated Use {@link CONTENT_TYPES} instead. */
export declare const contentTypes: readonly ["Text", "Binary", "Mixed", "GS1", "ISO15434", "UnknownECI"];
export type ContentType = (typeof CONTENT_TYPES)[number];
/**
* Encodes a content type into its numeric representation.
*
* @param contentType - The content type to encode
* @returns A number representing the encoded content type
*/
export declare function encodeContentType(contentType: ContentType): number;
/**
* Decodes a content type from its numeric representation.
*
* @param number - The numeric identifier representing a content type
* @returns The decoded content type
*/
export declare function decodeContentType(number: number): ContentType;