Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@types/react-speech-recognition
Advanced tools
TypeScript definitions for react-speech-recognition
npm install --save @types/react-speech-recognition
This package contains type definitions for react-speech-recognition (https://github.com/JamesBrill/react-speech-recognition#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-speech-recognition.
// Type definitions for react-speech-recognition 3.9
// Project: https://github.com/JamesBrill/react-speech-recognition#readme
// Definitions by: OleksandrYehorov <https://github.com/OleksandrYehorov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Command {
command: string | string[] | RegExp;
callback: (...args: any[]) => unknown;
isFuzzyMatch?: boolean | undefined;
matchInterim?: boolean | undefined;
fuzzyMatchingThreshold?: number | undefined;
bestMatchOnly?: boolean | undefined;
}
export interface ListeningOptions {
continuous?: boolean | undefined;
language?: string | undefined;
}
interface SpeechRecognition {
getRecognition(): SpeechRecognition | null;
startListening(options?: ListeningOptions): Promise<void>;
stopListening(): void;
abortListening(): void;
browserSupportsSpeechRecognition(): boolean;
applyPolyfill(speechRecognitionPolyfill: any): void;
}
export interface SpeechRecognitionOptions {
transcribing?: boolean | undefined;
clearTranscriptOnListen?: boolean | undefined;
commands?: ReadonlyArray<Command> | undefined;
}
export function useSpeechRecognition(
options?: SpeechRecognitionOptions,
): {
transcript: string;
interimTranscript: string;
finalTranscript: string;
listening: boolean;
resetTranscript: () => void;
browserSupportsSpeechRecognition: boolean;
isMicrophoneAvailable: boolean;
};
declare const SpeechRecognition: SpeechRecognition;
export default SpeechRecognition;
These definitions were written by OleksandrYehorov.
FAQs
TypeScript definitions for react-speech-recognition
We found that @types/react-speech-recognition demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.