-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathtyped.d.ts
131 lines (131 loc) · 3.42 KB
/
typed.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/**
* Welcome to Typed.js!
* @param {string} elementId HTML element ID _OR_ HTML element
* @param {object} options options object
* @returns {object} a new Typed object
*/
export default class Typed {
constructor(elementId: any, options: any);
/**
* Toggle start() and stop() of the Typed instance
* @public
*/
public toggle(): void;
/**
* Stop typing / backspacing and enable cursor blinking
* @public
*/
public stop(): void;
/**
* Start typing / backspacing after being stopped
* @public
*/
public start(): void;
/**
* Destroy this instance of Typed
* @public
*/
public destroy(): void;
/**
* Reset Typed and optionally restarts
* @param {boolean} restart
* @public
*/
public reset(restart?: boolean): void;
cursor: HTMLSpanElement;
strPos: number;
arrayPos: number;
curLoop: number;
/**
* Begins the typing animation
* @private
*/
private begin;
typingComplete: boolean;
timeout: any;
/**
* Called for each character typed
* @param {string} curString the current string in the strings array
* @param {number} curStrPos the current position in the curString
* @private
*/
private typewrite;
temporaryPause: boolean;
/**
* Continue to the next string & begin typing
* @param {string} curString the current string in the strings array
* @param {number} curStrPos the current position in the curString
* @private
*/
private keepTyping;
/**
* We're done typing the current string
* @param {string} curString the current string in the strings array
* @param {number} curStrPos the current position in the curString
* @private
*/
private doneTyping;
/**
* Backspaces 1 character at a time
* @param {string} curString the current string in the strings array
* @param {number} curStrPos the current position in the curString
* @private
*/
private backspace;
stopNum: number;
/**
* Full animation is complete
* @private
*/
private complete;
/**
* Has the typing been stopped
* @param {string} curString the current string in the strings array
* @param {number} curStrPos the current position in the curString
* @param {boolean} isTyping
* @private
*/
private setPauseStatus;
/**
* Toggle the blinking cursor
* @param {boolean} isBlinking
* @private
*/
private toggleBlinking;
cursorBlinking: any;
/**
* Speed in MS to type
* @param {number} speed
* @private
*/
private humanizer;
/**
* Shuffle the sequence of the strings array
* @private
*/
private shuffleStringsIfNeeded;
sequence: any;
/**
* Adds a CSS class to fade out current string
* @private
*/
private initFadeOut;
/**
* Replaces current text in the HTML element
* depending on element type
* @param {string} str
* @private
*/
private replaceText;
/**
* If using input elements, bind focus in order to
* start and stop the animation
* @private
*/
private bindFocusEvents;
/**
* On init, insert the cursor element
* @private
*/
private insertCursor;
}