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

    4.1.1 • Public • Published

    Installation

    npm install --save @types/electron-positioner

    Summary

    This package contains type definitions for electron-positioner (https://github.com/jenslind/electron-positioner).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/electron-positioner.

    index.d.ts

    // Type definitions for electron-positioner 4.1
    // Project: https://github.com/jenslind/electron-positioner
    // Definitions by: ktmouk <https://github.com/ktmouk>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    import { BrowserWindow, Rectangle } from 'electron';
    
    declare namespace ElectronPositioner {
        type Position =
            | 'topLeft'
            | 'topRight'
            | 'bottomLeft'
            | 'bottomRight'
            | 'topCenter'
            | 'bottomCenter'
            | 'leftCenter'
            | 'rightCenter'
            | 'center';
    
        type TrayPosition =
            | 'trayLeft'
            | 'trayBottomLeft'
            | 'trayRight'
            | 'trayBottomRight'
            | 'trayCenter'
            | 'trayBottomCenter';
    }
    
    declare class ElectronPositioner {
        constructor(browserWindow: BrowserWindow);
    
        move(position: ElectronPositioner.Position, trayBounds?: Rectangle): void;
        move(position: ElectronPositioner.Position | ElectronPositioner.TrayPosition, trayBounds: Rectangle): void;
    
        calculate(position: ElectronPositioner.Position, trayBounds?: Rectangle): { x: number; y: number };
        calculate(
            position: ElectronPositioner.Position | ElectronPositioner.TrayPosition,
            trayBounds: Rectangle,
        ): { x: number; y: number };
    }
    
    export = ElectronPositioner;

    Additional Details

    • Last updated: Thu, 16 Dec 2021 02:31:06 GMT
    • Dependencies: @types/electron
    • Global values: none

    Credits

    These definitions were written by ktmouk.

    Keywords

    none

    Install

    npm i @types/electron-positioner

    DownloadsWeekly Downloads

    168

    Version

    4.1.1

    License

    MIT

    Unpacked Size

    5.31 kB

    Total Files

    4

    Last publish

    Collaborators

    • types