0.11.4 • Published 6 months ago

@types/edtr-io__mathquill v0.11.4

Weekly downloads
58
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/edtr-io__mathquill

Summary

This package contains type definitions for @edtr-io/mathquill (https://github.com/edtr-io/mathquill#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/edtr-io__mathquill.

index.d.ts

// Type definitions for @edtr-io/mathquill 0.11
// Project: https://github.com/edtr-io/mathquill#readme
// Definitions by: Marco Gonzalez <https://github.com/magonzalez9>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5

export interface MathField {
    focus(): MQ;
    blur(): MQ;
    write(latex: string): MQ;
    cmd(latex: string): MQ;
    select(): MQ;
    clearSelection(): MQ;
    moveToLeftEnd(): MQ;
    moveToRightEnd(): MQ;
    moveToDirEnd(direction: number): MQ;
    keystroke(keys: string): MQ;
    typedText(text: string): MQ;
    config(config: Config): MQ;
}

export interface MQ extends MathField {
    L: number;
    R: number;
    revert(): MQ;
    reflow(): MQ;
    el(): HTMLElement;
    latex(): string;
    latex(latex: string): MQ;
}

export interface Config {
    spaceBehavesLikeTab?: boolean | undefined;
    leftRightIntoCmdGoes?: string | undefined;
    restrictMismatchedBrackets?: boolean | undefined;
    sumStartsWithNEquals?: boolean | undefined;
    supSubsRequireOperand?: boolean | undefined;
    charsThatBreakOutOfSupSub?: string | undefined;
    autoSubscriptNumerals?: boolean | undefined;
    autoCommands?: string | undefined;
    autoOperatorNames?: string | undefined;
    maxDepth?: number | undefined;
    substituteTextarea?(): HTMLTextAreaElement;
    handlers?: {
        enter?(mathField: MQ): any;
        edit?(mathField: MQ): any;
        upOutOf?(mathField: MQ): any;
        moveOutOf?(direction: number, mathField: MQ): any;
    } | undefined;
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 12:01:04 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Marco Gonzalez.