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

2.0.6 • Public • Published

Installation

npm install --save @types/react-typist

Summary

This package contains type definitions for react-typist (https://github.com/jstejada/react-typist#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-typist.

index.d.ts

import * as React from "react";

export namespace Typist {
    interface CursorProps {
        show?: boolean | undefined;
        blink?: boolean | undefined;
        element?: string | undefined;
        hideWhenDone?: boolean | undefined;
        hideWhenDoneDelay?: number | undefined;
    }

    interface CurrentTextProps {
        line: string;
        lineIdx: number;
        character: string;
        charIdx: number;
        defDelayGenerator: (mn: number, st: number) => (...params: any) => number;
    }

    interface DelayProps {
        ms: number;
    }
    class Delay extends React.Component<DelayProps> {}

    interface BackSpaceProps {
        count?: number | undefined;
        delay?: number | undefined;
    }
    class Backspace extends React.Component<BackSpaceProps> {}
}

export interface TypistProps {
    children?: React.ReactNode;
    className?: string | undefined;
    avgTypingDelay?: number | undefined;
    stdTypingDelay?: number | undefined;
    startDelay?: number | undefined;
    cursor?: Typist.CursorProps | undefined;
    onCharacterTyped?: ((char: string, charIndex: number) => void) | undefined;
    onLineTyped?: ((line: string, lineIndex: number) => void) | undefined;
    onTypingDone?: (() => void) | undefined;
    delayGenerator?: ((mean: number, std: number, current: Typist.CurrentTextProps) => number) | undefined;
}

export class Typist extends React.Component<TypistProps> {}

export default Typist;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Shawn Choi.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @types/react-typist

    Weekly Downloads

    3,473

    Version

    2.0.6

    License

    MIT

    Unpacked Size

    5.57 kB

    Total Files

    5

    Last publish

    Collaborators

    • types