Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernization with TypeScript and Event Target #220

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Modernization with TypeScript and Event Target #220

merged 2 commits into from
Nov 20, 2024

Conversation

compulim
Copy link
Owner

@compulim compulim commented Nov 20, 2024

Changelog

Please copy and paste new entries from CHANGELOG.md here.

Changed

  • 💥 Modernized some code with TypeScript, more type-aligned to W3C Speech API, and moved to official Event Target API, in PR #220
    • SpeechRecognitionResult and SpeechRecognitionResultList is now a array-like object, use Array.from() to convert them into an array

Design

We are moving slowly. The core createSpeechRecognitionPolyfill is still JS with /** @type {...} */ type annotation, instead of fully TypeScript.

Specific changes

Please list each individual specific change in this pull request.

  • Upgraded SpeechRecognition from event-target-shim to official EventTarget API
  • Typed out SpeechRecognitionEvent and related classes
  • More property getter than variable

@compulim compulim merged commit 181f814 into main Nov 20, 2024
5 checks passed
@compulim compulim deleted the feat-typing branch November 20, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant