-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
54 lines (46 loc) · 1.14 KB
/
Copy pathtypes.ts
File metadata and controls
54 lines (46 loc) · 1.14 KB
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
export enum TestStatus {
IDLE = 'IDLE',
STARTING = 'STARTING',
RUNNING = 'RUNNING',
FINISHED = 'FINISHED'
}
export interface TypingStats {
wpm: number;
accuracy: number;
charactersTyped: number;
wordsAttempted: number;
incorrectWords: number;
timeTaken: number;
}
export interface TestConfig {
duration: number; // in seconds
}
export interface Quote {
text: string;
author: string;
}
export interface SpeechRecognitionErrorEventLike {
error: 'aborted' | 'audio-capture' | 'network' | 'no-speech' | 'not-allowed' | 'permission-denied' | string;
}
export interface SpeechRecognitionLike {
continuous: boolean;
interimResults: boolean;
lang: string;
onend: (() => void) | null;
onerror: ((event: SpeechRecognitionErrorEventLike) => void) | null;
onresult: ((event: unknown) => void) | null;
onstart: (() => void) | null;
start: () => void;
stop: () => void;
}
export interface SpeechRecognitionFactory {
new (): SpeechRecognitionLike;
}
export interface SpeechMatchResult {
accuracy: number;
attemptedWords: number;
completed: boolean;
inputText: string;
matchedWords: number;
missedWords: number;
}