# @types/phonegap-plugin-barcodescanner

> TypeScript definitions for phonegap-plugin-barcodescanner

Latest version **0.0.7** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/phonegap-plugin-barcodescanner
pnpm add @types/phonegap-plugin-barcodescanner
yarn add @types/phonegap-plugin-barcodescanner
bun add @types/phonegap-plugin-barcodescanner
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2023-11-07 |
| First published | 2016-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/phonegap-plugin-barcodescanner
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phonegap-plugin-barcodescanner
- npm.io page: https://npm.io/package/@types/phonegap-plugin-barcodescanner

## Recent versions

- 0.0.7 (latest) — 2023-11-07
- 0.0.4 (ts3.6) — 2021-07-08
- 0.0.3 (ts2.0) — 2017-09-22
- 0.0.6 — 2023-10-18
- 0.0.5 — 2023-09-24
- 0.0.2 — 2016-10-05
- 0.0.1 — 2016-09-19

## README

# Installation
> `npm install --save @types/phonegap-plugin-barcodescanner`

# Summary
This package contains type definitions for phonegap-plugin-barcodescanner (https://github.com/phonegap/phonegap-plugin-barcodescanner).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phonegap-plugin-barcodescanner.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phonegap-plugin-barcodescanner/index.d.ts)
````ts
interface CordovaPlugins {
    barcodeScanner: phonegapBarcode.BarcodeScanner;
}

declare namespace phonegapBarcode {
    interface BarcodeScanResult {
        text: string;
        format: string;
        cancelled: boolean;
    }

    interface BarcodeScanOptions {
        preferFrontCamera?: boolean | undefined;
        showFlipCameraButton?: boolean | undefined;
        showTorchButton?: boolean | undefined;
        torchOn?: boolean | undefined;
        saveHistory?: boolean | undefined;
        resultDisplayDuration?: number | undefined;
        disableAnimations: boolean;
        prompt?: string | undefined;
        formats?: string | undefined;
        orientation?: "landscape" | "portrait" | undefined;
        disableSuccessBeep?: boolean | undefined;
    }

    interface EncodingType {
        TEXT_TYPE: any;
        EMAIL_TYPE: any;
        PHONE_TYPE: any;
        SMS_TYPE: any;
    }

    interface BarcodeScanner {
        scan: (
            success: (result: BarcodeScanResult) => any,
            failure?: (err: any) => any,
            opts?: BarcodeScanOptions,
        ) => void;
        encode: (
            encodingType: EncodingType,
            data: string,
            success: (result: any) => any,
            failure?: (err: any) => any,
        ) => void;
        Encode: EncodingType;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Nathan Ainslie](https://www.github.com/nainslie), and [Jeff Wu](https://www.github.com/jeffwu85182).

---
_Source: https://npm.io/package/@types/phonegap-plugin-barcodescanner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
