LoginSignup
0
1

More than 3 years have passed since last update.

webkitSpeechRecognition の型定義の書き方

Posted at

keyword: vendor prefix, ベンダープレフィックス

型定義ファイル書くの慣れてなくてちょっと迷ったので記録。
webkit接頭辞がないと使えないが、webkit付きだと型定義が存在しないようなSpeechRecognitionなどは以下を書くことで型が通る。

declare const webkitSpeechRecognition: typeof SpeechRecognition
declare const webkitSpeechGrammarList: typeof SpeechGrammarList
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1