@types/pi-camera
    TypeScript icon, indicating that this package has built-in type declarations

    1.5.3 • Public • Published

    Installation

    npm install --save @types/pi-camera

    Summary

    This package contains type definitions for pi-camera (https://github.com/stetsmando/pi-camera).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pi-camera.

    index.d.ts

    // Type definitions for pi-camera 1.5
    // Project: https://github.com/stetsmando/pi-camera
    // Definitions by: Ata Berk YILMAZ <https://github.com/ataberkylmz>
    //                 Piotr Błażejewicz <https://github.com/peterblazejewicz>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    declare class PiCamera {
        constructor(config?: PiCamera.CameraConfig);
        snap(): Promise<string>;
        /** @async */
        snapDataUrl(maxBuffer?: number): Promise<string>;
        record(): Promise<string>;
        get(prop: PiCamera.ConfigKey): PiCamera.ConfigValue;
        set(prop: PiCamera.ConfigKey, value: PiCamera.ConfigValue): PiCamera.ConfigValue;
    
        private configToArray(): Array<string | PiCamera.ConfigValue>;
    }
    
    declare namespace PiCamera {
        type ConfigKey = keyof CameraConfig;
        type ConfigValue = CameraConfig[keyof CameraConfig];
        type Mode = "photo" | "video";
    
        interface CameraConfig {
            mode: Mode;
            output?: string | undefined;
            width?: number | undefined;
            height?: number | undefined;
            quality?: number | undefined;
            latest?: string | undefined;
            timeout?: number | undefined;
            thumb?: string | undefined;
            demo?: number | undefined;
            encoding?: string | undefined;
            timelapse?: number | undefined;
            framerate?: number | undefined;
            rotation?: number | undefined;
            preview?: string | undefined;
            opacity?: number | undefined;
            annotate?: string | number | undefined;
            exif?: string | undefined;
            brightness?: number | undefined;
            contrast?: number | undefined;
            shutter?: number | undefined;
            saturation?: number | undefined;
            raw?: boolean | undefined;
            verbose?: boolean | undefined;
            fullscreen?: boolean | undefined;
            nopreview?: boolean | undefined;
            vstab?: boolean | undefined;
            hflip?: boolean | undefined;
            vflip?: boolean | undefined;
            timestamp?: boolean | undefined;
            datetime?: boolean | undefined;
        }
    }
    
    export = PiCamera;

    Additional Details

    • Last updated: Thu, 08 Jul 2021 20:19:37 GMT
    • Dependencies: none
    • Global values: none

    Credits

    These definitions were written by Ata Berk YILMAZ, and Piotr Błażejewicz.

    Keywords

    none

    Install

    npm i @types/pi-camera

    DownloadsWeekly Downloads

    25

    Version

    1.5.3

    License

    MIT

    Unpacked Size

    6.97 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar