0.0.7 • Published 6 months ago

@types/phonegap-plugin-barcodescanner v0.0.7

Weekly downloads
1,294
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for phonegap-plugin-barcodescanner
// Project: https://github.com/phonegap/phonegap-plugin-barcodescanner
// Definitions by: Nathan Ainslie <https://www.github.com/nainslie>
//                 Jeff Wu <https://www.github.com/jeffwu85182>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Thu, 08 Jul 2021 20:19:35 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Nathan Ainslie, and Jeff Wu.

0.0.5

8 months ago

0.0.7

6 months ago

0.0.6

7 months ago

0.0.4

3 years ago

0.0.3

7 years ago

0.0.2

8 years ago

0.0.1

8 years ago