Skip to content

Instantly share code, notes, and snippets.

@leinelissen
leinelissen / barcode.d.ts
Created May 16, 2023 12:09
A Typescript definition for the Barcode Detection API
// This is necessary because Typescript refuses to import the file unless it has
// an export apparently. 🥲
export {};
declare global {
/**
* The possible types of barcode format that can be detected using the
* Barcode Detection API. This list may change in the future.
* Adapted from: https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API
*/