phetsims / utterance-queue

Alerting library powered by aria-live
MIT License
0 stars 2 forks source link

UtteranceQueue to be parameteric to the Type of its announcer #106

Closed zepumph closed 1 year ago

zepumph commented 1 year ago

@chrisklus and I found that it would be nice to have UtteranceQueue have a parametric typescript type that was the actual Announcer type. THis way the announcer Property would have the right type associated with it for access. This is valuable for some number suite cases where we pass through utterance queues and want to have access to particular announcer subtype methods.

zepumph commented 1 year ago

@chrisklus is this helpful for you? Now you can do something like new UtteranceQueue<NumberSuiteAnnouncer>.

chrisklus commented 1 year ago

Your commit looks great! This is working really nicely over in https://github.com/phetsims/number-suite-common/issues/58. Thanks! Closing.