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

1.1.6 • Public • Published

Installation

npm install --save @types/electron-spellchecker

Summary

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

Details

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

index.d.ts

/// <reference types="electron"/>

export type ContextMenuFormatter = (options: { word: string }) => string;

export class SpellCheckHandler {
    currentSpellchecker: this;

    attachToInput(): void;
    autoUnloadDictionariesOnBlur(): void;
    provideHintText(inputText: string): void;
    switchLanguage(language: string): void;
    getCorrectionsForMisspelling(misspelledWord: string): Promise<string[]>;
    addToDictionary(text: string): void;

    unsubscribe(): void;
}

export class ContextMenuBuilder {
    constructor(
        spellCheckHandler?: SpellCheckHandler,
        target?: Electron.BrowserWindow | Electron.WebviewTag | null,
        debugMode?: boolean,
        processMenu?: (menu: Electron.Menu) => Electron.Menu,
    );

    setAlternateStringFormatter(formatter: {
        [key: string]: ContextMenuFormatter;
    }): void;

    showPopupMenu: (info: Electron.ContextMenuParams) => void;
}

export class ContextMenuListener {
    constructor(
        handler: (info: Electron.ContextMenuParams) => void,
        target?: Electron.BrowserWindow | Electron.WebviewTag | null,
    );

    unsubscribe(): void;
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: electron

Credits

These definitions were written by Daniel Perez Alvarez.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/electron-spellchecker

Weekly Downloads

12

Version

1.1.6

License

MIT

Unpacked Size

5.02 kB

Total Files

5

Last publish

Collaborators

  • types