Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions types/dom-speech-recognition/dom-speech-recognition-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,8 @@ const speechRecognitionOptions: SpeechRecognitionOptions = {
(async () => {
const availability: AvailabilityStatus = await SpeechRecognition.available(speechRecognitionOptions);
const installOutcome: boolean = await SpeechRecognition.install(speechRecognitionOptions);

// "webkit" prefixed vars should have the same static methods
const webkitAvailability: AvailabilityStatus = await webkitSpeechRecognition.available(speechRecognitionOptions);
const webkitInstallOutcome: boolean = await webkitSpeechRecognition.install(speechRecognitionOptions);
});
7 changes: 6 additions & 1 deletion types/dom-speech-recognition/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ declare var SpeechGrammarList: { prototype: SpeechGrammarList; new(): SpeechGram

// prefixed global variables in Chrome; should match the equivalents above
// https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API#chrome_support
declare var webkitSpeechRecognition: { prototype: SpeechRecognition; new(): SpeechRecognition };
declare var webkitSpeechRecognition: {
prototype: SpeechRecognition;
new(): SpeechRecognition;
available(options: SpeechRecognitionOptions): Promise<AvailabilityStatus>;
install(options: SpeechRecognitionOptions): Promise<boolean>;
};
declare var webkitSpeechGrammarList: { prototype: SpeechGrammarList; new(): SpeechGrammarList };
declare var webkitSpeechRecognitionEvent: {
prototype: SpeechRecognitionEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,8 @@ const speechRecognitionOptions: SpeechRecognitionOptions = {
(async () => {
const availability: AvailabilityStatus = await SpeechRecognition.available(speechRecognitionOptions);
const installOutcome: boolean = await SpeechRecognition.install(speechRecognitionOptions);

// "webkit" prefixed vars should have the same static methods
const webkitAvailability: AvailabilityStatus = await webkitSpeechRecognition.available(speechRecognitionOptions);
const webkitInstallOutcome: boolean = await webkitSpeechRecognition.install(speechRecognitionOptions);
});
7 changes: 6 additions & 1 deletion types/dom-speech-recognition/ts5.9/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ declare var SpeechGrammarList: { prototype: SpeechGrammarList; new(): SpeechGram

// prefixed global variables in Chrome; should match the equivalents above
// https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API#chrome_support
declare var webkitSpeechRecognition: { prototype: SpeechRecognition; new(): SpeechRecognition };
declare var webkitSpeechRecognition: {
prototype: SpeechRecognition;
new(): SpeechRecognition;
available(options: SpeechRecognitionOptions): Promise<AvailabilityStatus>;
install(options: SpeechRecognitionOptions): Promise<boolean>;
};
declare var webkitSpeechGrammarList: { prototype: SpeechGrammarList; new(): SpeechGrammarList };
declare var webkitSpeechRecognitionEvent: {
prototype: SpeechRecognitionEvent;
Expand Down