DefinitelyTyped/types/react-typing-animation/index.d.ts
Haseeb Majid b0fc21acbc
Updating react-typing-animation (#42564)
* Added React Native Share Extension

* Fixed Linting Issues

Fixed linting issues, added tests.

* Fixed other linting issues

Data returns a promise.

* Removed Public from state

Removed public from state.

* Added react-typing-animation

Added react-typing-animation.

* Updated react-typing-animation

Updated the react-typing-animation definitions
with the extra components such as delay, backspace.

* Fix small typo in react-typing-animation

Fixed small typo where onFinishedType should be
onFinishedTyping.

* Functions should return void

Functions in `Typing` should return void not `{}`.
2020-02-24 16:17:02 -08:00

53 lines
1.3 KiB
TypeScript

// Type definitions for react-typing-animation 1.6
// Project: https://github.com/notadamking/react-typing-animation#readme
// Definitions by: Haseeb Majid <https://github.com/hmajid2301>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Component } from 'react';
export interface TypingProps {
children: React.ReactNode;
className?: string;
cursorClassName?: string;
cursor?: React.ReactNode;
hideCursor?: boolean;
speed?: number;
startDelay?: number;
loop?: boolean;
onStartedTyping?: () => void;
onBeforeType?: () => void;
onAfterType?: () => void;
onFinishedTyping?: () => void;
}
declare namespace Typing {
interface BackspaceProperties {
count?: number;
delay?: number;
speed?: number;
}
class Backspace extends Component<BackspaceProperties> {}
interface DelayProperties {
ms: number;
}
class Delay extends Component<DelayProperties> {}
interface SpeedProperties {
ms: number;
}
class Speed extends Component<SpeedProperties> {}
interface ResetProperties {
count?: number;
delay?: number;
speed?: number;
}
class Reset extends Component<ResetProperties> {}
}
declare class Typing extends Component<TypingProps> {}
export default Typing;